|
|
|
@ -153,7 +153,7 @@ public abstract class AbstractGeofenceDAOImpl implements GeofenceDAO {
|
|
|
|
|
try (PreparedStatement stmt = conn.prepareStatement(sql)) {
|
|
|
|
|
stmt.setInt(index++, tenantId);
|
|
|
|
|
if (isNameProvided) {
|
|
|
|
|
stmt.setString(index++, request.getProperty(DeviceManagementConstants.GeoServices.FENCE_NAME).toString() + "%");
|
|
|
|
|
stmt.setString(index++, "%" + request.getProperty(DeviceManagementConstants.GeoServices.FENCE_NAME).toString() + "%");
|
|
|
|
|
}
|
|
|
|
|
stmt.setInt(index++, request.getRowCount());
|
|
|
|
|
stmt.setInt(index, request.getStartIndex());
|
|
|
|
@ -190,7 +190,7 @@ public abstract class AbstractGeofenceDAOImpl implements GeofenceDAO {
|
|
|
|
|
"WHERE FENCE_NAME LIKE ?" +
|
|
|
|
|
"AND TENANT_ID = ? ";
|
|
|
|
|
try (PreparedStatement stmt = conn.prepareStatement(sql)) {
|
|
|
|
|
stmt.setString(1, fenceName + "%");
|
|
|
|
|
stmt.setString(1, "%" + fenceName + "%");
|
|
|
|
|
stmt.setInt(2, tenantId);
|
|
|
|
|
try (ResultSet rst = stmt.executeQuery()) {
|
|
|
|
|
geofenceData = extractGeofenceData(rst);
|
|
|
|
|