|
|
@ -241,7 +241,7 @@ public class DeviceTypePluginDAO {
|
|
|
|
|
|
|
|
|
|
|
|
private String getPropertString(List<Device.Property> properties, String propertyName) {
|
|
|
|
private String getPropertString(List<Device.Property> properties, String propertyName) {
|
|
|
|
for (Device.Property property : properties) {
|
|
|
|
for (Device.Property property : properties) {
|
|
|
|
if (property.getName().equals(propertyName)) {
|
|
|
|
if (property.getName() != null && property.getName().equals(propertyName)) {
|
|
|
|
return property.getValue();
|
|
|
|
return property.getValue();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -257,7 +257,7 @@ public class DeviceTypePluginDAO {
|
|
|
|
+ getPreparedInputString(deviceDAODefinition.getColumnNames().size() + 1) + ")";
|
|
|
|
+ getPreparedInputString(deviceDAODefinition.getColumnNames().size() + 1) + ")";
|
|
|
|
|
|
|
|
|
|
|
|
updateDBQueryForUpdateDevice = "UPDATE " + deviceDAODefinition.getDeviceTableName() + " SET "
|
|
|
|
updateDBQueryForUpdateDevice = "UPDATE " + deviceDAODefinition.getDeviceTableName() + " SET "
|
|
|
|
+ getDeviceTableColumnNamesForUpdateQuery()+ " WHERE " + deviceDAODefinition.getPrimaryKey()
|
|
|
|
+ getDeviceTableColumnNamesForUpdateQuery() + " WHERE " + deviceDAODefinition.getPrimaryKey()
|
|
|
|
+ " = ?";
|
|
|
|
+ " = ?";
|
|
|
|
|
|
|
|
|
|
|
|
deleteDBQueryToRemoveDevicd = "DELETE FROM " + deviceDAODefinition.getDeviceTableName()
|
|
|
|
deleteDBQueryToRemoveDevicd = "DELETE FROM " + deviceDAODefinition.getDeviceTableName()
|
|
|
|