class RegistrationUnitRepository {

	public Boolean checkIdsAndTenantIdsFromDB(RegistrationUnit registrationUnit) {

		RegistrationUnitSearchCriteria regnUnitSearchIdAndTenantId = new RegistrationUnitSearchCriteria();
		regnUnitSearchIdAndTenantId.setId(registrationUnit.getId());
		regnUnitSearchIdAndTenantId.setTenantId(registrationUnit.getTenantId());

		String query = registrationUnitQueryBuilder.getSelectQuery(regnUnitSearchIdAndTenantId);

		try {
			@SuppressWarnings("unused")
			RegistrationUnit regnUnit = jdbcTemplate.queryForObject(query, rowMapper);
		} catch (DataAccessException e) {
			jdbcTemplate.execute("ROLLBACK");
			return false;
		}
		return true;
	}

}