OSDN Git Service

EAからOracle用DDLが吐けるようになった
[ea2ddl/ea2ddl.git] / ea2ddl-dao / src / main / java / jp / sourceforge / ea2ddl / dao / bsbhv / BsTConnectorBhv.java
1 package jp.sourceforge.ea2ddl.dao.bsbhv;
2
3
4 import java.util.List;
5
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.*;
20
21
22 /**
23  * The behavior of t_connector.
24  * <pre>
25  * [primary-key]
26  *     
27  * 
28  * [column]
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
30  * 
31  * [sequence]
32  *     
33  * 
34  * [identity]
35  *     
36  * 
37  * [version-no]
38  *     
39  * 
40  * [foreign-table]
41  *     t_operation, t_object
42  * 
43  * [referrer-table]
44  *     
45  * 
46  * [foreign-property]
47  *     tOperationBySourcerole, tOperationByDestrole, tObjectByStartObjectId, tObjectByEndObjectId
48  * 
49  * [referrer-property]
50  *     
51  * </pre>
52  * @author DBFlute(AutoGenerator)
53  */
54 public abstract class BsTConnectorBhv extends jp.sourceforge.ea2ddl.dao.allcommon.bhv.AbstractBehaviorReadable {
55
56     // ===================================================================================
57     //                                                                          Definition
58     //                                                                          ==========
59     /*df:BehaviorQueryPathBegin*/
60     public static final String PATH_selectForeignKeys = "selectForeignKeys";
61     /*df:BehaviorQueryPathEnd*/
62
63     // ===================================================================================
64     //                                                                           Attribute
65     //                                                                           =========
66     protected TConnectorDao _dao;
67
68     // ===================================================================================
69     //                                                                          Table name
70     //                                                                          ==========
71     /** @return The name on database of table. (NotNull) */
72     public String getTableDbName() { return "t_connector"; }
73
74     // ===================================================================================
75     //                                                                              DBMeta
76     //                                                                              ======
77     /** @return The meta data of the database. (NotNull) */
78     public DBMeta getDBMeta() { return TConnectorDbm.getInstance(); }
79
80     /** @return The meta data of the database as my table type. (NotNull) */
81     public TConnectorDbm getMyDBMeta() { return TConnectorDbm.getInstance(); }
82
83     // ===================================================================================
84     //                                                                        Dao Accessor
85     //                                                                        ============
86     public TConnectorDao getMyDao() { return _dao; }
87     public void setMyDao(TConnectorDao dao) { assertObjectNotNull("dao", dao); _dao = dao; }
88     public DaoReadable getDaoReadable() { return getMyDao(); }
89
90     // ===================================================================================
91     //                                                                        New Instance
92     //                                                                        ============
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(); }
97
98     // ===================================================================================
99     //                                                                        Count Select
100     //                                                                        ============
101     /**
102      * Select the count of the condition-bean. {IgnorePagingCondition}
103      * @param cb The condition-bean of TConnector. (NotNull)
104      * @return The selected count.
105      */
106     public int selectCount(TConnectorCB cb) {
107         assertConditionBeanNotNull(cb);
108         return delegateSelectCount(cb);
109     }
110
111     // ===================================================================================
112     //                                                                       Entity Select
113     //                                                                       =============
114     /**
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.
119      */
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); } });
123     }
124
125     /**
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.
131      */
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); } });
135     }
136
137
138     // ===================================================================================
139     //                                                                         List Select
140     //                                                                         ===========
141     /**
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)
145      */
146     public ListResultBean<TConnector> selectList(TConnectorCB cb) {
147         assertConditionBeanNotNull(cb);
148         return new ResultBeanBuilder<TConnector>(getTableDbName()).buildListResultBean(cb, delegateSelectList(cb));
149     }
150
151     // ===================================================================================
152     //                                                                         Page Select
153     //                                                                         ===========
154     /**
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)
158      */
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); }
166         };
167         return invoker.invokePaging(handler);
168     }
169
170     // ===================================================================================
171     //                                                                      Various Select
172     //                                                                      ==============
173     /**
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)
178      */
179     public List<java.util.Map<String, Object>> selectValueLabelList(TConnectorCB cb, ValueLabelSetupper<TConnector> valueLabelSetupper) {
180         return createValueLabelList(selectList(cb), valueLabelSetupper);
181     }
182
183
184
185     // ===================================================================================
186     //                                                                     Pullout Foreign
187     //                                                                     ===============
188     /**
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)
192      */
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(); } });
196     }
197     /**
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)
201      */
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(); } });
205     }
206     /**
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)
210      */
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(); } });
214     }
215     /**
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)
219      */
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(); } });
223     }
224   
225     // ===================================================================================
226     //                                                                     Delegate Method
227     //                                                                     ===============
228     // -----------------------------------------------------
229     //                                                Select
230     //                                                ------
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); }
233
234     // ===================================================================================
235     //                                                                Optimistic Lock Info
236     //                                                                ====================
237     @Override
238     protected boolean hasVersionNoValue(Entity entity) {
239         return false;
240     }
241
242     @Override
243     protected boolean hasUpdateDateValue(Entity entity) {
244         return false;
245     }
246
247     // ===================================================================================
248     //                                                                              Helper
249     //                                                                              ======
250     protected TConnector downcast(Entity entity) {
251         return helpDowncastInternally(entity, TConnector.class);
252     }
253 }