@Override public void setEntityAudit(int customerId, String userId) { if (entityAudit == null) { entityAudit = new EntityAudit(); } if (getPrimaryKey() == null) { this.entityAudit.setCreatedBy(userId); this.systemInfo.setActiveStatus(1); } else { this.entityAudit.setUpdatedBy(userId); } if (this.roleMenuBridge == null) { this.roleMenuBridge = new java.util.ArrayList<RoleMenuBridge>(); } for (RoleMenuBridge _roleMenuBridge : roleMenuBridge) { _roleMenuBridge.setEntityAudit(customerId, userId); } }
@Override public void setEntityAudit(int customerId, String userId, RECORD_TYPE recordType) { System.out.println("Setting logged in user info for " + recordType); if (entityAudit == null) { entityAudit = new EntityAudit(); } if (recordType == RECORD_TYPE.ADD) { this.entityAudit.setCreatedBy(userId); } else { this.entityAudit.setUpdatedBy(userId); } setSystemInformation(recordType); if (this.roleMenuBridge == null) { this.roleMenuBridge = new java.util.ArrayList<RoleMenuBridge>(); } for (RoleMenuBridge _roleMenuBridge : roleMenuBridge) { _roleMenuBridge.setEntityAudit(customerId, userId, recordType); _roleMenuBridge.setSystemInformation(recordType); } }