org.norther.tammi.root.db.query
Class DBCriteriaAdapter

java.lang.Object
  extended by org.norther.tammi.root.db.query.DBCriteriaAdapter
All Implemented Interfaces:
DBCriteria
Direct Known Subclasses:
HibernateCriteria, OJBCriteria, XMLQueryCriteria

public abstract class DBCriteriaAdapter
extends Object
implements DBCriteria

An abstract criteria adapter.

Author:
Ilkka Priha

Field Summary
 
Fields inherited from interface org.norther.tammi.root.db.query.DBCriteria
CLASS_ATTRIBUTE, EQ, GE, GT, IN, LE, LIKE, LT, NEQ, NIN, NONE, OBJECT_NAME_ATTRIBUTE
 
Constructor Summary
DBCriteriaAdapter(Object adapt)
          Constructs new criteria with an adaptee.
 
Method Summary
 DBCriteria add(DBAttribute attribute, boolean union)
          Adds an attribute criteria.
 DBCriteria add(List attributes, boolean union)
          Adds an attribute list criteria.
 DBCriteria add(Map attributes, int condition, boolean union)
          Adds an attribute map criteria.
 Object getAdaptee()
          Gets the implementation specific criteria adaptee, if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.norther.tammi.root.db.query.DBCriteria
add, add, negate
 

Constructor Detail

DBCriteriaAdapter

public DBCriteriaAdapter(Object adapt)
Constructs new criteria with an adaptee.

Parameters:
adapt - the criteria adaptee.
Method Detail

getAdaptee

public Object getAdaptee()
Description copied from interface: DBCriteria
Gets the implementation specific criteria adaptee, if any.

Specified by:
getAdaptee in interface DBCriteria
Returns:
the adaptee or null.

add

public DBCriteria add(DBAttribute attribute,
                      boolean union)
Description copied from interface: DBCriteria
Adds an attribute criteria.

If exact match is not required, the value can be a pattern with well known wildcard characters such as '*', '?', or in the case of SQL '%'.

Specified by:
add in interface DBCriteria
Parameters:
attribute - the attribute to form the search criteria.
union - the flag for a union.
Returns:
the modified criteria.

add

public DBCriteria add(List attributes,
                      boolean union)
Description copied from interface: DBCriteria
Adds an attribute list criteria.

If exact match is not required, the value can be a pattern with well known wildcard characters such as '*', '?', or in the case of SQL '%'.

Specified by:
add in interface DBCriteria
Parameters:
attributes - a list of attributes to form the search criteria.
union - a flag to indicate whether the criteria should be a union.
Returns:
the modified criteria.

add

public DBCriteria add(Map attributes,
                      int condition,
                      boolean union)
Description copied from interface: DBCriteria
Adds an attribute map criteria.

If exact match is not required, the value can be a pattern with well known wildcard characters such as '*', '?', or in the case of SQL '%'.

Specified by:
add in interface DBCriteria
Parameters:
attributes - a map of attributes to form the search criteria.
condition - the condition for the criteria.
union - the flag for a union.
Returns:
the modified criteria.


Copyright © 2004 The Norther Organization. All rights reserved.