本文整理汇总了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));
}