001: /*******************************************************************************
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: *******************************************************************************/package org.ofbiz.shark.expression;
019:
020: import org.enhydra.shark.api.common.ProcessMgrIteratorExpressionBuilder;
021: import org.ofbiz.base.util.Debug;
022: import org.ofbiz.entity.condition.EntityExpr;
023: import org.ofbiz.entity.condition.EntityOperator;
024:
025: public class ProcessMgrIteratorCondExprBldr extends
026: BaseEntityCondExprBldr implements
027: ProcessMgrIteratorExpressionBuilder {
028:
029: /**
030: *
031: */
032: private static final long serialVersionUID = 1L;
033:
034: public ProcessMgrIteratorCondExprBldr() {
035: this .addEntity("WFPM",
036: org.ofbiz.shark.SharkConstants.WfProcessMgr);
037: this .addAllFields("WFPM");
038: }
039:
040: public ProcessMgrIteratorExpressionBuilder and() {
041: this .setOr(false);
042: return this ;
043: }
044:
045: public ProcessMgrIteratorExpressionBuilder or() {
046: this .setOr(true);
047: return this ;
048: }
049:
050: public ProcessMgrIteratorExpressionBuilder not() {
051: this .setNot(true);
052: return this ;
053: }
054:
055: public ProcessMgrIteratorExpressionBuilder addPackageIdEquals(
056: String s) {
057: this .addCondition(new EntityExpr(
058: org.ofbiz.shark.SharkConstants.packageId,
059: isNotSet ? EntityOperator.NOT_EQUAL
060: : EntityOperator.EQUALS, s));
061: return this ;
062: }
063:
064: public ProcessMgrIteratorExpressionBuilder addProcessDefIdEquals(
065: String s) {
066: this .addCondition(new EntityExpr(
067: org.ofbiz.shark.SharkConstants.definitionId,
068: isNotSet ? EntityOperator.NOT_EQUAL
069: : EntityOperator.EQUALS, s));
070: return this ;
071: }
072:
073: public ProcessMgrIteratorExpressionBuilder addNameEquals(String s) {
074: this .addCondition(new EntityExpr(
075: org.ofbiz.shark.SharkConstants.mgrName,
076: isNotSet ? EntityOperator.NOT_EQUAL
077: : EntityOperator.EQUALS, s));
078: return this ;
079: }
080:
081: public ProcessMgrIteratorExpressionBuilder addVersionEquals(String s) {
082: this .addCondition(new EntityExpr(
083: org.ofbiz.shark.SharkConstants.packageVer,
084: isNotSet ? EntityOperator.NOT_EQUAL
085: : EntityOperator.EQUALS, s));
086: return this ;
087: }
088:
089: public ProcessMgrIteratorExpressionBuilder addIsEnabled() {
090: this .addCondition(new EntityExpr(
091: org.ofbiz.shark.SharkConstants.currentState,
092: isNotSet ? EntityOperator.NOT_EQUAL
093: : EntityOperator.EQUALS, new Long(0)));
094: return this ;
095: }
096:
097: public ProcessMgrIteratorExpressionBuilder addExpression(String s) {
098: ProcessMgrIteratorExpressionBuilder builder = (ProcessMgrIteratorExpressionBuilder) BaseEntityCondExprBldr
099: .getBuilder(s);
100: if (builder != null) {
101: return this .addExpression(builder);
102: } else {
103: return this ;
104: }
105: }
106:
107: public ProcessMgrIteratorExpressionBuilder addExpression(
108: ProcessMgrIteratorExpressionBuilder builder) {
109: if (!(builder instanceof BaseEntityCondExprBldr)) {
110: throw new UnsupportedOperationException(
111: "Unsupported implementation");
112: } else {
113: this .addCondition(((BaseEntityCondExprBldr) builder)
114: .getCondition());
115: }
116: return this ;
117: }
118:
119: public ProcessMgrIteratorExpressionBuilder addCreatedTimeEquals(
120: long arg0) {
121: Debug
122: .logInfo(
123: "Call : ProcessMgrIteratorExpressionBuilder addCreatedTimeEquals(long arg0)",
124: module);
125: return null;
126: }
127:
128: public ProcessMgrIteratorExpressionBuilder addCreatedTimeBefore(
129: long arg0) {
130: Debug
131: .logInfo(
132: "Call : ProcessMgrIteratorExpressionBuilder addCreatedTimeBefore(long arg0)",
133: module);
134: return null;
135: }
136:
137: public ProcessMgrIteratorExpressionBuilder addCreatedTimeAfter(
138: long arg0) {
139: Debug
140: .logInfo(
141: "Call : ProcessMgrIteratorExpressionBuilder addCreatedTimeAfter(long arg0)",
142: module);
143: return null;
144: }
145:
146: public ProcessMgrIteratorExpressionBuilder setOrderByPackageId(
147: boolean arg0) {
148: Debug
149: .logInfo(
150: "Call : ProcessMgrIteratorExpressionBuilder setOrderByPackageId(boolean arg0)",
151: module);
152: return null;
153: }
154:
155: public ProcessMgrIteratorExpressionBuilder setOrderByProcessDefId(
156: boolean arg0) {
157: Debug
158: .logInfo(
159: "Call : ProcessMgrIteratorExpressionBuilder setOrderByProcessDefId(boolean arg0)",
160: module);
161: return null;
162: }
163:
164: public ProcessMgrIteratorExpressionBuilder setOrderByName(
165: boolean arg0) {
166: Debug
167: .logInfo(
168: "Call : ProcessMgrIteratorExpressionBuilder setOrderByName(boolean arg0)",
169: module);
170: return null;
171: }
172:
173: public ProcessMgrIteratorExpressionBuilder setOrderByVersion(
174: boolean arg0) {
175: Debug
176: .logInfo(
177: "Call : ProcessMgrIteratorExpressionBuilder setOrderByVersion(boolean arg0)",
178: module);
179: return null;
180: }
181:
182: public ProcessMgrIteratorExpressionBuilder setOrderByCreatedTime(
183: boolean arg0) {
184: Debug
185: .logInfo(
186: "Call : ProcessMgrIteratorExpressionBuilder setOrderByCreatedTime(boolean arg0)",
187: module);
188: return null;
189: }
190:
191: public ProcessMgrIteratorExpressionBuilder setOrderByEnabled(
192: boolean arg0) {
193: Debug
194: .logInfo(
195: "Call : ProcessMgrIteratorExpressionBuilder setOrderByEnabled(boolean arg0)",
196: module);
197: return null;
198: }
199: }
|