1 package jp.sourceforge.ea2ddl.dao.cbean.cq.bs;
\r
3 import java.util.Map;
\r
5 import org.seasar.dbflute.cbean.*;
\r
6 import org.seasar.dbflute.cbean.cvalue.ConditionValue;
\r
7 import org.seasar.dbflute.cbean.sqlclause.SqlClause;
\r
8 import jp.sourceforge.ea2ddl.dao.cbean.cq.ciq.*;
\r
9 import jp.sourceforge.ea2ddl.dao.cbean.*;
\r
10 import jp.sourceforge.ea2ddl.dao.cbean.cq.*;
\r
13 * The base condition-query of t_objectproperties.
\r
14 * @author DBFlute(AutoGenerator)
\r
16 public class BsTObjectpropertiesCQ extends AbstractBsTObjectpropertiesCQ {
\r
18 // ===================================================================================
\r
21 protected TObjectpropertiesCIQ _inlineQuery;
\r
23 // ===================================================================================
\r
26 public BsTObjectpropertiesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) {
\r
27 super(childQuery, sqlClause, aliasName, nestLevel);
\r
30 // ===================================================================================
\r
34 * Prepare inline query. <br />
\r
35 * {select ... from ... left outer join (select * from t_objectproperties) where abc = [abc] ...}
\r
36 * @return Inline query. (NotNull)
\r
38 public TObjectpropertiesCIQ inline() {
\r
39 if (_inlineQuery == null) {
\r
40 _inlineQuery = new TObjectpropertiesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this);
\r
42 _inlineQuery.xsetOnClauseInline(false); return _inlineQuery;
\r
46 * Prepare on-clause query. <br />
\r
47 * {select ... from ... left outer join t_objectproperties on ... and abc = [abc] ...}
\r
48 * @return On-clause query. (NotNull)
\r
50 public TObjectpropertiesCIQ on() {
\r
51 if (isBaseQuery(this)) { throw new UnsupportedOperationException("Unsupported on-clause for local table!"); }
\r
52 TObjectpropertiesCIQ inlineQuery = inline(); inlineQuery.xsetOnClauseInline(true); return inlineQuery;
\r
55 // ===================================================================================
\r
59 protected ConditionValue _propertyid;
\r
60 public ConditionValue getPropertyid() {
\r
61 if (_propertyid == null) { _propertyid = new ConditionValue(); }
\r
64 protected ConditionValue getCValuePropertyid() { return getPropertyid(); }
\r
66 public BsTObjectpropertiesCQ addOrderBy_Propertyid_Asc() { regOBA("PropertyID"); return this; }
\r
67 public BsTObjectpropertiesCQ addOrderBy_Propertyid_Desc() { regOBD("PropertyID"); return this; }
\r
69 protected ConditionValue _objectId;
\r
70 public ConditionValue getObjectId() {
\r
71 if (_objectId == null) { _objectId = new ConditionValue(); }
\r
74 protected ConditionValue getCValueObjectId() { return getObjectId(); }
\r
76 protected Map<String, TObjectCQ> _objectId_InScopeSubQuery_TObjectMap;
\r
77 public Map<String, TObjectCQ> getObjectId_InScopeSubQuery_TObject() { return _objectId_InScopeSubQuery_TObjectMap; }
\r
78 public String keepObjectId_InScopeSubQuery_TObject(TObjectCQ subQuery) {
\r
79 if (_objectId_InScopeSubQuery_TObjectMap == null) { _objectId_InScopeSubQuery_TObjectMap = newLinkedHashMap(); }
\r
80 String key = "subQueryMapKey" + (_objectId_InScopeSubQuery_TObjectMap.size() + 1);
\r
81 _objectId_InScopeSubQuery_TObjectMap.put(key, subQuery); return "objectId_InScopeSubQuery_TObject." + key;
\r
84 public BsTObjectpropertiesCQ addOrderBy_ObjectId_Asc() { regOBA("Object_ID"); return this; }
\r
85 public BsTObjectpropertiesCQ addOrderBy_ObjectId_Desc() { regOBD("Object_ID"); return this; }
\r
87 protected ConditionValue _property;
\r
88 public ConditionValue getProperty() {
\r
89 if (_property == null) { _property = new ConditionValue(); }
\r
92 protected ConditionValue getCValueProperty() { return getProperty(); }
\r
94 public BsTObjectpropertiesCQ addOrderBy_Property_Asc() { regOBA("Property"); return this; }
\r
95 public BsTObjectpropertiesCQ addOrderBy_Property_Desc() { regOBD("Property"); return this; }
\r
97 protected ConditionValue _value;
\r
98 public ConditionValue getValue() {
\r
99 if (_value == null) { _value = new ConditionValue(); }
\r
102 protected ConditionValue getCValueValue() { return getValue(); }
\r
104 public BsTObjectpropertiesCQ addOrderBy_Value_Asc() { regOBA("Value"); return this; }
\r
105 public BsTObjectpropertiesCQ addOrderBy_Value_Desc() { regOBD("Value"); return this; }
\r
107 protected ConditionValue _notes;
\r
108 public ConditionValue getNotes() {
\r
109 if (_notes == null) { _notes = new ConditionValue(); }
\r
112 protected ConditionValue getCValueNotes() { return getNotes(); }
\r
114 public BsTObjectpropertiesCQ addOrderBy_Notes_Asc() { regOBA("Notes"); return this; }
\r
115 public BsTObjectpropertiesCQ addOrderBy_Notes_Desc() { regOBD("Notes"); return this; }
\r
117 protected ConditionValue _eaGuid;
\r
118 public ConditionValue getEaGuid() {
\r
119 if (_eaGuid == null) { _eaGuid = new ConditionValue(); }
\r
122 protected ConditionValue getCValueEaGuid() { return getEaGuid(); }
\r
124 public BsTObjectpropertiesCQ addOrderBy_EaGuid_Asc() { regOBA("ea_guid"); return this; }
\r
125 public BsTObjectpropertiesCQ addOrderBy_EaGuid_Desc() { regOBD("ea_guid"); return this; }
\r
127 // ===================================================================================
\r
128 // Specified Derived OrderBy
\r
129 // =========================
\r
130 public BsTObjectpropertiesCQ addSpecifiedDerivedOrderBy_Asc(String aliasName) { registerSpecifiedDerivedOrderBy_Asc(aliasName); return this; }
\r
131 public BsTObjectpropertiesCQ addSpecifiedDerivedOrderBy_Desc(String aliasName) { registerSpecifiedDerivedOrderBy_Desc(aliasName); return this; }
\r
133 // ===================================================================================
\r
136 protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) {
\r
137 TObjectpropertiesCQ baseQuery = (TObjectpropertiesCQ)baseQueryAsSuper;
\r
138 TObjectpropertiesCQ unionQuery = (TObjectpropertiesCQ)unionQueryAsSuper;
\r
139 if (baseQuery.hasConditionQueryTObject()) {
\r
140 unionQuery.queryTObject().reflectRelationOnUnionQuery(baseQuery.queryTObject(), unionQuery.queryTObject());
\r
144 // ===================================================================================
\r
147 public TObjectCQ queryTObject() {
\r
148 return getConditionQueryTObject();
\r
150 protected TObjectCQ _conditionQueryTObject;
\r
151 public TObjectCQ getConditionQueryTObject() {
\r
152 if (_conditionQueryTObject == null) {
\r
153 _conditionQueryTObject = xcreateQueryTObject();
\r
154 xsetupOuterJoinTObject();
\r
156 return _conditionQueryTObject;
\r
158 protected TObjectCQ xcreateQueryTObject() {
\r
159 String nrp = resolveNextRelationPath("t_objectproperties", "tObject");
\r
160 String jan = resolveJoinAliasName(nrp, getNextNestLevel());
\r
161 TObjectCQ cq = new TObjectCQ(this, getSqlClause(), jan, getNextNestLevel());
\r
162 cq.xsetForeignPropertyName("tObject"); cq.xsetRelationPath(nrp); return cq;
\r
164 protected void xsetupOuterJoinTObject() {
\r
165 TObjectCQ cq = getConditionQueryTObject();
\r
166 Map<String, String> joinOnMap = newLinkedHashMap();
\r
167 joinOnMap.put(getRealColumnName("Object_ID"), cq.getRealColumnName("Object_ID"));
\r
168 registerOuterJoin(cq, joinOnMap);
\r
170 public boolean hasConditionQueryTObject() {
\r
171 return _conditionQueryTObject != null;
\r
174 // ===================================================================================
\r
177 // Very Internal (for Suppressing Warn about 'Not Use Import')
\r
178 String xCB() { return TObjectpropertiesCB.class.getName(); }
\r
179 String xCQ() { return TObjectpropertiesCQ.class.getName(); }
\r
180 String xMap() { return Map.class.getName(); }
\r