SensorItemService

This commit is contained in:
insanity 2018-06-28 17:04:33 +09:00
parent 30c3cef67b
commit 26fa876b27
4 changed files with 28 additions and 10 deletions

View File

@ -13,7 +13,7 @@
<groupId>com.loafle.overflow</groupId>
<artifactId>commons-java</artifactId>
<packaging>jar</packaging>
<version>1.0.105-SNAPSHOT</version>
<version>1.0.106-SNAPSHOT</version>
<name>com.loafle.overflow.commons-java</name>
<properties>

View File

@ -68,4 +68,25 @@ public class MetaSensorStatus {
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public static enum Enum {
STOPPED((short) 1), RUNNING((short) 2),;
private final Short value;
/**
* @param value
*/
Enum(final Short value) {
this.value = value;
}
public Short getValue() {
return this.value;
}
public MetaSensorStatus to() {
return new MetaSensorStatus(this.value);
}
}
}

View File

@ -2,9 +2,7 @@ package com.loafle.overflow.service.central.sensor;
import com.loafle.overflow.core.annotation.WebappAPI;
import com.loafle.overflow.core.exception.OverflowException;
import com.loafle.overflow.core.model.PageParams;
import com.loafle.overflow.model.sensor.SensorItem;
import org.springframework.data.domain.Page;
import java.util.List;
@ -12,18 +10,14 @@ import java.util.List;
* Created by insanity on 17. 6. 28.
*/
public interface SensorItemService {
@WebappAPI
SensorItem regist(SensorItem sensorItem) throws OverflowException;
@WebappAPI
boolean registAll(List<SensorItem> sensorItemList) throws OverflowException;
SensorItem read(Long id) throws OverflowException;
@WebappAPI
SensorItem read(String id) throws OverflowException;
List<SensorItem> readAllBySensorID(Long sensorID) throws OverflowException;
@WebappAPI
Page<SensorItem> readAllBySensorID(Long sensorID, PageParams pageParams) throws OverflowException;
void remove(Long sensorItemID) throws OverflowException;
@WebappAPI
void remove(SensorItem sensorItem) throws OverflowException;
}

View File

@ -15,6 +15,9 @@ public interface SensorService {
@WebappAPI
Sensor regist(Sensor sensor, List<MetaDisplayItemMapping> metaDisplayItemMappings) throws OverflowException;
@WebappAPI
Sensor modify(Long sensorID, List<MetaDisplayItemMapping> metaDisplayItemMappings) throws OverflowException;
@WebappAPI
Sensor read(Long id) throws OverflowException;