コード例 #1
0
 @Override
 public UserAccount create(UserAccount userAccount) {
   UserAccount createdUserAccount = null;
   Number generatedId =
       extendedJDBCTemplate.addAndReturnGeneratedKey(CREATE, userAccountMapper, userAccount);
   if (generatedId != null) {
     createdUserAccount = cloneUserAccount(userAccount);
     createdUserAccount.setUserAccountId(generatedId.longValue());
   }
   return userAccount;
 }
コード例 #2
0
 @Override
 public boolean isUserAccountExist(long userAccountId) {
   return extendedJDBCTemplate.queryForObject(IS_USER_ACCOUNT_EXIST, Integer.class, userAccountId)
       > 0;
 }
コード例 #3
0
 @Override
 public boolean update(UserAccount userAccount) {
   return extendedJDBCTemplate.updateEntity(UPDATE, userAccountMapper, userAccount) > 0;
 }
コード例 #4
0
 @Override
 public boolean deleteUserAccountByUser(long userId) {
   return extendedJDBCTemplate.update(DELETE_BY_USER_ID, userId) > 0;
 }
コード例 #5
0
 @Override
 public boolean deleteUserAccountById(long userAccountId) {
   return extendedJDBCTemplate.update(DELETE_BY_ID, Integer.class, userAccountId) > 0;
 }
コード例 #6
0
 @Override
 public UserAccount getUserAccountById(long userAccountId) {
   return extendedJDBCTemplate.queryForObject(GET_BY_ID, userAccountMapper, userAccountId);
 }