org.norther.tammi.root.ojb.query
Class OJBCriteria

java.lang.Object
  extended by org.norther.tammi.root.db.query.DBCriteriaAdapter
      extended by org.norther.tammi.root.ojb.query.OJBCriteria
All Implemented Interfaces:
Serializable, DBCriteria

public class OJBCriteria
extends DBCriteriaAdapter
implements Serializable

An OJB criteria adapter.

Author:
Ilkka Priha
See Also:
Serialized Form

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
OJBCriteria()
          Constructs new criteria.
OJBCriteria(Criteria adapt)
          Constructs new criteria with adapted criteria.
 
Method Summary
 DBCriteria add(DBCriteria criteria, boolean union)
          Adds the specified criteria.
 DBCriteria add(String attribute, Object value, int condition, boolean union)
          Adds a named attribute value criteria.
 DBCriteria negate()
          Negates the criteria.
 
Methods inherited from class org.norther.tammi.root.db.query.DBCriteriaAdapter
add, add, add, getAdaptee
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OJBCriteria

public OJBCriteria()
Constructs new criteria.


OJBCriteria

public OJBCriteria(Criteria adapt)
Constructs new criteria with adapted criteria.

Parameters:
adapt - the criteria adaptee.
Method Detail

negate

public DBCriteria negate()
Description copied from interface: DBCriteria
Negates the criteria.

Specified by:
negate in interface DBCriteria
Returns:
the modified criteria.

add

public DBCriteria add(DBCriteria criteria,
                      boolean union)
Description copied from interface: DBCriteria
Adds the specified criteria.

Specified by:
add in interface DBCriteria
Parameters:
criteria - the new criteria.
union - the flag for a union.
Returns:
the modified criteria.

add

public DBCriteria add(String attribute,
                      Object value,
                      int condition,
                      boolean union)
Description copied from interface: DBCriteria
Adds a named attribute value 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 field name to form the search criteria.
value - the field value to form the search criteria.
condition - the condition for the attribute.
union - the flag for a union.
Returns:
the modified criteria.


Copyright © 2004 The Norther Organization. All rights reserved.