@Test public void test_Should_Create_ReceivingMode_Valid() { final ReceivingModeTypeReq receivingModeRequest = getReceivingModeRequest(); final ReceivingModeType receivingMode = receivingModeRequest.getModeType(); receivingMode.getCode(); receivingMode.getName(); receivingMode.getDescription(); receivingMode.getActive(); Long.valueOf(receivingModeRequest.getRequestInfo().getUserInfo().getId()); Long.valueOf(receivingModeRequest.getRequestInfo().getUserInfo().getId()); new Date(new java.util.Date().getTime()); new Date(new java.util.Date().getTime()); receivingMode.getTenantId(); when(jdbcTemplate.update(any(String.class), any(Object[].class))).thenReturn(1); assertTrue(receivingModeRequest.equals(receivingModeRepository.persistReceivingModeType(receivingModeRequest))); }
public ReceivingModeTypeReq persistReceivingModeType(final ReceivingModeTypeReq modeTypeRequest) { LOGGER.info("ReceivingModeType Create Request::" + modeTypeRequest); final String receivingModeTypeInsert = ReceivingModeTypeQueryBuilder.insertReceivingModeTypeQuery(); final String receivingModeChannelInsert = ReceivingModeTypeQueryBuilder.insertReceivingModeChannelQuery(); final ReceivingModeType modeType = modeTypeRequest.getModeType(); final Object[] obj = new Object[]{modeType.getCode(), modeType.getName(), modeType.getDescription(), modeType.getActive(), Long.valueOf(modeTypeRequest.getRequestInfo().getUserInfo().getId()), Long.valueOf(modeTypeRequest.getRequestInfo().getUserInfo().getId()), new Date(new java.util.Date().getTime()), new Date(new java.util.Date().getTime()), modeType.getTenantId()}; jdbcTemplate.update(receivingModeTypeInsert, obj); insertReceivingModeChannel(modeType, receivingModeChannelInsert); return modeTypeRequest; }
ReceivingModeTypeRepository { public ReceivingModeTypeReq persistReceivingModeType(final ReceivingModeTypeReq modeTypeRequest) { LOGGER.info("ReceivingModeType Create Request::" + modeTypeRequest); final String receivingModeTypeInsert = ReceivingModeTypeQueryBuilder.insertReceivingModeTypeQuery(); final String receivingModeChannelInsert = ReceivingModeTypeQueryBuilder.insertReceivingModeChannelQuery(); final ReceivingModeType modeType = modeTypeRequest.getModeType(); final Object[] obj = new Object[]{modeType.getCode(), modeType.getName(), modeType.getDescription(), modeType.getActive(), Long.valueOf(modeTypeRequest.getRequestInfo().getUserInfo().getId()), Long.valueOf(modeTypeRequest.getRequestInfo().getUserInfo().getId()), new Date(new java.util.Date().getTime()), new Date(new java.util.Date().getTime()), modeType.getTenantId()}; jdbcTemplate.update(receivingModeTypeInsert, obj); insertReceivingModeChannel(modeType, receivingModeChannelInsert); return modeTypeRequest; } }
ReceivingModeTypeRepository { public ReceivingModeTypeReq persistReceivingModeType(final ReceivingModeTypeReq modeTypeRequest) { LOGGER.info("ReceivingModeType Create Request::" + modeTypeRequest); final String receivingModeTypeInsert = ReceivingModeTypeQueryBuilder.insertReceivingModeTypeQuery(); final String receivingModeChannelInsert = ReceivingModeTypeQueryBuilder.insertReceivingModeChannelQuery(); final ReceivingModeType modeType = modeTypeRequest.getModeType(); final Object[] obj = new Object[]{modeType.getCode(), modeType.getName(), modeType.getDescription(), modeType.getActive(), Long.valueOf(modeTypeRequest.getRequestInfo().getUserInfo().getId()), Long.valueOf(modeTypeRequest.getRequestInfo().getUserInfo().getId()), new Date(new java.util.Date().getTime()), new Date(new java.util.Date().getTime()), modeType.getTenantId()}; jdbcTemplate.update(receivingModeTypeInsert, obj); insertReceivingModeChannel(modeType, receivingModeChannelInsert); return modeTypeRequest; }  }
ReceivingModeTypeRepository { public ReceivingModeTypeReq persistReceivingModeType(final ReceivingModeTypeReq modeTypeRequest) { LOGGER.info("ReceivingModeType Create Request::" + modeTypeRequest); final String receivingModeTypeInsert = ReceivingModeTypeQueryBuilder.insertReceivingModeTypeQuery(); final String receivingModeChannelInsert = ReceivingModeTypeQueryBuilder.insertReceivingModeChannelQuery(); final ReceivingModeType modeType = modeTypeRequest.getModeType(); final Object[] obj = new Object[]{modeType.getCode(), modeType.getName(), modeType.getDescription(), modeType.getActive(), Long.valueOf(modeTypeRequest.getRequestInfo().getUserInfo().getId()), Long.valueOf(modeTypeRequest.getRequestInfo().getUserInfo().getId()), new Date(new java.util.Date().getTime()), new Date(new java.util.Date().getTime()), modeType.getTenantId()}; jdbcTemplate.update(receivingModeTypeInsert, obj); insertReceivingModeChannel(modeType, receivingModeChannelInsert); return modeTypeRequest; }  ReceivingModeTypeReq persistReceivingModeType(final ReceivingModeTypeReq modeTypeRequest); ReceivingModeTypeReq persistModifyReceivingModeType(final ReceivingModeTypeReq modeTypeRequest); List<ReceivingModeType> getAllReceivingModeTypes(final ReceivingModeTypeGetReq modeTypeGetRequest); boolean checkReceivingModeTypeByNameAndCode(final String code, final String name, final String tenantId, final String mode); boolean checkReceivingModeTypeByName(final String code, final String name, final String tenantId, final String mode); boolean checkReceivingModeTypeByCode(final String code, final String tenantId, final String mode); }
ReceivingModeTypeRepository { public ReceivingModeTypeReq persistReceivingModeType(final ReceivingModeTypeReq modeTypeRequest) { LOGGER.info("ReceivingModeType Create Request::" + modeTypeRequest); final String receivingModeTypeInsert = ReceivingModeTypeQueryBuilder.insertReceivingModeTypeQuery(); final String receivingModeChannelInsert = ReceivingModeTypeQueryBuilder.insertReceivingModeChannelQuery(); final ReceivingModeType modeType = modeTypeRequest.getModeType(); final Object[] obj = new Object[]{modeType.getCode(), modeType.getName(), modeType.getDescription(), modeType.getActive(), Long.valueOf(modeTypeRequest.getRequestInfo().getUserInfo().getId()), Long.valueOf(modeTypeRequest.getRequestInfo().getUserInfo().getId()), new Date(new java.util.Date().getTime()), new Date(new java.util.Date().getTime()), modeType.getTenantId()}; jdbcTemplate.update(receivingModeTypeInsert, obj); insertReceivingModeChannel(modeType, receivingModeChannelInsert); return modeTypeRequest; }  ReceivingModeTypeReq persistReceivingModeType(final ReceivingModeTypeReq modeTypeRequest); ReceivingModeTypeReq persistModifyReceivingModeType(final ReceivingModeTypeReq modeTypeRequest); List<ReceivingModeType> getAllReceivingModeTypes(final ReceivingModeTypeGetReq modeTypeGetRequest); boolean checkReceivingModeTypeByNameAndCode(final String code, final String name, final String tenantId, final String mode); boolean checkReceivingModeTypeByName(final String code, final String name, final String tenantId, final String mode); boolean checkReceivingModeTypeByCode(final String code, final String tenantId, final String mode); static final Logger LOGGER; }