本文整理匯總了Java中org.nutz.mvc.annotation.DELETE類的典型用法代碼示例。如果您正苦於以下問題:Java DELETE類的具體用法?Java DELETE怎麽用?Java DELETE使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DELETE類屬於org.nutz.mvc.annotation包,在下文中一共展示了DELETE類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: deleteDev
import org.nutz.mvc.annotation.DELETE; //導入依賴的package包/類
@At({"/device/?"})
@DELETE
@Ok("void")
public void deleteDev(long device_id, @Attr(IotKeys.UID)long userId) {
dao.clear(IotDevice.class, Cnd.where("id", "=", device_id).and(IotKeys.UID, "=", userId));
dao.clear(IotSensor.class, Cnd.where("deviceId", "=", device_id).and(IotKeys.UID, "=", userId));
}
示例2: deleteDev
import org.nutz.mvc.annotation.DELETE; //導入依賴的package包/類
@At({"/iot/device/?", "/v1.1/device/?"})
@DELETE
@Ok("void")
public void deleteDev(long device_id, @Attr(Zs.UID)long userId) {
dao.clear(IotDevice.class, Cnd.where("id", "=", device_id).and(Zs.UID, "=", userId));
dao.clear(IotSensor.class, Cnd.where("deviceId", "=", device_id).and(Zs.UID, "=", userId));
}
示例3: deleteAll
import org.nutz.mvc.annotation.DELETE; //導入依賴的package包/類
@DELETE
@At("/api/")
public void deleteAll() {
todos.clear();
}
示例4: deleteTodo
import org.nutz.mvc.annotation.DELETE; //導入依賴的package包/類
@DELETE
@At("/api/?")
public void deleteTodo(String id) {
todos.remove(id);
}
示例5: deleteSensor
import org.nutz.mvc.annotation.DELETE; //導入依賴的package包/類
@At({"/device/?/sensor/?"})
@DELETE
@Ok("http:200")
public void deleteSensor(long device_id, @Param("sensor_id")long sensor_id, @Attr(IotKeys.UID)long userId) {
dao.clear(IotSensor.class, Cnd.where("deviceId", "=", device_id).and(IotKeys.UID, "=", userId).and("id", "=", sensor_id));
}
示例6: deleteSensor
import org.nutz.mvc.annotation.DELETE; //導入依賴的package包/類
@At({"/iot/device/?/sensor/?", "/v1.1/device/?/sensor/?"})
@DELETE
@Ok("http:200")
public void deleteSensor(long device_id, @Param("sensor_id")long sensor_id, @Attr(Zs.UID)long userId) {
dao.clear(IotSensor.class, Cnd.where("deviceId", "=", device_id).and(Zs.UID, "=", userId).and("id", "=", sensor_id));
}