Пример #1
0
 /** 保存(存在しなければ登録、存在すれば更新) */
 @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
 public RoleFunctionsEntity save(RoleFunctionsEntity entity) {
   RoleFunctionsEntity db = selectOnKey(entity.getFunctionKey(), entity.getRoleId());
   if (db == null) {
     return insert(entity);
   } else {
     return update(entity);
   }
 }
Пример #2
0
 /** 更新(更新ユーザを指定) */
 @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
 public RoleFunctionsEntity update(Integer user, RoleFunctionsEntity entity) {
   RoleFunctionsEntity db = selectOnKey(entity.getFunctionKey(), entity.getRoleId());
   entity.setInsertUser(db.getInsertUser());
   entity.setInsertDatetime(db.getInsertDatetime());
   entity.setDeleteFlag(db.getDeleteFlag());
   entity.setUpdateUser(user);
   entity.setUpdateDatetime(new Timestamp(new java.util.Date().getTime()));
   return physicalUpdate(entity);
 }
Пример #3
0
 /** 更新(データを生で操作) */
 @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
 public RoleFunctionsEntity physicalUpdate(RoleFunctionsEntity entity) {
   String sql =
       SQLManager.getInstance()
           .getSql(
               "/org/support/project/web/dao/sql/RoleFunctionsDao/RoleFunctionsDao_update.sql");
   executeUpdate(
       sql,
       entity.getRowId(),
       entity.getInsertUser(),
       entity.getInsertDatetime(),
       entity.getUpdateUser(),
       entity.getUpdateDatetime(),
       entity.getDeleteFlag(),
       entity.getFunctionKey(),
       entity.getRoleId());
   return entity;
 }
Пример #4
0
 /** 復元(論理削除されていたものを有効化) */
 @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
 public void activation(RoleFunctionsEntity entity) {
   activation(entity.getFunctionKey(), entity.getRoleId());
 }
Пример #5
0
 /** 削除(削除ユーザを指定/論理削除があれば論理削除) */
 @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
 public void delete(Integer user, RoleFunctionsEntity entity) {
   delete(user, entity.getFunctionKey(), entity.getRoleId());
 }
Пример #6
0
 /** 削除(データを生で操作/物理削除) */
 @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
 public void physicalDelete(RoleFunctionsEntity entity) {
   physicalDelete(entity.getFunctionKey(), entity.getRoleId());
 }