1 package jp.sourceforge.ea2ddl.dao.bsbhv;
\r
4 import java.util.List;
\r
6 import jp.sourceforge.ea2ddl.dao.allcommon.*;
\r
7 import jp.sourceforge.ea2ddl.dao.allcommon.bhv.setup.ValueLabelSetupper;
\r
8 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.ConditionBean;
\r
9 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.ListResultBean;
\r
10 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.ResultBeanBuilder;
\r
11 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.PagingHandler;
\r
12 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.PagingInvoker;
\r
13 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.PagingBean;
\r
14 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.PagingResultBean;
\r
15 import jp.sourceforge.ea2ddl.dao.allcommon.dbmeta.DBMeta;
\r
16 import jp.sourceforge.ea2ddl.dao.exdao.*;
\r
17 import jp.sourceforge.ea2ddl.dao.exentity.*;
\r
18 import jp.sourceforge.ea2ddl.dao.bsentity.dbmeta.*;
\r
19 import jp.sourceforge.ea2ddl.dao.cbean.*;
\r
23 * The behavior of t_operation.
\r
29 * OperationID, Object_ID, Name, Scope, Type, ReturnArray, Stereotype, IsStatic, Concurrency, Notes, Behaviour, GenOption, Pos, Style, Pure, Classifier, Code, IsRoot, IsLeaf, IsQuery, StateFlags, ea_guid, StyleEx
\r
46 * [foreign-property]
\r
49 * [referrer-property]
\r
52 * @author DBFlute(AutoGenerator)
\r
54 public abstract class BsTOperationBhv extends jp.sourceforge.ea2ddl.dao.allcommon.bhv.AbstractBehaviorReadable {
\r
56 // ===================================================================================
\r
59 /*df:BehaviorQueryPathBegin*/
\r
60 /*df:BehaviorQueryPathEnd*/
\r
62 // ===================================================================================
\r
65 protected TOperationDao _dao;
\r
67 // ===================================================================================
\r
70 /** @return The name on database of table. (NotNull) */
\r
71 public String getTableDbName() { return "t_operation"; }
\r
73 // ===================================================================================
\r
76 /** @return The meta data of the database. (NotNull) */
\r
77 public DBMeta getDBMeta() { return TOperationDbm.getInstance(); }
\r
79 /** @return The meta data of the database as my table type. (NotNull) */
\r
80 public TOperationDbm getMyDBMeta() { return TOperationDbm.getInstance(); }
\r
82 // ===================================================================================
\r
85 public TOperationDao getMyDao() { return _dao; }
\r
86 public void setMyDao(TOperationDao dao) { assertObjectNotNull("dao", dao); _dao = dao; }
\r
87 public DaoReadable getDaoReadable() { return getMyDao(); }
\r
89 // ===================================================================================
\r
92 public Entity newEntity() { return newMyEntity(); }
\r
93 public ConditionBean newConditionBean() { return newMyConditionBean(); }
\r
94 public TOperation newMyEntity() { return new TOperation(); }
\r
95 public TOperationCB newMyConditionBean() { return new TOperationCB(); }
\r
97 // ===================================================================================
\r
101 * Select the count of the condition-bean. {IgnorePagingCondition}
\r
102 * @param cb The condition-bean of TOperation. (NotNull)
\r
103 * @return The selected count.
\r
105 public int selectCount(TOperationCB cb) {
\r
106 assertConditionBeanNotNull(cb);
\r
107 return delegateSelectCount(cb);
\r
110 // ===================================================================================
\r
114 * Select the entity by the condition-bean.
\r
115 * @param cb The condition-bean of TOperation. (NotNull)
\r
116 * @return The selected entity. (Nullalble)
\r
117 * @exception jp.sourceforge.ea2ddl.dao.allcommon.exception.EntityDuplicatedException When the entity has been duplicated.
\r
119 public TOperation selectEntity(final TOperationCB cb) {
\r
120 return helpSelectEntityInternally(cb, new InternalSelectEntityCallback<TOperation, TOperationCB>() {
\r
121 public List<TOperation> callbackSelectList(TOperationCB cb) { return selectList(cb); } });
\r
125 * Select the entity by the condition-bean with deleted check.
\r
126 * @param cb The condition-bean of TOperation. (NotNull)
\r
127 * @return The selected entity. (NotNull)
\r
128 * @exception jp.sourceforge.ea2ddl.dao.allcommon.exception.EntityAlreadyDeletedException When the entity has already been deleted.
\r
129 * @exception jp.sourceforge.ea2ddl.dao.allcommon.exception.EntityDuplicatedException When the entity has been duplicated.
\r
131 public TOperation selectEntityWithDeletedCheck(final TOperationCB cb) {
\r
132 return helpSelectEntityWithDeletedCheckInternally(cb, new InternalSelectEntityWithDeletedCheckCallback<TOperation, TOperationCB>() {
\r
133 public List<TOperation> callbackSelectList(TOperationCB cb) { return selectList(cb); } });
\r
137 // ===================================================================================
\r
141 * Select the list as result bean.
\r
142 * @param cb The condition-bean of TOperation. (NotNull)
\r
143 * @return The result bean of selected list. (NotNull)
\r
145 public ListResultBean<TOperation> selectList(TOperationCB cb) {
\r
146 assertConditionBeanNotNull(cb);
\r
147 return new ResultBeanBuilder<TOperation>(getTableDbName()).buildListResultBean(cb, delegateSelectList(cb));
\r
150 // ===================================================================================
\r
154 * Select the page as result bean.
\r
155 * @param cb The condition-bean of TOperation. (NotNull)
\r
156 * @return The result bean of selected page. (NotNull)
\r
158 public PagingResultBean<TOperation> selectPage(final TOperationCB cb) {
\r
159 assertConditionBeanNotNull(cb);
\r
160 final PagingInvoker<TOperation> invoker = new PagingInvoker<TOperation>(getTableDbName());
\r
161 final PagingHandler<TOperation> handler = new PagingHandler<TOperation>() {
\r
162 public PagingBean getPagingBean() { return cb; }
\r
163 public int count() { return selectCount(cb); }
\r
164 public List<TOperation> paging() { return selectList(cb); }
\r
166 return invoker.invokePaging(handler);
\r
169 // ===================================================================================
\r
173 * Select the list of value-label.
\r
174 * @param cb The condition-bean of TOperation. (NotNull)
\r
175 * @param valueLabelSetupper The setupper of value-label. (NotNull)
\r
176 * @return The list of value-label. (NotNull)
\r
178 public List<java.util.Map<String, Object>> selectValueLabelList(TOperationCB cb, ValueLabelSetupper<TOperation> valueLabelSetupper) {
\r
179 return createValueLabelList(selectList(cb), valueLabelSetupper);
\r
184 // ===================================================================================
\r
188 * Pull out the list of foreign table 'TObject'.
\r
189 * @param tOperationList The list of tOperation. (NotNull)
\r
190 * @return The list of foreign table. (NotNull)
\r
192 public List<TObject> pulloutTObject(List<TOperation> tOperationList) {
\r
193 return helpPulloutInternally(tOperationList, new InternalPulloutCallback<TOperation, TObject>() {
\r
194 public TObject callbackGetForeignEntity(TOperation entity) { return entity.getTObject(); } });
\r
197 // ===================================================================================
\r
200 // -----------------------------------------------------
\r
203 protected int delegateSelectCount(TOperationCB cb) { assertConditionBeanNotNull(cb); return getMyDao().selectCount(cb); }
\r
204 protected List<TOperation> delegateSelectList(TOperationCB cb) { assertConditionBeanNotNull(cb); return getMyDao().selectList(cb); }
\r
206 // ===================================================================================
\r
207 // Optimistic Lock Info
\r
208 // ====================
\r
210 protected boolean hasVersionNoValue(Entity entity) {
\r
215 protected boolean hasUpdateDateValue(Entity entity) {
\r
219 // ===================================================================================
\r
222 protected TOperation downcast(Entity entity) {
\r
223 return helpDowncastInternally(entity, TOperation.class);
\r