com.sybase.persistence
Class AttributeTest

java.lang.Object
  extended by com.sybase.persistence.TestCriteria
      extended by com.sybase.persistence.AttributeTest
All Implemented Interfaces:
Filter

public class AttributeTest
extends TestCriteria

AttributeTest class specifies the attribute condition to be met for a Query. It is recommended to use the static methods to create instances of this class object.


Field Summary
static int CONTAINS
           
static int DOES_NOT_CONTAIN
           
static int DOES_NOT_END_WITH
           
static int DOES_NOT_START_WITH
           
static int ENDS_WITH
           
static int EQUAL
           
static int GREATER_EQUAL
           
static int GREATER_THAN
           
static int IS_NULL
           
static int LESS_EQUAL
           
static int LESS_THAN
           
static int LIKE
           
static int MATCH
           
static int NOT_EQUAL
           
static int NOT_LIKE
           
static int NOT_MATCH
           
static int NOT_NULL
           
static int STARTS_WITH
           
 
Constructor Summary
AttributeTest()
          Creates an instance of AttributeTest
AttributeTest(java.lang.String _attributeName, java.lang.String _testValue, int _operator)
          Creates an instance of AttributeTest
 
Method Summary
protected  void _init()
           
static AttributeTest equal(java.lang.String a, java.lang.String v)
          Creates an instance of AttributeTest which filter attribute equals the value
 java.lang.String getAttribute()
          Gets the attribute name to use for filter.
 java.lang.String getColumnName()
          Deprecated.  
 int getOperator()
          Gets the operator to use for filter.
 int getTestType()
          Deprecated.  
 java.lang.String getTestValue()
          Gets the test value to use for filter
static AttributeTest greaterEqual(java.lang.String a, java.lang.String v)
          Creates an instance of AttributeTest which attribute is greater than or equal to the value.
static AttributeTest greaterThan(java.lang.String a, java.lang.String v)
          Creates an instance of AttributeTest which attribute is greater than the value.
 AttributeTest initAttribute(java.lang.String _attribute)
          Sybase internal use only.
 AttributeTest initOperator(int _operator)
          Sybase internal use only.
 AttributeTest initTestValue(java.lang.String _testValue)
          Sybase internal use only.
static AttributeTest isNull(java.lang.String a)
          Creates an instance of AttributeTest which filter attribute is NULL
static AttributeTest lessEqual(java.lang.String a, java.lang.String v)
          Creates an instance of AttributeTest which attribute is less than or equal to the value.
static AttributeTest lessThan(java.lang.String a, java.lang.String v)
          Creates an instance of AttributeTest which attribute is less than the value.
static AttributeTest like(java.lang.String a, java.lang.String v)
          Creates an instance of AttributeTest which filter attribute like the value given.
static AttributeTest match(java.lang.String a, java.lang.String v)
          Sybase internal use only.
static AttributeTest notEqual(java.lang.String a, java.lang.String v)
          Creates an instance of AttributeTest which filter attribute does not equal the value
static AttributeTest notLike(java.lang.String a, java.lang.String v)
          Creates an instance of AttributeTest which filter attribute does not like the value given.
static AttributeTest notMatch(java.lang.String a, java.lang.String v)
          Sybase internal use only.
static AttributeTest notNull(java.lang.String a)
          Creates an instance of AttributeTest which filter attribute is not NULL
 void setAttribute(java.lang.String _attribute)
          Sets the attribute name to use for filter.
 void setColumnName(java.lang.String columnName)
          Deprecated.  
 void setOperator(int _operator)
          Sets the operator to use for filter.
 void setTestType(int testType)
          Deprecated.  
 void setTestValue(java.lang.String _testValue)
          Sets the test value to use for filter
 
Methods inherited from class com.sybase.persistence.TestCriteria
and, not, or
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IS_NULL

public static final int IS_NULL
See Also:
Constant Field Values

NOT_NULL

public static final int NOT_NULL
See Also:
Constant Field Values

EQUAL

public static final int EQUAL
See Also:
Constant Field Values

NOT_EQUAL

public static final int NOT_EQUAL
See Also:
Constant Field Values

LIKE

public static final int LIKE
See Also:
Constant Field Values

NOT_LIKE

public static final int NOT_LIKE
See Also:
Constant Field Values

MATCH

public static final int MATCH
See Also:
Constant Field Values

NOT_MATCH

public static final int NOT_MATCH
See Also:
Constant Field Values

LESS_THAN

public static final int LESS_THAN
See Also:
Constant Field Values

LESS_EQUAL

public static final int LESS_EQUAL
See Also:
Constant Field Values

GREATER_THAN

public static final int GREATER_THAN
See Also:
Constant Field Values

GREATER_EQUAL

public static final int GREATER_EQUAL
See Also:
Constant Field Values

CONTAINS

public static final int CONTAINS
See Also:
Constant Field Values

STARTS_WITH

public static final int STARTS_WITH
See Also:
Constant Field Values

ENDS_WITH

public static final int ENDS_WITH
See Also:
Constant Field Values

DOES_NOT_START_WITH

public static final int DOES_NOT_START_WITH
See Also:
Constant Field Values

DOES_NOT_END_WITH

public static final int DOES_NOT_END_WITH
See Also:
Constant Field Values

DOES_NOT_CONTAIN

public static final int DOES_NOT_CONTAIN
See Also:
Constant Field Values
Constructor Detail

AttributeTest

public AttributeTest()
Creates an instance of AttributeTest


AttributeTest

public AttributeTest(java.lang.String _attributeName,
                     java.lang.String _testValue,
                     int _operator)
Creates an instance of AttributeTest

Parameters:
_attributeName - The attribute name to filter.
_testValue - The value to use as the criteria for filter.
_operator - The filter type like EQUAL, NOT_EQUAL, DOES_NOT_CONTAIN ... .
Method Detail

initAttribute

public AttributeTest initAttribute(java.lang.String _attribute)
Sybase internal use only.


getAttribute

public java.lang.String getAttribute()
Gets the attribute name to use for filter.


setAttribute

public void setAttribute(java.lang.String _attribute)
Sets the attribute name to use for filter.

Parameters:
_attribute - attribute name

initOperator

public AttributeTest initOperator(int _operator)
Sybase internal use only.


getOperator

public int getOperator()
Gets the operator to use for filter.


setOperator

public void setOperator(int _operator)
Sets the operator to use for filter.

Parameters:
_operator - the operator

initTestValue

public AttributeTest initTestValue(java.lang.String _testValue)
Sybase internal use only.


getTestValue

public java.lang.String getTestValue()
Gets the test value to use for filter


setTestValue

public void setTestValue(java.lang.String _testValue)
Sets the test value to use for filter

Parameters:
_testValue - the test value

getColumnName

public java.lang.String getColumnName()
Deprecated. 


setColumnName

public void setColumnName(java.lang.String columnName)
Deprecated. 


getTestType

public int getTestType()
Deprecated. 

Gets filter type


setTestType

public void setTestType(int testType)
Deprecated. 

Sets filter type

Parameters:
testType - the filter type

isNull

public static AttributeTest isNull(java.lang.String a)
Creates an instance of AttributeTest which filter attribute is NULL

Parameters:
a - The attribute name to filter.

notNull

public static AttributeTest notNull(java.lang.String a)
Creates an instance of AttributeTest which filter attribute is not NULL

Parameters:
a - The attribute name to filter.

equal

public static AttributeTest equal(java.lang.String a,
                                  java.lang.String v)
Creates an instance of AttributeTest which filter attribute equals the value

Parameters:
a - The attribute name to filter.
v - The value to used as criteria to filter.

notEqual

public static AttributeTest notEqual(java.lang.String a,
                                     java.lang.String v)
Creates an instance of AttributeTest which filter attribute does not equal the value

Parameters:
a - The attribute name to filter.
v - The value to used as criteria to filter.

like

public static AttributeTest like(java.lang.String a,
                                 java.lang.String v)
Creates an instance of AttributeTest which filter attribute like the value given. Same as Contains.

Parameters:
a - The attribute name to filter.
v - The value to used as criteria to filter.

notLike

public static AttributeTest notLike(java.lang.String a,
                                    java.lang.String v)
Creates an instance of AttributeTest which filter attribute does not like the value given. Same as not contains.

Parameters:
a - The attribute name to filter.
v - The value to used as criteria to filter.

match

public static AttributeTest match(java.lang.String a,
                                  java.lang.String v)
Sybase internal use only.


notMatch

public static AttributeTest notMatch(java.lang.String a,
                                     java.lang.String v)
Sybase internal use only.


lessThan

public static AttributeTest lessThan(java.lang.String a,
                                     java.lang.String v)
Creates an instance of AttributeTest which attribute is less than the value.

Parameters:
a - The attribute name to filter.
v - The value to used as criteria to filter.

lessEqual

public static AttributeTest lessEqual(java.lang.String a,
                                      java.lang.String v)
Creates an instance of AttributeTest which attribute is less than or equal to the value.

Parameters:
a - The attribute name to filter.
v - The value to used as criteria to filter.

greaterThan

public static AttributeTest greaterThan(java.lang.String a,
                                        java.lang.String v)
Creates an instance of AttributeTest which attribute is greater than the value.

Parameters:
a - The attribute name to filter.
v - The value to used as criteria to filter.

greaterEqual

public static AttributeTest greaterEqual(java.lang.String a,
                                         java.lang.String v)
Creates an instance of AttributeTest which attribute is greater than or equal to the value.

Parameters:
a - The attribute name to filter.
v - The value to used as criteria to filter.

_init

protected void _init()
Overrides:
_init in class TestCriteria