diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/DeviceTypeServiceImpl.java b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/DeviceTypeServiceImpl.java index eebd47ee..9b730cdc 100644 --- a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/DeviceTypeServiceImpl.java +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/DeviceTypeServiceImpl.java @@ -159,7 +159,7 @@ public class DeviceTypeServiceImpl implements DeviceTypeService { String toDate = String.valueOf(to); String query = "deviceId:" + deviceId + " AND deviceType:" + DeviceTypeConstants.DEVICE_TYPE + " AND time : [" + fromDate + " TO " + toDate + "]"; - String sensorTableName = DeviceTypeConstants.TEMPERATURE_EVENT_TABLE; + String sensorTableName = DeviceTypeConstants.SENSOR_EVENT_TABLE; try { if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized(new DeviceIdentifier(deviceId, DeviceTypeConstants.DEVICE_TYPE))) { diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/dto/SensorRecord.java b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/dto/SensorRecord.java index 8a197967..d7656872 100644 --- a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/dto/SensorRecord.java +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/dto/SensorRecord.java @@ -28,7 +28,7 @@ import java.util.List; import java.util.Map; /** - * This stores sensor event data for android sense. + * This stores sensor event data for ${deviceType}. */ @XmlRootElement @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/src/main/java/__groupId__/__rootArtifactId__/plugin/constants/DeviceTypeConstants.java b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/src/main/java/__groupId__/__rootArtifactId__/plugin/constants/DeviceTypeConstants.java index 7107829a..01ba3799 100644 --- a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/src/main/java/__groupId__/__rootArtifactId__/plugin/constants/DeviceTypeConstants.java +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/src/main/java/__groupId__/__rootArtifactId__/plugin/constants/DeviceTypeConstants.java @@ -29,7 +29,7 @@ public class DeviceTypeConstants { public final static String STATE_OFF = "OFF"; //sensor events summerized table name - public static final String TEMPERATURE_EVENT_TABLE = "ORG_WSO2_IOT_DEVICES_${nameOfTheSensor}"; + public static final String SENSOR_EVENT_TABLE = "ORG_WSO2_IOT_DEVICES_${nameOfTheSensor}"; public static final String DATA_SOURCE_NAME = "jdbc/${deviceType}DM_DB"; public final static String DEVICE_TYPE_PROVIDER_DOMAIN = "carbon.super";