1 package jp.sourceforge.ea2ddl.dao.bsbhv;
6 import jp.sourceforge.ea2ddl.dao.allcommon.*;
7 import jp.sourceforge.ea2ddl.dao.allcommon.bhv.setup.ValueLabelSetupper;
8 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.ConditionBean;
9 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.ListResultBean;
10 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.ResultBeanBuilder;
11 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.PagingHandler;
12 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.PagingInvoker;
13 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.PagingBean;
14 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.PagingResultBean;
15 import jp.sourceforge.ea2ddl.dao.allcommon.dbmeta.DBMeta;
16 import jp.sourceforge.ea2ddl.dao.exdao.*;
17 import jp.sourceforge.ea2ddl.dao.exentity.*;
18 import jp.sourceforge.ea2ddl.dao.bsentity.dbmeta.*;
19 import jp.sourceforge.ea2ddl.dao.cbean.*;
23 * The behavior of t_connector.
29 * Connector_ID, Name, Direction, Notes, Connector_Type, SubType, SourceCard, SourceAccess, SourceElement, DestCard, DestAccess, DestElement, SourceRole, SourceRoleType, SourceRoleNote, SourceContainment, SourceIsAggregate, SourceIsOrdered, SourceQualifier, DestRole, DestRoleType, DestRoleNote, DestContainment, DestIsAggregate, DestIsOrdered, DestQualifier, Start_Object_ID, End_Object_ID, Top_Start_Label, Top_Mid_Label, Top_End_Label, Btm_Start_Label, Btm_Mid_Label, Btm_End_Label, Start_Edge, End_Edge, PtStartX, PtStartY, PtEndX, PtEndY, SeqNo, HeadStyle, LineStyle, RouteStyle, IsBold, LineColor, Stereotype, VirtualInheritance, LinkAccess, PDATA1, PDATA2, PDATA3, PDATA4, PDATA5, DiagramID, ea_guid, SourceConstraint, DestConstraint, SourceIsNavigable, DestIsNavigable, IsRoot, IsLeaf, IsSpec, SourceChangeable, DestChangeable, SourceTS, DestTS, StateFlags, ActionFlags, IsSignal, IsStimulus, DispatchAction, Target2, StyleEx, SourceStereotype, DestStereotype, SourceStyle, DestStyle, EventFlags
41 * t_operation, t_object
47 * tOperationBySourcerole, tOperationByDestrole, tObjectByStartObjectId, tObjectByEndObjectId
52 * @author DBFlute(AutoGenerator)
54 public abstract class BsTConnectorBhv extends jp.sourceforge.ea2ddl.dao.allcommon.bhv.AbstractBehaviorReadable {
56 // ===================================================================================
59 /*df:BehaviorQueryPathBegin*/
60 public static final String PATH_selectForeignKeys = "selectForeignKeys";
61 /*df:BehaviorQueryPathEnd*/
63 // ===================================================================================
66 protected TConnectorDao _dao;
68 // ===================================================================================
71 /** @return The name on database of table. (NotNull) */
72 public String getTableDbName() { return "t_connector"; }
74 // ===================================================================================
77 /** @return The meta data of the database. (NotNull) */
78 public DBMeta getDBMeta() { return TConnectorDbm.getInstance(); }
80 /** @return The meta data of the database as my table type. (NotNull) */
81 public TConnectorDbm getMyDBMeta() { return TConnectorDbm.getInstance(); }
83 // ===================================================================================
86 public TConnectorDao getMyDao() { return _dao; }
87 public void setMyDao(TConnectorDao dao) { assertObjectNotNull("dao", dao); _dao = dao; }
88 public DaoReadable getDaoReadable() { return getMyDao(); }
90 // ===================================================================================
93 public Entity newEntity() { return newMyEntity(); }
94 public ConditionBean newConditionBean() { return newMyConditionBean(); }
95 public TConnector newMyEntity() { return new TConnector(); }
96 public TConnectorCB newMyConditionBean() { return new TConnectorCB(); }
98 // ===================================================================================
102 * Select the count of the condition-bean. {IgnorePagingCondition}
103 * @param cb The condition-bean of TConnector. (NotNull)
104 * @return The selected count.
106 public int selectCount(TConnectorCB cb) {
107 assertConditionBeanNotNull(cb);
108 return delegateSelectCount(cb);
111 // ===================================================================================
115 * Select the entity by the condition-bean.
116 * @param cb The condition-bean of TConnector. (NotNull)
117 * @return The selected entity. (Nullalble)
118 * @exception jp.sourceforge.ea2ddl.dao.allcommon.exception.EntityDuplicatedException When the entity has been duplicated.
120 public TConnector selectEntity(final TConnectorCB cb) {
121 return helpSelectEntityInternally(cb, new InternalSelectEntityCallback<TConnector, TConnectorCB>() {
122 public List<TConnector> callbackSelectList(TConnectorCB cb) { return selectList(cb); } });
126 * Select the entity by the condition-bean with deleted check.
127 * @param cb The condition-bean of TConnector. (NotNull)
128 * @return The selected entity. (NotNull)
129 * @exception jp.sourceforge.ea2ddl.dao.allcommon.exception.EntityAlreadyDeletedException When the entity has already been deleted.
130 * @exception jp.sourceforge.ea2ddl.dao.allcommon.exception.EntityDuplicatedException When the entity has been duplicated.
132 public TConnector selectEntityWithDeletedCheck(final TConnectorCB cb) {
133 return helpSelectEntityWithDeletedCheckInternally(cb, new InternalSelectEntityWithDeletedCheckCallback<TConnector, TConnectorCB>() {
134 public List<TConnector> callbackSelectList(TConnectorCB cb) { return selectList(cb); } });
138 // ===================================================================================
142 * Select the list as result bean.
143 * @param cb The condition-bean of TConnector. (NotNull)
144 * @return The result bean of selected list. (NotNull)
146 public ListResultBean<TConnector> selectList(TConnectorCB cb) {
147 assertConditionBeanNotNull(cb);
148 return new ResultBeanBuilder<TConnector>(getTableDbName()).buildListResultBean(cb, delegateSelectList(cb));
151 // ===================================================================================
155 * Select the page as result bean.
156 * @param cb The condition-bean of TConnector. (NotNull)
157 * @return The result bean of selected page. (NotNull)
159 public PagingResultBean<TConnector> selectPage(final TConnectorCB cb) {
160 assertConditionBeanNotNull(cb);
161 final PagingInvoker<TConnector> invoker = new PagingInvoker<TConnector>(getTableDbName());
162 final PagingHandler<TConnector> handler = new PagingHandler<TConnector>() {
163 public PagingBean getPagingBean() { return cb; }
164 public int count() { return selectCount(cb); }
165 public List<TConnector> paging() { return selectList(cb); }
167 return invoker.invokePaging(handler);
170 // ===================================================================================
174 * Select the list of value-label.
175 * @param cb The condition-bean of TConnector. (NotNull)
176 * @param valueLabelSetupper The setupper of value-label. (NotNull)
177 * @return The list of value-label. (NotNull)
179 public List<java.util.Map<String, Object>> selectValueLabelList(TConnectorCB cb, ValueLabelSetupper<TConnector> valueLabelSetupper) {
180 return createValueLabelList(selectList(cb), valueLabelSetupper);
185 // ===================================================================================
189 * Pull out the list of foreign table 'TOperation'.
190 * @param tConnectorList The list of tConnector. (NotNull)
191 * @return The list of foreign table. (NotNull)
193 public List<TOperation> pulloutTOperationBySourcerole(List<TConnector> tConnectorList) {
194 return helpPulloutInternally(tConnectorList, new InternalPulloutCallback<TConnector, TOperation>() {
195 public TOperation callbackGetForeignEntity(TConnector entity) { return entity.getTOperationBySourcerole(); } });
198 * Pull out the list of foreign table 'TOperation'.
199 * @param tConnectorList The list of tConnector. (NotNull)
200 * @return The list of foreign table. (NotNull)
202 public List<TOperation> pulloutTOperationByDestrole(List<TConnector> tConnectorList) {
203 return helpPulloutInternally(tConnectorList, new InternalPulloutCallback<TConnector, TOperation>() {
204 public TOperation callbackGetForeignEntity(TConnector entity) { return entity.getTOperationByDestrole(); } });
207 * Pull out the list of foreign table 'TObject'.
208 * @param tConnectorList The list of tConnector. (NotNull)
209 * @return The list of foreign table. (NotNull)
211 public List<TObject> pulloutTObjectByStartObjectId(List<TConnector> tConnectorList) {
212 return helpPulloutInternally(tConnectorList, new InternalPulloutCallback<TConnector, TObject>() {
213 public TObject callbackGetForeignEntity(TConnector entity) { return entity.getTObjectByStartObjectId(); } });
216 * Pull out the list of foreign table 'TObject'.
217 * @param tConnectorList The list of tConnector. (NotNull)
218 * @return The list of foreign table. (NotNull)
220 public List<TObject> pulloutTObjectByEndObjectId(List<TConnector> tConnectorList) {
221 return helpPulloutInternally(tConnectorList, new InternalPulloutCallback<TConnector, TObject>() {
222 public TObject callbackGetForeignEntity(TConnector entity) { return entity.getTObjectByEndObjectId(); } });
225 // ===================================================================================
228 // -----------------------------------------------------
231 protected int delegateSelectCount(TConnectorCB cb) { assertConditionBeanNotNull(cb); return getMyDao().selectCount(cb); }
232 protected List<TConnector> delegateSelectList(TConnectorCB cb) { assertConditionBeanNotNull(cb); return getMyDao().selectList(cb); }
234 // ===================================================================================
235 // Optimistic Lock Info
236 // ====================
238 protected boolean hasVersionNoValue(Entity entity) {
243 protected boolean hasUpdateDateValue(Entity entity) {
247 // ===================================================================================
250 protected TConnector downcast(Entity entity) {
251 return helpDowncastInternally(entity, TConnector.class);