code clean up

revert-dabc3590
prabathabey 9 years ago
parent b5548f5744
commit 363dca0b61

@ -77,7 +77,7 @@ public class MobileDeviceOperationMappingDAOImpl implements MobileDeviceOperatio
String msg = "Error occurred while adding device id - '" +
mblDeviceOperationMapping.getDeviceId() + " and operation id - " +
mblDeviceOperationMapping.getOperationId() +
" to mapping table AD_DEVICE_OPERATION";
" to mapping table AD_DEVICE_OPERATION_MAPPING";
log.error(msg, e);
throw new MobileDeviceManagementDAOException(msg, e);
} finally {
@ -114,7 +114,7 @@ public class MobileDeviceOperationMappingDAOImpl implements MobileDeviceOperatio
} catch (SQLException e) {
String msg = "Error occurred while updating device id - '" +
mblDeviceOperation.getDeviceId() + " and operation id - " +
mblDeviceOperation.getOperationId() + " in table MBL_DEVICE_OPERATION";
mblDeviceOperation.getOperationId() + " in table AD_DEVICE_OPERATION_MAPPING";
log.error(msg, e);
throw new MobileDeviceManagementDAOException(msg, e);
} finally {
@ -151,7 +151,7 @@ public class MobileDeviceOperationMappingDAOImpl implements MobileDeviceOperatio
String msg =
"Error occurred while updating the Status of operation to in-progress of device id - '" +
mblDeviceId + " and operation id - " +
operationId + " in table MBL_DEVICE_OPERATION";
operationId + " in table AD_DEVICE_OPERATION_MAPPING";
log.error(msg, e);
throw new MobileDeviceManagementDAOException(msg, e);
} finally {
@ -189,7 +189,7 @@ public class MobileDeviceOperationMappingDAOImpl implements MobileDeviceOperatio
String msg =
"Error occurred while updating the Status of operation to completed of device id - '" +
mblDeviceId + " and operation id - " +
operationId + " in table MBL_DEVICE_OPERATION";
operationId + " in table AD_DEVICE_OPERATION_MAPPING";
log.error(msg, e);
throw new MobileDeviceManagementDAOException(msg, e);
} finally {
@ -280,7 +280,7 @@ public class MobileDeviceOperationMappingDAOImpl implements MobileDeviceOperatio
PreparedStatement stmt = null;
MobileDeviceOperationMapping mblDeviceOperation;
List<MobileDeviceOperationMapping> mblDeviceOperations =
new ArrayList<MobileDeviceOperationMapping>();
new ArrayList<>();
try {
conn = this.getConnection();
String selectDBQuery =
@ -303,7 +303,7 @@ public class MobileDeviceOperationMappingDAOImpl implements MobileDeviceOperatio
}
} catch (SQLException e) {
String msg =
"Error occurred while fetching mapping table MBL_DEVICE_OPERATION entries of " +
"Error occurred while fetching mapping table AD_DEVICE_OPERATION_MAPPING entries of " +
"device id - '" + mblDeviceId;
log.error(msg, e);
throw new MobileDeviceManagementDAOException(msg, e);
@ -321,7 +321,7 @@ public class MobileDeviceOperationMappingDAOImpl implements MobileDeviceOperatio
PreparedStatement stmt = null;
MobileDeviceOperationMapping mblDeviceOperation = null;
List<MobileDeviceOperationMapping> mblDeviceOperations =
new ArrayList<MobileDeviceOperationMapping>();
new ArrayList<>();
try {
conn = this.getConnection();

@ -36,7 +36,6 @@ import java.sql.SQLException;
*/
public class MobileOperationDAOImpl implements MobileOperationDAO {
public static final String COLUMN_OPERATION_ID = "OPERATION_ID";
private DataSource dataSource;
private static final Log log = LogFactory.getLog(MobileOperationDAOImpl.class);
@ -54,7 +53,7 @@ public class MobileOperationDAOImpl implements MobileOperationDAO {
conn = this.getConnection();
String createDBQuery =
"INSERT INTO AD_OPERATION(FEATURE_CODE, CREATED_DATE) VALUES ( ?, ?)";
stmt = conn.prepareStatement(createDBQuery, new String[] { COLUMN_OPERATION_ID });
stmt = conn.prepareStatement(createDBQuery, new String[] { "OPERATION_ID" });
stmt.setString(1, mblOperation.getFeatureCode());
stmt.setLong(2, mblOperation.getCreatedDate());
int rows = stmt.executeUpdate();
@ -70,7 +69,7 @@ public class MobileOperationDAOImpl implements MobileOperationDAO {
}
} catch (SQLException e) {
String msg = "Error occurred while adding the operation - '" +
mblOperation.getFeatureCode() + "' to MBL_OPERATION table";
mblOperation.getFeatureCode() + "' to AD_OPERATION table";
log.error(msg, e);
throw new MobileDeviceManagementDAOException(msg, e);
} finally {
@ -104,7 +103,7 @@ public class MobileOperationDAOImpl implements MobileOperationDAO {
}
} catch (SQLException e) {
String msg =
"Error occurred while updating the MBL_OPERATION table entry with operation id - '" +
"Error occurred while updating the AD_OPERATION table entry with operation id - '" +
mblOperation.getOperationId() + "'";
log.error(msg, e);
throw new MobileDeviceManagementDAOException(msg, e);
@ -135,7 +134,7 @@ public class MobileOperationDAOImpl implements MobileOperationDAO {
}
}
} catch (SQLException e) {
String msg = "Error occurred while deleting MBL_OPERATION entry with operation Id - ";
String msg = "Error occurred while deleting AD_OPERATION entry with operation Id - ";
log.error(msg, e);
throw new MobileDeviceManagementDAOException(msg, e);
} finally {

@ -70,7 +70,7 @@ public class MobileOperationPropertyDAOImpl implements MobileOperationPropertyDA
}
} catch (SQLException e) {
String msg =
"Error occurred while adding mobile operation property to MBL_OPERATION_PROPERTY " +
"Error occurred while adding mobile operation property to AD_OPERATION_PROPERTY " +
"table";
log.error(msg, e);
throw new MobileDeviceManagementDAOException(msg, e);
@ -107,7 +107,7 @@ public class MobileOperationPropertyDAOImpl implements MobileOperationPropertyDA
} catch (SQLException e) {
String msg =
"Error occurred while updating the mobile operation property in" +
" MBL_OPERATION_PROPERTY table.";
" AD_OPERATION_PROPERTY table.";
log.error(msg, e);
throw new MobileDeviceManagementDAOException(msg, e);
} finally {
@ -139,7 +139,7 @@ public class MobileOperationPropertyDAOImpl implements MobileOperationPropertyDA
}
} catch (SQLException e) {
String msg =
"Error occurred while deleting MBL_OPERATION_PROPERTY entry with operation Id - ";
"Error occurred while deleting AD_OPERATION_PROPERTY entry with operation Id - ";
log.error(msg, e);
throw new MobileDeviceManagementDAOException(msg, e);
} finally {
@ -193,7 +193,7 @@ public class MobileOperationPropertyDAOImpl implements MobileOperationPropertyDA
Connection conn = null;
PreparedStatement stmt = null;
MobileOperationProperty mobileOperationProperty;
List<MobileOperationProperty> properties = new ArrayList<MobileOperationProperty>();
List<MobileOperationProperty> properties = new ArrayList<>();
try {
conn = this.getConnection();
String selectDBQuery =

Loading…
Cancel
Save