|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.acmsl.queryj.ConditionFactory
Has the responsiblity of knowing how to create conditions.
Nested Class Summary | |
protected static class |
ConditionFactory._AtomicConditionWrapper
Envelopes a condition surrounding it with appropiate prefix and suffix. |
protected static class |
ConditionFactory._ConditionWrapper
Envelopes a condition surrounding it with appropiate prefix and suffix. |
protected static class |
ConditionFactory._VariableConditionWrapper
Envelopes a variable condition surrounding it with appropiate prefix and suffix. |
Constructor Summary | |
protected |
ConditionFactory()
Protected constructor to avoid accidental instantiation. |
Method Summary | |
Condition |
createCondition(Field leftSideField,
ConditionOperator operator,
Field rightSideField)
Creates a condition |
Condition |
createCondition(Field leftSideField,
ConditionOperator operator,
int value)
Creates a condition |
VariableCondition |
createVariableCondition(Field field,
ConditionOperator operator)
Creates a variable condition. |
static ConditionFactory |
getInstance()
Retrieves a ConditionFactory instance. |
protected static java.lang.ref.WeakReference |
getReference()
Retrieves the weak reference. |
protected static void |
setReference(ConditionFactory factory)
Specifies a new weak reference. |
Condition |
wrap(AtomicCondition condition,
java.lang.String prefix,
java.lang.String suffix)
Creates a wrapper condition. |
Condition |
wrap(Condition condition,
java.lang.String prefix,
java.lang.String suffix)
Creates a wrapper condition. |
VariableCondition |
wrap(VariableCondition condition,
java.lang.String prefix,
java.lang.String suffix)
Creates a wrapper condition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected ConditionFactory()
Method Detail |
protected static void setReference(ConditionFactory factory)
factory
- the factory instance to use.protected static java.lang.ref.WeakReference getReference()
public static ConditionFactory getInstance()
public Condition createCondition(Field leftSideField, ConditionOperator operator, Field rightSideField)
leftSideField
- the left-side field.operator
- the operator.rightSideField
- the right-side field.
public Condition createCondition(Field leftSideField, ConditionOperator operator, int value)
leftSideField
- the left-side field.operator
- the operator.value
- the fixed value.
public VariableCondition createVariableCondition(Field field, ConditionOperator operator)
field
- the field.operator
- the operator.
public Condition wrap(Condition condition, java.lang.String prefix, java.lang.String suffix)
condition
- the condition to wrap.prefix
- the prefix.suffix
- the suffix.
public Condition wrap(AtomicCondition condition, java.lang.String prefix, java.lang.String suffix)
condition
- the condition to wrap.prefix
- the prefix.suffix
- the suffix.
public VariableCondition wrap(VariableCondition condition, java.lang.String prefix, java.lang.String suffix)
condition
- the condition to wrap.prefix
- the prefix.suffix
- the suffix.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |