Beispiel #1
0
 /** 復元(論理削除されていたものを有効化) */
 @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
 public void activation(Integer user, String functionKey, Integer roleId) {
   RoleFunctionsEntity db = physicalSelectOnKey(functionKey, roleId);
   db.setDeleteFlag(0);
   db.setUpdateUser(user);
   db.setUpdateDatetime(new Timestamp(new java.util.Date().getTime()));
   physicalUpdate(db);
 }
Beispiel #2
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);
   }
 }
Beispiel #3
0
 /** 登録(登録ユーザを指定) */
 @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
 public RoleFunctionsEntity insert(Integer user, RoleFunctionsEntity entity) {
   entity.setInsertUser(user);
   entity.setInsertDatetime(new Timestamp(new java.util.Date().getTime()));
   entity.setUpdateUser(user);
   entity.setUpdateDatetime(new Timestamp(new java.util.Date().getTime()));
   entity.setDeleteFlag(0);
   entity.setRowId(createRowId());
   return physicalInsert(entity);
 }
Beispiel #4
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;
 }
Beispiel #5
0
 /** 復元(論理削除されていたものを有効化) */
 @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
 public void activation(RoleFunctionsEntity entity) {
   activation(entity.getFunctionKey(), entity.getRoleId());
 }
Beispiel #6
0
 /** 削除(削除ユーザを指定/論理削除があれば論理削除) */
 @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
 public void delete(Integer user, RoleFunctionsEntity entity) {
   delete(user, entity.getFunctionKey(), entity.getRoleId());
 }
Beispiel #7
0
 /** 削除(データを生で操作/物理削除) */
 @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
 public void physicalDelete(RoleFunctionsEntity entity) {
   physicalDelete(entity.getFunctionKey(), entity.getRoleId());
 }
Beispiel #8
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);
 }