org.acmsl.queryj
Class ConditionFactory._ConditionWrapper

java.lang.Object
  |
  +--org.acmsl.queryj.Condition
        |
        +--org.acmsl.queryj.ConditionFactory._ConditionWrapper
Enclosing class:
ConditionFactory

protected static class ConditionFactory._ConditionWrapper
extends Condition

Envelopes a condition surrounding it with appropiate prefix and suffix.

Version:
$Revision: 1.1 $
Author:
Jose San Leandro

Constructor Summary
ConditionFactory._ConditionWrapper(Condition condition, java.lang.String prefix, java.lang.String suffix)
          Creates a condition wrapper with given information.
 
Method Summary
 Condition and(Condition condition)
          Requests AND evaluation with given condition.
 Condition getCondition()
          Retrieves the wrapped condition.
 java.lang.String getPrefix()
          Retrieves the prefix.
 java.lang.String getSuffix()
          Retrieves the suffix.
 Condition or(Condition condition)
          Requests OR evaluation with given condition.
protected  void setCondition(Condition condition)
          Specifies the condition to wrap.
protected  void setPrefix(java.lang.String prefix)
          Specifies the prefix.
protected  void setSuffix(java.lang.String suffix)
          Specifies the suffix.
 java.lang.String toString()
          Outputs a text version of the condition.
 
Methods inherited from class org.acmsl.queryj.Condition
getInnerCondition, setInnerCondition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConditionFactory._ConditionWrapper

public ConditionFactory._ConditionWrapper(Condition condition,
                                          java.lang.String prefix,
                                          java.lang.String suffix)
Creates a condition wrapper with given information.

Parameters:
condition - the condition to wrap.
prefix - the prefix.
suffix - the suffix.
Method Detail

setCondition

protected void setCondition(Condition condition)
Specifies the condition to wrap.

Parameters:
condition - such condition.

getCondition

public Condition getCondition()
Retrieves the wrapped condition.

Returns:
such condition.

setPrefix

protected void setPrefix(java.lang.String prefix)
Specifies the prefix.

Parameters:
prefix - such prefix.

getPrefix

public java.lang.String getPrefix()
Retrieves the prefix.

Returns:
such prefix.

setSuffix

protected void setSuffix(java.lang.String suffix)
Specifies the suffix.

Parameters:
suffix - such suffix.

getSuffix

public java.lang.String getSuffix()
Retrieves the suffix.

Returns:
such suffix.

or

public Condition or(Condition condition)
Requests OR evaluation with given condition.

Overrides:
or in class Condition
Parameters:
condition - the condition to evaluate.
Returns:
the resulting condition.

and

public Condition and(Condition condition)
Requests AND evaluation with given condition.

Overrides:
and in class Condition
Parameters:
condition - the condition to evaluate.
Returns:
the resulting condition.

toString

public java.lang.String toString()
Outputs a text version of the condition.

Overrides:
toString in class Condition
Returns:
such text.


Copyright © 2003 ACM S.L.. All Rights Reserved.