Best Practices
Best Practices
httpHeaders.add("entityId", "DEFAULTENTITY");postConnection.setRequestMethod("POST");
postConnection.setRequestProperty("Content-Type", "application/json");
postConnection.setDoOutput(true);
postConnection.setRequestProperty("userId", headerDTO.getUserId());
postConnection.setRequestProperty("branchCode", headerDTO.getBranchCode());
postConnection.setRequestProperty("appId", "OBAC");
postConnection.setRequestProperty("authToken", "Y");
postConnection.setRequestProperty("entityId", "DEFAULTENTITY");
Optional Exception
Native Query/purgeLogs(insert into CMC_RH_AUDIT_EVENT_LOG_HISTORY/delete from CMC_RH_AUDIT_EVENT_L
obremo.rpm.cmn.hostservices/DocumentServiceUtilImpl
obremo.services.adapter.service.OBPayTxnLogServiceImpl
common query
common query
common query
(Exception e)
common query
oracle.fsgbu.cmc.services.obrh/purgeLogs,BaseAuditEventService/nativeQueryBuilder.ap
oracle.fsgbu.obremo.services.srv.adapter.web.api.CustomerWebApi
Remarks
Instead of hardcoding the static URL at the Class level, we can have the same at the table level which will help in a la
We already did that for the RoutingHub table.
Hard code value should be replaced and we can have the same in the database. So, that it will be dynamic.
For example:
entityId is hardcoded as "DEFAULTENTITY" across the business logic.
appId is also hardcoded, which we can get from the database.
Business logic should remove from interface layer and It should be in Implementation Layer.
In all the war files, object dto is framed by setting it one by one. Instead, we can use BeanUtils. copy-properties to se
getUrlById @NamedQueries({@NamedQuery(name = "SrvTbActions.getUrlById", query = "select o from SrvTbActio
Instead of using the named query, we can use the findById method to do the same operation in hibernate, which wi
We should use logger info, instead sysout.
To reduce the line of code for getter and setter in all POJO classes, we can go with @Data Lombok dependency to op
In most of the functionalities, the logger is not implemented properly and we're facing difficulties in encountering th
Instead of having a Generic Exception (Exception), we can define some specific user-defined exception and error me
Date/Time should move to common method/util and can be reusable over the project
To handle the Null pointer condition, we can have the exception using the Optional type.
Remove Native query from class like they have provided insert and delete query
getCustomerInfo - @ApiResponse(code = 201, message = "Create RT FCUBS Cash Withdrawal description", response
For fetching(GET-call), the HTTP status code should be 200.
Also, in the branch-common CREATE - orchestrator call, the HTTP status code is 200, instead of 201.