1 package jp.sourceforge.ea2ddl.dao.cbean.bs;
\r
3 import java.util.Map;
\r
5 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.AbstractConditionBean;
\r
6 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.ConditionBean;
\r
7 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.ConditionQuery;
\r
8 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.SubQuery;
\r
9 import jp.sourceforge.ea2ddl.dao.allcommon.cbean.UnionQuery;
\r
10 import jp.sourceforge.ea2ddl.dao.cbean.*;
\r
11 import jp.sourceforge.ea2ddl.dao.cbean.cq.*;
\r
14 * The base condition-bean of t_html.
\r
15 * @author DBFlute(AutoGenerator)
\r
17 @SuppressWarnings("unchecked")
\r
18 public class BsTHtmlCB extends AbstractConditionBean {
\r
20 // ===================================================================================
\r
23 protected THtmlCQ _conditionQuery;
\r
25 // ===================================================================================
\r
28 public String getTableDbName() {
\r
32 public String getTableSqlName() {
\r
36 // ===================================================================================
\r
39 public void acceptPrimaryKeyMap(Map<String, ? extends Object> primaryKeyMap) {
\r
41 String msg = "This table has no primary-keys: " + getTableDbName();
\r
42 throw new IllegalStateException(msg);
\r
46 // ===================================================================================
\r
49 public ConditionBean addOrderBy_PK_Asc() {
\r
50 String msg = "This table has no primary-keys: " + getTableDbName();
\r
51 throw new IllegalStateException(msg);
\r
54 public ConditionBean addOrderBy_PK_Desc() {
\r
55 String msg = "This table has no primary-keys: " + getTableDbName();
\r
56 throw new IllegalStateException(msg);
\r
59 // ===================================================================================
\r
62 public THtmlCQ query() {
\r
63 return getConditionQuery();
\r
66 public THtmlCQ getConditionQuery() {
\r
67 if (_conditionQuery == null) {
\r
68 _conditionQuery = new THtmlCQ(null, getSqlClause(), getSqlClause().getLocalTableAliasName(), 0);
\r
70 return _conditionQuery;
\r
73 public ConditionQuery getConditionQueryAsInterface() {
\r
74 return getConditionQuery();
\r
77 // ===================================================================================
\r
83 * cb.query().union(new UnionQuery<THtmlCB>() {
\r
84 * public void query(THtmlCB unionCB) {
\r
85 * unionCB.query().setXxx...
\r
89 * @param unionQuery The query of 'union'. (NotNull)
\r
91 public void union(UnionQuery<THtmlCB> unionQuery) {
\r
92 final THtmlCB cb = new THtmlCB(); cb.xsetupForUnion(); unionQuery.query(cb);
\r
93 final THtmlCQ cq = cb.query(); query().xsetUnionQuery(cq);
\r
97 * Set up 'union all'.
\r
99 * cb.query().unionAll(new UnionQuery<THtmlCB>() {
\r
100 * public void query(THtmlCB unionCB) {
\r
101 * unionCB.query().setXxx...
\r
105 * @param unionQuery The query of 'union'. (NotNull)
\r
107 public void unionAll(UnionQuery<THtmlCB> unionQuery) {
\r
108 final THtmlCB cb = new THtmlCB(); cb.xsetupForUnion(); unionQuery.query(cb);
\r
109 final THtmlCQ cq = cb.query(); query().xsetUnionAllQuery(cq);
\r
113 * @param unionQuery The query of 'union'. (NotNull)
\r
114 * @deprecated Sorry! Please use union(UnionQuery<THtmlCB> unionQuery).
\r
116 public void union(THtmlCQ unionQuery) {
\r
117 query().xsetUnionQuery(unionQuery);
\r
121 * @param unionQuery The query of 'union'. (NotNull)
\r
122 * @deprecated Sorry! Please use unionAll(UnionQuery<THtmlCB> unionQuery).
\r
124 public void unionAll(THtmlCQ unionQuery) {
\r
125 query().xsetUnionAllQuery(unionQuery);
\r
128 public boolean hasUnionQueryOrUnionAllQuery() {
\r
129 return query().hasUnionQueryOrUnionAllQuery();
\r
132 // ===================================================================================
\r
137 // ===================================================================================
\r
140 protected Specification _specification;
\r
141 public Specification specify() {
\r
142 if (_specification == null) { _specification = new Specification(this, new SpQyCall<THtmlCQ>() {
\r
143 public boolean has() { return true; } public THtmlCQ qy() { return query(); } }, _forDeriveReferrer); } return _specification;
\r
145 public static class Specification extends AbstractSpecification<THtmlCQ> {
\r
146 protected SpQyCall<THtmlCQ> _myQyCall;
\r
147 public Specification(ConditionBean baseCB, SpQyCall<THtmlCQ> qyCall, boolean forDeriveReferrer) { super(baseCB, qyCall, forDeriveReferrer); _myQyCall = qyCall; }
\r
148 public void columnType() { doColumn("Type"); }
\r
149 public void columnTemplate() { doColumn("Template"); }
\r
150 protected void doSpecifyRequiredColumn() {
\r
152 protected String getTableDbName() { return "t_html"; }
\r
155 // Very Internal (for Suppressing Warn about 'Not Use Import')
\r
156 protected String getConditionBeanClassNameInternally() { return THtmlCB.class.getName(); }
\r
157 protected String getConditionQueryClassNameInternally() { return THtmlCQ.class.getName(); }
\r
158 protected String getSubQueryClassNameInternally() { return SubQuery.class.getName(); }
\r