Compoze Software, Inc.

com.compoze.exchange.webdav.sql
Class AbstractPredicate


java.lang.Object

  |

  +--com.compoze.exchange.webdav.sql.AbstractSqlFragment

        |

        +--com.compoze.exchange.webdav.sql.AbstractPredicate

All Implemented Interfaces:
IPredicate, ISqlFragment, java.io.Serializable
Direct Known Subclasses:
ContainsPredicate, LikePredicate

public abstract class AbstractPredicate
extends AbstractSqlFragment
implements IPredicate, java.io.Serializable

The class provides default implementations for SQL predicates. Standard behaviors like setting the field and setting the value are defined here. The developer need only subclass this abstract class and define the toSQL() method.

See Also:
Serialized Form

Field Summary
protected  java.lang.String m_sPropName
           
protected  java.lang.Object[] m_values
           
 
Constructor Summary
protected AbstractPredicate(java.lang.String sPropName, java.lang.Object value)
          Constructor.
protected AbstractPredicate(java.lang.String sPropName, java.lang.Object[] values)
          Constructor.
 
Method Summary
 java.lang.String getName()
          Gets the name of the property.
 java.lang.Object getValue()
          Gets the value of the property.
 java.lang.Object[] getValues()
          Gets an array of values of the property.
abstract  java.lang.String toSQL()
          Returns a string representation of the clause.
 
Methods inherited from class com.compoze.exchange.webdav.sql.AbstractSqlFragment
escape, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_sPropName


protected java.lang.String m_sPropName

m_values


protected java.lang.Object[] m_values
Constructor Detail

AbstractPredicate


protected AbstractPredicate(java.lang.String sPropName,
                            java.lang.Object value)
Constructor.
Parameters:
sPropName - the property name.
value - the value of the property.

AbstractPredicate


protected AbstractPredicate(java.lang.String sPropName,
                            java.lang.Object[] values)
Constructor.
Parameters:
sPropName - the property name.
values - array of values of the property.
Method Detail

getName


public java.lang.String getName()
Gets the name of the property.
Specified by:
getName in interface IPredicate
Returns:
the name of the property.

getValue


public java.lang.Object getValue()
Gets the value of the property.
Specified by:
getValue in interface IPredicate
Returns:
the value of the property.

getValues


public java.lang.Object[] getValues()
Gets an array of values of the property.
Returns:
an array of values of the property.

toSQL


public abstract java.lang.String toSQL()
Returns a string representation of the clause.
Specified by:
toSQL in interface ISqlFragment
Overrides:
toSQL in class AbstractSqlFragment
Returns:
the string representation of the clause.

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.