org.apache.torque.util
Class Criteria

java.lang.Object
  extended by org.apache.torque.util.Criteria
All Implemented Interfaces:
Serializable, CriteriaInterface<Criteria>

Deprecated. This class will be removed in a future version of Torque. Use org.apache.torque.criteria.Criteria instead; note that that class has another semantics of the add.. and or.. methods.

@Deprecated
public class Criteria
extends Object
implements Serializable, CriteriaInterface<Criteria>

Encapsulates conditions to access rows in database tables.

Version:
$Id: Criteria.java 1377463 2012-08-26 17:24:02Z tv $
Author:
Frank Y. Kim, John D. McNally, Brett McLaughlin, Eric Dobbs, Henning P. Schmiedehausen, Sam Joseph, Martin Poeschl, Thomas Fischer, Scott Eade, Thomas Vandahl
See Also:
Serialized Form

Nested Class Summary
 class Criteria.Criterion
          Deprecated. This is an inner class that describes an object in the criteria.
 
Field Summary
static SqlEnum ALL
          Deprecated. Comparison type.
static SqlEnum ALT_NOT_EQUAL
          Deprecated. Comparison type.
static SqlEnum CURRENT_DATE
          Deprecated. "CURRENT_DATE" ANSI SQL function
static SqlEnum CURRENT_TIME
          Deprecated. "CURRENT_TIME" ANSI SQL function
static SqlEnum CUSTOM
          Deprecated. Comparison type.
static SqlEnum DISTINCT
          Deprecated. Comparison type.
static SqlEnum EQUAL
          Deprecated. Comparison type.
static SqlEnum GREATER_EQUAL
          Deprecated. Comparison type.
static SqlEnum GREATER_THAN
          Deprecated. Comparison type.
static SqlEnum ILIKE
          Deprecated. Comparison type.
static SqlEnum IN
          Deprecated. Comparison type.
static JoinType INNER_JOIN
          Deprecated. "INNER JOIN" SQL statement
static SqlEnum ISNOTNULL
          Deprecated. "IS NOT NULL" null comparison
static SqlEnum ISNULL
          Deprecated. "IS NULL" null comparison
static SqlEnum JOIN
          Deprecated. Comparison type.
static JoinType LEFT_JOIN
          Deprecated. "LEFT JOIN" SQL statement
static SqlEnum LESS_EQUAL
          Deprecated. Comparison type.
static SqlEnum LESS_THAN
          Deprecated. Comparison type.
static SqlEnum LIKE
          Deprecated. Comparison type.
static SqlEnum NOT_EQUAL
          Deprecated. Comparison type.
static SqlEnum NOT_ILIKE
          Deprecated. Comparison type.
static SqlEnum NOT_IN
          Deprecated. Comparison type.
static SqlEnum NOT_LIKE
          Deprecated. Comparison type.
static JoinType RIGHT_JOIN
          Deprecated. "RIGHT JOIN" SQL statement
 
Constructor Summary
Criteria()
          Deprecated. Creates a new instance with the default capacity.
Criteria(int initialCapacity)
          Deprecated. initialCapacity is disregarded
Criteria(String dbName)
          Deprecated. Creates a new instance with the default capacity which corresponds to the specified database.
Criteria(String dbName, int initialCapacity)
          Deprecated. initialCapacity is disregarded
 
Method Summary
 Criteria add(Column column, Object value)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria add(Column column, Object value, SqlEnum comparison)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria add(Criteria.Criterion c)
          Deprecated. This method adds a prepared Criterion object to the Criteria.
 Criteria add(String column, Object value)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria add(String column, Object value, SqlEnum comparison)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria add(String table, String column, Object value)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria add(String table, String column, Object value, SqlEnum comparison)
          Deprecated. This method adds a new criterion to the list of criterias.
 void addAlias(String alias, String table)
          Deprecated. Allows one to specify an alias for a table that can be used in various parts of the SQL.
 Criteria addAscendingOrderByColumn(Column column)
          Deprecated. Add order by column name, explicitly specifying ascending.
 Criteria addAscendingOrderByColumn(Column column, boolean ignoreCase)
          Deprecated. Add order by column name, explicitly specifying ascending.
 Criteria addAscendingOrderByColumn(String column)
          Deprecated. Add order by column name, explicitly specifying ascending.
 Criteria addAsColumn(String name, Column clause)
          Deprecated. Add an AS clause to the select columns.
 Criteria addAsColumn(String name, String clause)
          Deprecated. Add an AS clause to the select columns.
 Criteria addDate(Column column, int year, int month, int day)
          Deprecated. Convenience method to add a Date object specified by year, month, and date into the Criteria.
 Criteria addDate(Column column, int year, int month, int date, SqlEnum comparison)
          Deprecated. Convenience method to add a Date object specified by year, month, and date into the Criteria.
 Criteria addDate(String column, int year, int month, int day)
          Deprecated. Convenience method to add a Date object specified by year, month, and date into the Criteria.
 Criteria addDate(String column, int year, int month, int date, SqlEnum comparison)
          Deprecated. Convenience method to add a Date object specified by year, month, and date into the Criteria.
 Criteria addDescendingOrderByColumn(Column column)
          Deprecated. Add order by column name, explicitly specifying descending.
 Criteria addDescendingOrderByColumn(Column column, boolean ignoreCase)
          Deprecated. Add order by column name, explicitly specifying descending.
 Criteria addDescendingOrderByColumn(String column)
          Deprecated. Add order by column name, explicitly specifying descending.
 Criteria addGroupByColumn(Column groupBy)
          Deprecated. Add group by column name.
 Criteria addGroupByColumn(String groupBy)
          Deprecated. Add group by column name.
 Criteria addHaving(Criteria.Criterion having)
          Deprecated. This method adds a prepared Criterion object to the Criteria as a having clause.
 Criteria addIn(Column column, Collection<?> values)
          Deprecated. Adds an 'IN' clause with the criteria supplied as a Collection.
 Criteria addIn(Column column, Object[] values)
          Deprecated. Adds an 'IN' clause with the criteria supplied as an Object array.
 Criteria addIn(String column, Collection<?> values)
          Deprecated. Adds an 'IN' clause with the criteria supplied as a Collection.
 Criteria addIn(String column, Object[] values)
          Deprecated. Adds an 'IN' clause with the criteria supplied as an Object array.
 Criteria addJoin(Column left, Column right)
          Deprecated. This is the way that you should add a join of two tables.
 Criteria addJoin(Column left, Column right, JoinType operator)
          Deprecated. This is the way that you should add a join of two tables.
 Criteria addJoin(String left, String right)
          Deprecated. This is the way that you should add a join of two tables.
 Criteria addJoin(String left, String right, JoinType operator)
          Deprecated. This is the way that you should add a join of two tables.
 Criteria addNotIn(Column column, Collection<?> values)
          Deprecated. Adds a 'NOT IN' clause with the criteria supplied as a Collection.
 Criteria addNotIn(Column column, Object[] values)
          Deprecated. Adds a 'NOT IN' clause with the criteria supplied as an Object array.
 Criteria addNotIn(String column, Collection<?> values)
          Deprecated. Adds a 'NOT IN' clause with the criteria supplied as a Collection.
 Criteria addNotIn(String column, Object[] values)
          Deprecated. Adds a 'NOT IN' clause with the criteria supplied as an Object array.
 Criteria addSelectColumn(Column column)
          Deprecated. Add select column.
 Criteria addSelectColumn(String column)
          Deprecated. Add select column.
 Criteria and(Column column, Object value)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria and(Column column, Object value, SqlEnum comparison)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria and(Criteria.Criterion c)
          Deprecated. This method adds a prepared Criterion object to the Criteria.
 Criteria and(String column, Object value)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria and(String column, Object value, SqlEnum comparison)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria and(String table, String column, Object value)
          Deprecated. use and(Column, Object) instead
 Criteria and(String table, String column, Object value, SqlEnum comparison)
          Deprecated. use and(Column, Object, comparison) instead
 Criteria andDate(Column column, int year, int month, int date)
          Deprecated. Convenience method to add a Date object specified by year, month, and date into the Criteria.
 Criteria andDate(Column column, int year, int month, int date, SqlEnum comparison)
          Deprecated. Convenience method to add a Date object specified by year, month, and date into the Criteria.
 Criteria andDate(String column, int year, int month, int date)
          Deprecated. Convenience method to add a Date object specified by year, month, and date into the Criteria.
 Criteria andDate(String column, int year, int month, int date, SqlEnum comparison)
          Deprecated. Convenience method to add a Date object specified by year, month, and date into the Criteria.
 Criteria andIn(Column column, Collection<?> values)
          Deprecated. Adds an 'IN' clause with the criteria supplied as a List.
 Criteria andIn(Column column, Object[] values)
          Deprecated. Adds an 'IN' clause with the criteria supplied as an Object array.
 Criteria andIn(String column, Collection<?> values)
          Deprecated. Adds an 'IN' clause with the criteria supplied as a List.
 Criteria andIn(String column, Object[] values)
          Deprecated. Adds an 'IN' clause with the criteria supplied as an Object array.
 Criteria andNotIn(Column column, Collection<?> values)
          Deprecated. Adds a 'NOT IN' clause with the criteria supplied as a List.
 Criteria andNotIn(Column column, Object[] values)
          Deprecated. Adds a 'NOT IN' clause with the criteria supplied as an Object array.
 Criteria andNotIn(String column, Collection<?> values)
          Deprecated. Adds a 'NOT IN' clause with the criteria supplied as a List.
 Criteria andNotIn(String column, Object[] values)
          Deprecated. Adds a 'NOT IN' clause with the criteria supplied as an Object array.
 void clear()
          Deprecated. Brings this criteria back to its initial state, so that it can be reused as if it was new.
 boolean containsKey(String table, String column)
          Deprecated. this method does not check in all cases whether a matching criterion is contained (e.g. if the criterion has been added manually with another key).
 boolean equals(Object object)
          Deprecated. Checks whether an object is equal to this Criteria.
 Object get(Column key)
          Deprecated. this method only works if a criterion exists for the key.
 Map<String,String> getAliases()
          Deprecated. Get the table aliases.
 Map<String,Column> getAsColumns()
          Deprecated. Get the column aliases.
 BigDecimal getBigDecimal(Column column)
          Deprecated. Convenience method to return a BigDecimal.
 BigDecimal getBigDecimal(String table, String column)
          Deprecated. Convenience method to return a BigDecimal.
 boolean getBoolean(Column column)
          Deprecated. Convenience method to return value as a boolean.
 boolean getBoolean(String table, String column)
          Deprecated. Convenience method to return value as a boolean.
 SqlEnum getComparison(Column key)
          Deprecated. Method to return a comparison String.
 SqlEnum getComparison(String table, String column)
          Deprecated. Method to return a comparison String.
 Criteria.Criterion getCriterion(Column column)
          Deprecated. Return the criterion for a column.
 Criteria.Criterion getCriterion(String column)
          Deprecated. Method to return criteria related to a column in a table.
 Criteria.Criterion getCriterion(String table, String column)
          Deprecated. Method to return criteria related to a column in a table.
 Date getDate(Column column)
          Deprecated. Convenience method to return a Date.
 Date getDate(String table, String column)
          Deprecated. Convenience method to return a Date.
 String getDbName()
          Deprecated. Get the Database(Map) name.
 double getDouble(Column column)
          Deprecated. Convenience method to return a double.
 double getDouble(String table, String column)
          Deprecated. Convenience method to return a double.
 float getFloat(Column column)
          Deprecated. Convenience method to return a float.
 float getFloat(String table, String column)
          Deprecated. Convenience method to return a float.
 UniqueColumnList getGroupByColumns()
          Deprecated. Get group by columns.
 Criteria.Criterion getHaving()
          Deprecated. Get Having Criterion.
 int getInt(Column column)
          Deprecated. Convenience method to return an int.
 int getInt(String table, String column)
          Deprecated. Convenience method to return an int.
 Integer getInteger(Column column)
          Deprecated. Convenience method to return an Integer.
 Integer getInteger(String table, String column)
          Deprecated. Convenience method to return an Integer.
 List<Join> getJoins()
          Deprecated. get the List of Joins.
 int getLimit()
          Deprecated. Get limit.
 List<Object> getList(Column column)
          Deprecated. Convenience method to return a List.
 List<Object> getList(String table, String column)
          Deprecated. Convenience method to return a List.
 long getLong(Column column)
          Deprecated. Convenience method to return a long.
 long getLong(String table, String column)
          Deprecated. Convenience method to return a long.
 Criteria.Criterion getNewCriterion(Column column, Object value, SqlEnum comparison)
          Deprecated. Method to return criterion that is not added automatically to this Criteria.
 Criteria.Criterion getNewCriterion(String column, Object value, SqlEnum comparison)
          Deprecated. Method to return criterion that is not added automatically to this Criteria.
 Criteria.Criterion getNewCriterion(String table, String column, Object value, SqlEnum comparison)
          Deprecated. Method to return criterion that is not added automatically to this Criteria.
 ObjectKey getObjectKey(Column column)
          Deprecated. Convenience method to return an ObjectKey.
 ObjectKey getObjectKey(String table, String column)
          Deprecated. Convenience method to return an ObjectKey.
 long getOffset()
          Deprecated. Get offset.
 UniqueList<OrderBy> getOrderByColumns()
          Deprecated. Get order by columns.
 UniqueColumnList getSelectColumns()
          Deprecated. Get select columns.
 UniqueList<String> getSelectModifiers()
          Deprecated. Get select modifiers.
 String getString(Column column)
          Deprecated. Convenience method to return a String.
 String getString(String table, String column)
          Deprecated. Convenience method to return a String.
 String getTableForAlias(String alias)
          Deprecated. Returns the table name associated with an alias.
 Object getValue(Column column)
          Deprecated. Method to return the value that was added to Criteria.
 Object getValue(String table, String column)
          Deprecated. Method to return the value that was added to Criteria.
 int hashCode()
          Deprecated. Returns the hash code value for this Join.
 boolean isEmpty()
          Deprecated. Returns whether there are any criterions in this criteria.
 boolean isIgnoreCase()
          Deprecated. Returns whether case should be ignored in where clauses and order by whenever String columns are encountered.
 boolean isSingleRecord()
          Deprecated. Is single record?
 Set<Column> keySet()
          Deprecated. Returns all keys in the Criterion map.
 Criteria or(Column column, Object value)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria or(Column column, Object value, SqlEnum comparison)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria or(Criteria.Criterion c)
          Deprecated. This method adds a prepared Criterion object to the Criteria.
 Criteria or(String column, Object value)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria or(String column, Object value, SqlEnum comparison)
          Deprecated. This method adds a new criterion to the list of criterias.
 Criteria or(String table, String column, Object value)
          Deprecated. use or(Column, Object) instead
 Criteria or(String table, String column, Object value, SqlEnum comparison)
          Deprecated. use or(Column, Object, SqlEnum) instead
 Criteria orDate(Column column, int year, int month, int date)
          Deprecated. Convenience method to add a Date object specified by year, month, and date into the Criteria.
 Criteria orDate(Column column, int year, int month, int date, SqlEnum comparison)
          Deprecated. Convenience method to add a Date object specified by year, month, and date into the Criteria.
 Criteria orDate(String column, int year, int month, int date)
          Deprecated. Convenience method to add a Date object specified by year, month, and date into the Criteria.
 Criteria orDate(String column, int year, int month, int date, SqlEnum comparison)
          Deprecated. Convenience method to add a Date object specified by year, month, and date into the Criteria.
 Criteria orIn(Column column, Collection<?> values)
          Deprecated. Adds an 'IN' clause with the criteria supplied as a List.
 Criteria orIn(Column column, Object[] values)
          Deprecated. Adds an 'IN' clause with the criteria supplied as an Object array.
 Criteria orIn(String column, Collection<?> values)
          Deprecated. Adds an 'IN' clause with the criteria supplied as a List.
 Criteria orIn(String column, Object[] values)
          Deprecated. Adds an 'IN' clause with the criteria supplied as an Object array.
 Criteria orNotIn(Column column, Collection<?> values)
          Deprecated. Adds a 'NOT IN' clause with the criteria supplied as a List.
 Criteria orNotIn(Column column, Object[] values)
          Deprecated. Adds a 'NOT IN' clause with the criteria supplied as an Object array.
 Criteria orNotIn(String column, Collection<?> values)
          Deprecated. Adds a 'NOT IN' clause with the criteria supplied as a List.
 Criteria orNotIn(String column, Object[] values)
          Deprecated. Adds a 'NOT IN' clause with the criteria supplied as an Object array.
 Object put(Column column, Object value)
          Deprecated. use add(String, Object) instead
 void putAll(Map<Column,Criteria.Criterion> t)
          Deprecated. Copies all of the mappings from the specified Map to this Criteria These mappings will replace any mappings that this Criteria had for any of the keys currently in the specified Map.
 Object remove(Column key)
          Deprecated. Remove all objects with the given key from the criteria.
 void setAll()
          Deprecated. Adds "ALL " to the SQL statement.
 void setDbName(String dbName)
          Deprecated. Set the DatabaseMap name.
 void setDistinct()
          Deprecated. Adds "DISTINCT " to the SQL statement.
 Criteria setIgnoreCase(boolean b)
          Deprecated. Sets whether case should be ignored in where clauses and order by whenever String columns are encountered.
 Criteria setLimit(int limit)
          Deprecated. Set limit.
 Criteria setOffset(long offset)
          Deprecated. Set offset.
 Criteria setSingleRecord(boolean b)
          Deprecated. Set single record? Set this to true if you expect the query to result in only a single result record (the default behaviour is to throw a TorqueException if multiple records are returned when the query is executed).
 int size()
          Deprecated. this method counts only top-level criterions, not all.
 String toString()
          Deprecated. Build a string representation of the Criteria.
 Collection<Criteria.Criterion> values()
          Deprecated. Returns all the top-level Criterions in this criteria (but not the chained Criterions).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EQUAL

public static final SqlEnum EQUAL
Deprecated. 
Comparison type.


NOT_EQUAL

public static final SqlEnum NOT_EQUAL
Deprecated. 
Comparison type.


ALT_NOT_EQUAL

public static final SqlEnum ALT_NOT_EQUAL
Deprecated. 
Comparison type.


GREATER_THAN

public static final SqlEnum GREATER_THAN
Deprecated. 
Comparison type.


LESS_THAN

public static final SqlEnum LESS_THAN
Deprecated. 
Comparison type.


GREATER_EQUAL

public static final SqlEnum GREATER_EQUAL
Deprecated. 
Comparison type.


LESS_EQUAL

public static final SqlEnum LESS_EQUAL
Deprecated. 
Comparison type.


LIKE

public static final SqlEnum LIKE
Deprecated. 
Comparison type.


NOT_LIKE

public static final SqlEnum NOT_LIKE
Deprecated. 
Comparison type.


ILIKE

public static final SqlEnum ILIKE
Deprecated. 
Comparison type.


NOT_ILIKE

public static final SqlEnum NOT_ILIKE
Deprecated. 
Comparison type.


CUSTOM

public static final SqlEnum CUSTOM
Deprecated. 
Comparison type.


DISTINCT

public static final SqlEnum DISTINCT
Deprecated. 
Comparison type.


IN

public static final SqlEnum IN
Deprecated. 
Comparison type.


NOT_IN

public static final SqlEnum NOT_IN
Deprecated. 
Comparison type.


ALL

public static final SqlEnum ALL
Deprecated. 
Comparison type.


JOIN

public static final SqlEnum JOIN
Deprecated. 
Comparison type.


ISNULL

public static final SqlEnum ISNULL
Deprecated. 
"IS NULL" null comparison


ISNOTNULL

public static final SqlEnum ISNOTNULL
Deprecated. 
"IS NOT NULL" null comparison


CURRENT_DATE

public static final SqlEnum CURRENT_DATE
Deprecated. 
"CURRENT_DATE" ANSI SQL function


CURRENT_TIME

public static final SqlEnum CURRENT_TIME
Deprecated. 
"CURRENT_TIME" ANSI SQL function


LEFT_JOIN

public static final JoinType LEFT_JOIN
Deprecated. 
"LEFT JOIN" SQL statement


RIGHT_JOIN

public static final JoinType RIGHT_JOIN
Deprecated. 
"RIGHT JOIN" SQL statement


INNER_JOIN

public static final JoinType INNER_JOIN
Deprecated. 
"INNER JOIN" SQL statement

Constructor Detail

Criteria

public Criteria()
Deprecated. 
Creates a new instance with the default capacity.


Criteria

@Deprecated
public Criteria(int initialCapacity)
Deprecated. initialCapacity is disregarded

Creates a new instance with the specified capacity.

Parameters:
initialCapacity - An int.

Criteria

public Criteria(String dbName)
Deprecated. 
Creates a new instance with the default capacity which corresponds to the specified database.

Parameters:
dbName - The dabase name.

Criteria

@Deprecated
public Criteria(String dbName,
                           int initialCapacity)
Deprecated. initialCapacity is disregarded

Creates a new instance with the specified capacity which corresponds to the specified database.

Parameters:
dbName - The dabase name.
initialCapacity - The initial capacity.
Method Detail

clear

public void clear()
Deprecated. 
Brings this criteria back to its initial state, so that it can be reused as if it was new. Except if the criteria has grown in capacity, it is left at the current capacity.


addAsColumn

public Criteria addAsColumn(String name,
                            Column clause)
Deprecated. 
Add an AS clause to the select columns. Usage:

Criteria myCrit = new Criteria(); myCrit.addAsColumn("alias", "ALIAS("+MyPeer.ID+")");

Parameters:
name - wanted Name of the column
clause - SQL clause to select from the table If the name already exists, it is replaced by the new clause.
Returns:
A modified Criteria object.

addAsColumn

public Criteria addAsColumn(String name,
                            String clause)
Deprecated. 
Add an AS clause to the select columns. Usage:

Criteria myCrit = new Criteria(); myCrit.addAsColumn("alias", "ALIAS("+MyPeer.ID+")");

Parameters:
name - wanted Name of the column
clause - SQL clause to select from the table If the name already exists, it is replaced by the new clause.
Returns:
A modified Criteria object.

getAsColumns

public Map<String,Column> getAsColumns()
Deprecated. 
Get the column aliases.

Specified by:
getAsColumns in interface CriteriaInterface<Criteria>
Returns:
A Map which map the column alias names to the alias clauses.

getAliases

public Map<String,String> getAliases()
Deprecated. 
Get the table aliases.

Specified by:
getAliases in interface CriteriaInterface<Criteria>
Returns:
A Map which maps the table alias names to the actual table names.

addAlias

public void addAlias(String alias,
                     String table)
Deprecated. 
Allows one to specify an alias for a table that can be used in various parts of the SQL.

Specified by:
addAlias in interface CriteriaInterface<Criteria>
Parameters:
alias - a String value
table - a String value

getTableForAlias

public String getTableForAlias(String alias)
Deprecated. 
Returns the table name associated with an alias.

Specified by:
getTableForAlias in interface CriteriaInterface<Criteria>
Parameters:
alias - a String value
Returns:
a String value

containsKey

@Deprecated
public boolean containsKey(String table,
                                      String column)
Deprecated. this method does not check in all cases whether a matching criterion is contained (e.g. if the criterion has been added manually with another key).

Does this Criteria Object contain the specified key?

Parameters:
table - The name of the table.
column - The name of the column.
Returns:
True if this Criteria Object contain the specified key.

getCriterion

public Criteria.Criterion getCriterion(Column column)
Deprecated. 
Return the criterion for a column.

Parameters:
column - the column to get the criterion for.
Returns:
the Criterion, or null if no criterion is defined for this column.

getCriterion

public Criteria.Criterion getCriterion(String column)
Deprecated. 
Method to return criteria related to a column in a table.

Parameters:
column - the column to get the criterion for.
Returns:
A Criterion.

getCriterion

public Criteria.Criterion getCriterion(String table,
                                       String column)
Deprecated. 
Method to return criteria related to a column in a table.

Parameters:
table - String name of table.
column - String name of column.
Returns:
A Criterion.

getNewCriterion

public Criteria.Criterion getNewCriterion(Column column,
                                          Object value,
                                          SqlEnum comparison)
Deprecated. 
Method to return criterion that is not added automatically to this Criteria. This can be used to chain the Criterions to form a more complex where clause.

Parameters:
column - String full name of column (for example TABLE.COLUMN).
value - The value to compare to.
comparison - the comparison to use.
Returns:
A Criterion.

getNewCriterion

public Criteria.Criterion getNewCriterion(String column,
                                          Object value,
                                          SqlEnum comparison)
Deprecated. 
Method to return criterion that is not added automatically to this Criteria. This can be used to chain the Criterions to form a more complex where clause.

Parameters:
column - String full name of column (for example TABLE.COLUMN).
value - The value to compare to.
comparison - the comparison to use.
Returns:
A Criterion.

getNewCriterion

public Criteria.Criterion getNewCriterion(String table,
                                          String column,
                                          Object value,
                                          SqlEnum comparison)
Deprecated. 
Method to return criterion that is not added automatically to this Criteria. This can be used to chain the Criterions to form a more complex where clause.

Parameters:
table - String name of table.
column - String name of column.
Returns:
A Criterion.

add

public Criteria add(Criteria.Criterion c)
Deprecated. 
This method adds a prepared Criterion object to the Criteria. You can get a new, empty Criterion object with the getNewCriterion() method. If a criterion for the requested column already exists, it is replaced. This is used as follows:

Criteria crit = new Criteria(); Criteria.Criterion c = crit .getNewCriterion(XXXPeer.ID, new Integer(5), Criteria.LESS_THAN); crit.add(c);

Parameters:
c - A Criterion object
Returns:
A modified Criteria object.

getComparison

public SqlEnum getComparison(Column key)
Deprecated. 
Method to return a comparison String.

Parameters:
key - String name of the key.
Returns:
A String with the value of the object at key.

getComparison

public SqlEnum getComparison(String table,
                             String column)
Deprecated. 
Method to return a comparison String.

Parameters:
table - String name of table.
column - String name of column.
Returns:
A String with the value of the object at key.

getDbName

public String getDbName()
Deprecated. 
Get the Database(Map) name.

Specified by:
getDbName in interface CriteriaInterface<Criteria>
Returns:
A String with the Database(Map) name. By default, this is PoolBrokerService.DEFAULT.

setDbName

public void setDbName(String dbName)
Deprecated. 
Set the DatabaseMap name. If null is supplied, uses value provided by Torque.getDefaultDB().

Specified by:
setDbName in interface CriteriaInterface<Criteria>
Parameters:
dbName - A String with the Database(Map) name.

getBoolean

public boolean getBoolean(Column column)
Deprecated. 
Convenience method to return value as a boolean.

Parameters:
column - The column to retrieve the value for.
Returns:
A boolean.

getBoolean

public boolean getBoolean(String table,
                          String column)
Deprecated. 
Convenience method to return value as a boolean.

Parameters:
table - String name of table.
column - String name of column.
Returns:
A boolean.

getDate

public Date getDate(Column column)
Deprecated. 
Convenience method to return a Date.

Parameters:
column - The column to retrieve the value for.
Returns:
A java.util.Date with the value of object at key.

getDate

public Date getDate(String table,
                    String column)
Deprecated. 
Convenience method to return a Date.

Parameters:
table - String name of table.
column - String name of column.
Returns:
A java.util.Date with the value of object at key.

getDouble

public double getDouble(Column column)
Deprecated. 
Convenience method to return a double.

Parameters:
column - The column to retrieve the value for.
Returns:
A double with the value of object at key.

getDouble

public double getDouble(String table,
                        String column)
Deprecated. 
Convenience method to return a double.

Parameters:
table - String name of table.
column - String name of column.
Returns:
A double with the value of object at key.

getFloat

public float getFloat(Column column)
Deprecated. 
Convenience method to return a float.

Parameters:
column - The column to retrieve the value for.
Returns:
A float with the value of object at key.

getFloat

public float getFloat(String table,
                      String column)
Deprecated. 
Convenience method to return a float.

Parameters:
table - String name of table.
column - String name of column.
Returns:
A float with the value of object at key.

getInteger

public Integer getInteger(Column column)
Deprecated. 
Convenience method to return an Integer.

Parameters:
column - The column to retrieve the value for.
Returns:
An Integer with the value of object at key.

getInteger

public Integer getInteger(String table,
                          String column)
Deprecated. 
Convenience method to return an Integer.

Parameters:
table - String name of table.
column - String name of column.
Returns:
An Integer with the value of object at key.

getInt

public int getInt(Column column)
Deprecated. 
Convenience method to return an int.

Parameters:
column - The column to retrieve the value for.
Returns:
An int with the value of object at key.

getInt

public int getInt(String table,
                  String column)
Deprecated. 
Convenience method to return an int.

Parameters:
table - String name of table.
column - String name of column.
Returns:
An int with the value of object at key.

getBigDecimal

public BigDecimal getBigDecimal(Column column)
Deprecated. 
Convenience method to return a BigDecimal.

Parameters:
column - The column to retrieve the value for.
Returns:
A BigDecimal with the value of object at key.

getBigDecimal

public BigDecimal getBigDecimal(String table,
                                String column)
Deprecated. 
Convenience method to return a BigDecimal.

Parameters:
table - String name of table.
column - String name of column.
Returns:
A BigDecimal with the value of object at key.

getLong

public long getLong(Column column)
Deprecated. 
Convenience method to return a long.

Parameters:
column - The column to retrieve the value for.
Returns:
A long with the value of object at key.

getLong

public long getLong(String table,
                    String column)
Deprecated. 
Convenience method to return a long.

Parameters:
table - String name of table.
column - String name of column.
Returns:
A long with the value of object at key.

getString

public String getString(Column column)
Deprecated. 
Convenience method to return a String.

Parameters:
column - The column to retrieve the value for.
Returns:
A String with the value of object at key.

getString

public String getString(String table,
                        String column)
Deprecated. 
Convenience method to return a String.

Parameters:
table - String name of table.
column - String name of column.
Returns:
A String with the value of object at key.

getList

public List<Object> getList(Column column)
Deprecated. 
Convenience method to return a List.

Parameters:
column - The column to retrieve the value for.
Returns:
A List with the value of object at key.

getList

public List<Object> getList(String table,
                            String column)
Deprecated. 
Convenience method to return a List.

Parameters:
table - String name of table.
column - String name of column.
Returns:
A List with the value of object at key.

getValue

public Object getValue(Column column)
Deprecated. 
Method to return the value that was added to Criteria.

Parameters:
column - The column to retrieve the value for.
Returns:
An Object with the value of object at key.

getValue

public Object getValue(String table,
                       String column)
Deprecated. 
Method to return the value that was added to Criteria.

Parameters:
table - String name of table.
column - String name of column.
Returns:
An Object with the value of object at key.

getObjectKey

public ObjectKey getObjectKey(Column column)
Deprecated. 
Convenience method to return an ObjectKey.

Parameters:
column - The column to retrieve the value for.
Returns:
An ObjectKey with the value of object at key.

getObjectKey

public ObjectKey getObjectKey(String table,
                              String column)
Deprecated. 
Convenience method to return an ObjectKey.

Parameters:
table - String name of table.
column - String name of column.
Returns:
A String with the value of object at key.

get

@Deprecated
public Object get(Column key)
Deprecated. this method only works if a criterion exists for the key.

Returns the value in the top-level criterion for the given key.

Parameters:
key - the key for the criterion.
Returns:
the value of the criterion.
Throws:
NullPointerException - if no Criterion is stored under the key.

isEmpty

public boolean isEmpty()
Deprecated. 
Returns whether there are any criterions in this criteria.

Returns:
true if there are criterions, false otherwise.

size

@Deprecated
public int size()
Deprecated. this method counts only top-level criterions, not all.

Returns how many top-level criterions are in this criteria.

Returns:
the number of op-level criterions.

values

public Collection<Criteria.Criterion> values()
Deprecated. 
Returns all the top-level Criterions in this criteria (but not the chained Criterions).

Returns:
all top-level Criterions, not null.

put

@Deprecated
public Object put(Column column,
                             Object value)
Deprecated. use add(String, Object) instead

Equivalent to add(key, value).

Parameters:
column - the column.
value - An Object to which the column should be equal.
Returns:
Instance of self.
Throws:
NullPointerException - if key is null.

putAll

public void putAll(Map<Column,Criteria.Criterion> t)
Deprecated. 
Copies all of the mappings from the specified Map to this Criteria These mappings will replace any mappings that this Criteria had for any of the keys currently in the specified Map.

Parameters:
t - Objects to be stored in this criteria.

add

public Criteria add(Column column,
                    Object value)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is replaced. This is used as follows:

Criteria crit = new Criteria().add("column", "value"); An EQUAL comparison is used for column and value. The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the add(table, column, value) method.

Parameters:
column - The column to run the comparison on
value - An Object.
Returns:
A modified Criteria object.

add

public Criteria add(Column column,
                    Object value,
                    SqlEnum comparison)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is replaced. If is used as follow:

Criteria crit = new Criteria().add("column", "value" Criteria.GREATER_THAN); Any comparison can be used. The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the add(table, column, value) method.

Parameters:
column - The column to run the comparison on
value - An Object.
comparison - A String.
Returns:
A modified Criteria object.

add

public Criteria add(String column,
                    Object value)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is replaced. This is used as follows:

Criteria crit = new Criteria().add("column", "value"); An EQUAL comparison is used for column and value. The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the add(table, column, value) method.

Parameters:
column - The column to run the comparison on
value - An Object.
Returns:
A modified Criteria object.

add

public Criteria add(String column,
                    Object value,
                    SqlEnum comparison)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is replaced. If is used as follow:

Criteria crit = new Criteria().add("column", "value" Criteria.GREATER_THAN); Any comparison can be used. The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the add(table, column, value) method.

Parameters:
column - The column to run the comparison on
value - An Object.
comparison - A String.
Returns:
A modified Criteria object.

add

public Criteria add(String table,
                    String column,
                    Object value)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is replaced. If is used as follows:

Criteria crit = new Criteria().add("table", "column", "value"); An EQUAL comparison is used for column and value.

Parameters:
table - Name of the table which contains the column
column - The column to run the comparison on
value - An Object.
Returns:
A modified Criteria object.

add

public Criteria add(String table,
                    String column,
                    Object value,
                    SqlEnum comparison)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is replaced. If is used as follows:

Criteria crit = new Criteria().add("table", "column", "value", Criteria.GREATER_THAN); Any comparison can be used.

Parameters:
table - Name of table which contains the column
column - The column to run the comparison on
value - An Object.
comparison - String describing how to compare the column with the value
Returns:
A modified Criteria object.

addDate

public Criteria addDate(Column column,
                        int year,
                        int month,
                        int day)
Deprecated. 
Convenience method to add a Date object specified by year, month, and date into the Criteria. Equal to

add(column, new GregorianCalendar(year, month,date), EQUAL);

Parameters:
column - A String value to use as column.
year - An int with the year.
month - An int with the month. Month value is 0-based. e.g., 0 for January
day - An int with the day.
Returns:
A modified Criteria object.

addDate

public Criteria addDate(Column column,
                        int year,
                        int month,
                        int date,
                        SqlEnum comparison)
Deprecated. 
Convenience method to add a Date object specified by year, month, and date into the Criteria. Equal to

add(column, new GregorianCalendar(year, month,date), comparison);

Parameters:
column - The column to run the comparison on
year - An int with the year.
month - An int with the month. Month value is 0-based. e.g., 0 for January
date - An int with the date.
comparison - String describing how to compare the column with the value
Returns:
A modified Criteria object.

addDate

public Criteria addDate(String column,
                        int year,
                        int month,
                        int day)
Deprecated. 
Convenience method to add a Date object specified by year, month, and date into the Criteria. Equal to

add(column, new GregorianCalendar(year, month,date), EQUAL);

Parameters:
column - A String value to use as column.
year - An int with the year.
month - An int with the month. Month value is 0-based. e.g., 0 for January
day - An int with the day.
Returns:
A modified Criteria object.

addDate

public Criteria addDate(String column,
                        int year,
                        int month,
                        int date,
                        SqlEnum comparison)
Deprecated. 
Convenience method to add a Date object specified by year, month, and date into the Criteria. Equal to

add(column, new GregorianCalendar(year, month,date), comparison);

Parameters:
column - The column to run the comparison on
year - An int with the year.
month - An int with the month. Month value is 0-based. e.g., 0 for January
date - An int with the date.
comparison - String describing how to compare the column with the value
Returns:
A modified Criteria object.

addJoin

public Criteria addJoin(Column left,
                        Column right)
Deprecated. 
This is the way that you should add a join of two tables. For example:

AND PROJECT.PROJECT_ID=FOO.PROJECT_ID

left = PROJECT.PROJECT_ID right = FOO.PROJECT_ID

Parameters:
left - A String with the left side of the join.
right - A String with the right side of the join.
Returns:
A modified Criteria object.

addJoin

public Criteria addJoin(Column left,
                        Column right,
                        JoinType operator)
Deprecated. 
This is the way that you should add a join of two tables. For example:

PROJECT LEFT JOIN FOO ON PROJECT.PROJECT_ID=FOO.PROJECT_ID

left = "PROJECT.PROJECT_ID" right = "FOO.PROJECT_ID" operator = Criteria.LEFT_JOIN

Parameters:
left - A String with the left side of the join.
right - A String with the right side of the join.
operator - The operator used for the join: must be one of null, Criteria.LEFT_JOIN, Criteria.RIGHT_JOIN, Criteria.INNER_JOIN
Returns:
A modified Criteria object.

addJoin

public Criteria addJoin(String left,
                        String right)
Deprecated. 
This is the way that you should add a join of two tables. For example:

AND PROJECT.PROJECT_ID=FOO.PROJECT_ID

left = PROJECT.PROJECT_ID right = FOO.PROJECT_ID

Parameters:
left - A String with the left side of the join.
right - A String with the right side of the join.
Returns:
A modified Criteria object.

addJoin

public Criteria addJoin(String left,
                        String right,
                        JoinType operator)
Deprecated. 
This is the way that you should add a join of two tables. For example:

PROJECT LEFT JOIN FOO ON PROJECT.PROJECT_ID=FOO.PROJECT_ID

left = "PROJECT.PROJECT_ID" right = "FOO.PROJECT_ID" operator = Criteria.LEFT_JOIN

Parameters:
left - A String with the left side of the join.
right - A String with the right side of the join.
operator - The operator used for the join: must be one of null, Criteria.LEFT_JOIN, Criteria.RIGHT_JOIN, Criteria.INNER_JOIN
Returns:
A modified Criteria object.

getJoins

public List<Join> getJoins()
Deprecated. 
get the List of Joins. This method is meant to be called by BasePeerImpl.

Specified by:
getJoins in interface CriteriaInterface<Criteria>
Returns:
a List which contains objects of type Join. If the criteria does not contains any joins, the list is empty

addIn

public Criteria addIn(Column column,
                      Object[] values)
Deprecated. 
Adds an 'IN' clause with the criteria supplied as an Object array. For example:

FOO.NAME IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is replaced.

Parameters:
column - The column to run the comparison on
values - An Object[] with the allowed values.
Returns:
A modified Criteria object.

addIn

public Criteria addIn(String column,
                      Object[] values)
Deprecated. 
Adds an 'IN' clause with the criteria supplied as an Object array. For example:

FOO.NAME IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is replaced.

Parameters:
column - The column to run the comparison on
values - An Object[] with the allowed values.
Returns:
A modified Criteria object.

addIn

public Criteria addIn(Column column,
                      Collection<?> values)
Deprecated. 
Adds an 'IN' clause with the criteria supplied as a Collection. For example:

FOO.NAME IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three Strings "FOO", "BAR" and "ZOW". If a criterion for the requested column already exists, it is replaced.

Parameters:
column - The column to run the comparison on
values - A Collection with the allowed values.
Returns:
A modified Criteria object.

addIn

public Criteria addIn(String column,
                      Collection<?> values)
Deprecated. 
Adds an 'IN' clause with the criteria supplied as a Collection. For example:

FOO.NAME IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three Strings "FOO", "BAR" and "ZOW". If a criterion for the requested column already exists, it is replaced.

Parameters:
column - The column to run the comparison on
values - A Collection with the allowed values.
Returns:
A modified Criteria object.

addNotIn

public Criteria addNotIn(Column column,
                         Object[] values)
Deprecated. 
Adds a 'NOT IN' clause with the criteria supplied as an Object array. For example:

FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is replaced.

Parameters:
column - The column to run the comparison on
values - An Object[] with the disallowed values.
Returns:
A modified Criteria object.

addNotIn

public Criteria addNotIn(String column,
                         Object[] values)
Deprecated. 
Adds a 'NOT IN' clause with the criteria supplied as an Object array. For example:

FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is replaced.

Parameters:
column - The column to run the comparison on
values - An Object[] with the disallowed values.
Returns:
A modified Criteria object.

addNotIn

public Criteria addNotIn(Column column,
                         Collection<?> values)
Deprecated. 
Adds a 'NOT IN' clause with the criteria supplied as a Collection. For example:

FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three Strings "FOO", "BAR" and "ZOW". If a criterion for the requested column already exists, it is replaced.

Parameters:
column - The column to run the comparison on
values - A Collection with the disallowed values.
Returns:
A modified Criteria object.

addNotIn

public Criteria addNotIn(String column,
                         Collection<?> values)
Deprecated. 
Adds a 'NOT IN' clause with the criteria supplied as a Collection. For example:

FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three Strings "FOO", "BAR" and "ZOW". If a criterion for the requested column already exists, it is replaced.

Parameters:
column - The column to run the comparison on
values - A Collection with the disallowed values.
Returns:
A modified Criteria object.

setAll

public void setAll()
Deprecated. 
Adds "ALL " to the SQL statement.

Specified by:
setAll in interface CriteriaInterface<Criteria>

setDistinct

public void setDistinct()
Deprecated. 
Adds "DISTINCT " to the SQL statement.

Specified by:
setDistinct in interface CriteriaInterface<Criteria>

setIgnoreCase

public Criteria setIgnoreCase(boolean b)
Deprecated. 
Sets whether case should be ignored in where clauses and order by whenever String columns are encountered.

Parameters:
b - True if case should be ignored.
Returns:
A modified Criteria object.

isIgnoreCase

public boolean isIgnoreCase()
Deprecated. 
Returns whether case should be ignored in where clauses and order by whenever String columns are encountered.

Specified by:
isIgnoreCase in interface CriteriaInterface<Criteria>
Returns:
True if case is ignored.

setSingleRecord

public Criteria setSingleRecord(boolean b)
Deprecated. 
Set single record? Set this to true if you expect the query to result in only a single result record (the default behaviour is to throw a TorqueException if multiple records are returned when the query is executed). This should be used in situations where returning multiple rows would indicate an error of some sort. If your query might return multiple records but you are only interested in the first one then you should be using setLimit(1).

Parameters:
b - set to true if you expect the query to select just one record.
Returns:
A modified Criteria object.

isSingleRecord

public boolean isSingleRecord()
Deprecated. 
Is single record?

Specified by:
isSingleRecord in interface CriteriaInterface<Criteria>
Returns:
True if a single record is being returned.

setLimit

public Criteria setLimit(int limit)
Deprecated. 
Set limit.

Specified by:
setLimit in interface CriteriaInterface<Criteria>
Parameters:
limit - An int with the value for limit.
Returns:
A modified Criteria object.

getLimit

public int getLimit()
Deprecated. 
Get limit.

Specified by:
getLimit in interface CriteriaInterface<Criteria>
Returns:
An int with the value for limit.

setOffset

public Criteria setOffset(long offset)
Deprecated. 
Set offset.

Specified by:
setOffset in interface CriteriaInterface<Criteria>
Parameters:
offset - An int with the value for offset.
Returns:
A modified Criteria object.

getOffset

public long getOffset()
Deprecated. 
Get offset.

Specified by:
getOffset in interface CriteriaInterface<Criteria>
Returns:
An int with the value for offset.

addSelectColumn

public Criteria addSelectColumn(Column column)
Deprecated. 
Add select column.

Parameters:
column - The select column to add.
Returns:
A modified Criteria object.

addSelectColumn

public Criteria addSelectColumn(String column)
Deprecated. 
Add select column.

Parameters:
column - A String with the name of the select column.
Returns:
A modified Criteria object.

getSelectColumns

public UniqueColumnList getSelectColumns()
Deprecated. 
Get select columns.

Specified by:
getSelectColumns in interface CriteriaInterface<Criteria>
Returns:
An List with the names of the select columns.

getSelectModifiers

public UniqueList<String> getSelectModifiers()
Deprecated. 
Get select modifiers.

Specified by:
getSelectModifiers in interface CriteriaInterface<Criteria>
Returns:
An UniqueList with the select modifiers.

addGroupByColumn

public Criteria addGroupByColumn(Column groupBy)
Deprecated. 
Add group by column name.

Parameters:
groupBy - The name of the column to group by.
Returns:
A modified Criteria object.

addGroupByColumn

public Criteria addGroupByColumn(String groupBy)
Deprecated. 
Add group by column name.

Parameters:
groupBy - The name of the column to group by.
Returns:
A modified Criteria object.

addAscendingOrderByColumn

public Criteria addAscendingOrderByColumn(Column column)
Deprecated. 
Add order by column name, explicitly specifying ascending.

Parameters:
column - The column to order by.
Returns:
A modified Criteria object.

addAscendingOrderByColumn

public Criteria addAscendingOrderByColumn(Column column,
                                          boolean ignoreCase)
Deprecated. 
Add order by column name, explicitly specifying ascending.

Parameters:
column - The column to order by.
ignoreCase - whether to ignore case on String columns.
Returns:
A modified Criteria object.

addAscendingOrderByColumn

public Criteria addAscendingOrderByColumn(String column)
Deprecated. 
Add order by column name, explicitly specifying ascending.

Parameters:
column - The column to order by.
Returns:
A modified Criteria object.

addDescendingOrderByColumn

public Criteria addDescendingOrderByColumn(Column column)
Deprecated. 
Add order by column name, explicitly specifying descending.

Parameters:
column - The column to order by.
Returns:
A modified Criteria object.

addDescendingOrderByColumn

public Criteria addDescendingOrderByColumn(Column column,
                                           boolean ignoreCase)
Deprecated. 
Add order by column name, explicitly specifying descending.

Parameters:
column - The column to order by.
ignoreCase - whether to ignore case on String columns.
Returns:
A modified Criteria object.

addDescendingOrderByColumn

public Criteria addDescendingOrderByColumn(String column)
Deprecated. 
Add order by column name, explicitly specifying descending.

Parameters:
column - The column to order by.
Returns:
A modified Criteria object.

getOrderByColumns

public UniqueList<OrderBy> getOrderByColumns()
Deprecated. 
Get order by columns.

Specified by:
getOrderByColumns in interface CriteriaInterface<Criteria>
Returns:
An UniqueList with the name of the order columns, not null.

getGroupByColumns

public UniqueColumnList getGroupByColumns()
Deprecated. 
Get group by columns.

Specified by:
getGroupByColumns in interface CriteriaInterface<Criteria>
Returns:
An UniqueList with the name of the groupBy clause, not null.

getHaving

public Criteria.Criterion getHaving()
Deprecated. 
Get Having Criterion.

Returns:
A Criterion that is the having clause.

remove

public Object remove(Column key)
Deprecated. 
Remove all objects with the given key from the criteria.

Parameters:
key - A String with the key to be removed.
Returns:
The value of the removed criterion, or null.

toString

public String toString()
Deprecated. 
Build a string representation of the Criteria.

Overrides:
toString in class Object
Returns:
A String with the representation of the Criteria.

keySet

public Set<Column> keySet()
Deprecated. 
Returns all keys in the Criterion map.

Returns:
all keys, not null.

equals

public boolean equals(Object object)
Deprecated. 
Checks whether an object is equal to this Criteria. This is the case if the other object is also a Criteria and has the same attributes and criterions.

Overrides:
equals in class Object
Parameters:
object - the other object to check, can be null.
Returns:
true if the object is equal to this Criteria, false otherwise.

hashCode

public int hashCode()
Deprecated. 
Returns the hash code value for this Join.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

addHaving

public Criteria addHaving(Criteria.Criterion having)
Deprecated. 
This method adds a prepared Criterion object to the Criteria as a having clause. You can get a new, empty Criterion object with the getNewCriterion() method.

Criteria crit = new Criteria(); Criteria.Criterion c = crit.getNewCriterion(XXXPeer.ID, new Integer(5), Criteria.LESS_THAN); crit.addHaving(c);

Parameters:
having - A Criterion object
Returns:
A modified Criteria object.

and

public Criteria and(Criteria.Criterion c)
Deprecated. 
This method adds a prepared Criterion object to the Criteria. You can get a new, empty Criterion object with the getNewCriterion() method. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion. This is used as follows:

Criteria crit = new Criteria(); Criteria.Criterion c = crit.getNewCriterion(XXXPeer.ID, new Integer(5), Criteria.LESS_THAN); crit.and(c);

Parameters:
c - A Criterion object
Returns:
A modified Criteria object.

and

public Criteria and(Column column,
                    Object value)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion. This is used as follows:

Criteria crit = new Criteria().and("column", "value"); An EQUAL comparison is used for column and value. The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the and(table, column, value) method.

Parameters:
column - The column to run the comparison on
value - An Object.
Returns:
A modified Criteria object.

and

public Criteria and(Column column,
                    Object value,
                    SqlEnum comparison)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion. If is used as follow:

Criteria crit = new Criteria().and("column", "value" Criteria.GREATER_THAN); Any comparison can be used. The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the and(table, column, value) method.

Parameters:
column - The column to run the comparison on
value - An Object.
comparison - A String.
Returns:
A modified Criteria object.

and

public Criteria and(String column,
                    Object value)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion. This is used as follows:

Criteria crit = new Criteria().and("column", "value"); An EQUAL comparison is used for column and value. The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the and(table, column, value) method.

Parameters:
column - The column to run the comparison on
value - An Object.
Returns:
A modified Criteria object.

and

public Criteria and(String column,
                    Object value,
                    SqlEnum comparison)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion. If is used as follow:

Criteria crit = new Criteria().and("column", "value" Criteria.GREATER_THAN); Any comparison can be used. The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the and(table, column, value) method.

Parameters:
column - The column to run the comparison on
value - An Object.
comparison - A String.
Returns:
A modified Criteria object.

and

@Deprecated
public Criteria and(String table,
                               String column,
                               Object value)
Deprecated. use and(Column, Object) instead

This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion. If is used as follows:

Criteria crit = new Criteria().and("table", "column", "value"); An EQUAL comparison is used for column and value.

Parameters:
table - Name of the table which contains the column
column - The column to run the comparison on
value - An Object.
Returns:
A modified Criteria object.

and

@Deprecated
public Criteria and(String table,
                               String column,
                               Object value,
                               SqlEnum comparison)
Deprecated. use and(Column, Object, comparison) instead

This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion. If is used as follows:

Criteria crit = new Criteria().and("table", "column", "value", "Criterion.GREATER_THAN"); Any comparison can be used.

Parameters:
table - Name of table which contains the column
column - The column to run the comparison on
value - An Object.
comparison - String describing how to compare the column with the value
Returns:
A modified Criteria object.

andDate

public Criteria andDate(Column column,
                        int year,
                        int month,
                        int date)
Deprecated. 
Convenience method to add a Date object specified by year, month, and date into the Criteria. Equal to

and(column, new GregorianCalendar(year, month,date), EQUAL);

Parameters:
column - A String value to use as column.
year - An int with the year.
month - An int with the month.
date - An int with the date.
Returns:
A modified Criteria object.

andDate

public Criteria andDate(Column column,
                        int year,
                        int month,
                        int date,
                        SqlEnum comparison)
Deprecated. 
Convenience method to add a Date object specified by year, month, and date into the Criteria. Equal to

and(column, new GregorianCalendar(year, month,date), comparison);

Parameters:
column - The column to run the comparison on
year - An int with the year.
month - An int with the month.
date - An int with the date.
comparison - String describing how to compare the column with the value
Returns:
A modified Criteria object.

andDate

public Criteria andDate(String column,
                        int year,
                        int month,
                        int date)
Deprecated. 
Convenience method to add a Date object specified by year, month, and date into the Criteria. Equal to

and(column, new GregorianCalendar(year, month,date), EQUAL);

Parameters:
column - A String value to use as column.
year - An int with the year.
month - An int with the month.
date - An int with the date.
Returns:
A modified Criteria object.

andDate

public Criteria andDate(String column,
                        int year,
                        int month,
                        int date,
                        SqlEnum comparison)
Deprecated. 
Convenience method to add a Date object specified by year, month, and date into the Criteria. Equal to

and(column, new GregorianCalendar(year, month,date), comparison);

Parameters:
column - The column to run the comparison on
year - An int with the year.
month - An int with the month.
date - An int with the date.
comparison - String describing how to compare the column with the value
Returns:
A modified Criteria object.

andIn

public Criteria andIn(Column column,
                      Object[] values)
Deprecated. 
Adds an 'IN' clause with the criteria supplied as an Object array. For example:

FOO.NAME IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - An Object[] with the allowed values.
Returns:
A modified Criteria object.

andIn

public Criteria andIn(String column,
                      Object[] values)
Deprecated. 
Adds an 'IN' clause with the criteria supplied as an Object array. For example:

FOO.NAME IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - An Object[] with the allowed values.
Returns:
A modified Criteria object.

andIn

public Criteria andIn(Column column,
                      Collection<?> values)
Deprecated. 
Adds an 'IN' clause with the criteria supplied as a List. For example:

FOO.NAME IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - A List with the allowed values.
Returns:
A modified Criteria object.

andIn

public Criteria andIn(String column,
                      Collection<?> values)
Deprecated. 
Adds an 'IN' clause with the criteria supplied as a List. For example:

FOO.NAME IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - A List with the allowed values.
Returns:
A modified Criteria object.

andNotIn

public Criteria andNotIn(Column column,
                         Object[] values)
Deprecated. 
Adds a 'NOT IN' clause with the criteria supplied as an Object array. For example:

FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - An Object[] with the disallowed values.
Returns:
A modified Criteria object.

andNotIn

public Criteria andNotIn(String column,
                         Object[] values)
Deprecated. 
Adds a 'NOT IN' clause with the criteria supplied as an Object array. For example:

FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - An Object[] with the disallowed values.
Returns:
A modified Criteria object.

andNotIn

public Criteria andNotIn(Column column,
                         Collection<?> values)
Deprecated. 
Adds a 'NOT IN' clause with the criteria supplied as a List. For example:

FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - A List with the disallowed values.
Returns:
A modified Criteria object.

andNotIn

public Criteria andNotIn(String column,
                         Collection<?> values)
Deprecated. 
Adds a 'NOT IN' clause with the criteria supplied as a List. For example:

FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "AND"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - A List with the disallowed values.
Returns:
A modified Criteria object.

or

public Criteria or(Criteria.Criterion c)
Deprecated. 
This method adds a prepared Criterion object to the Criteria. You can get a new, empty Criterion object with the getNewCriterion() method. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion. This is used as follows:

Criteria crit = new Criteria(); Criteria.Criterion c = crit.getNewCriterion(XXXPeer.ID, new Integer(5), Criteria.LESS_THAN); crit.or(c);

Parameters:
c - A Criterion object
Returns:
A modified Criteria object.

or

public Criteria or(Column column,
                   Object value)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion. This is used as follows:

Criteria crit = new Criteria().or("column", "value"); An EQUAL comparison is used for column and value. The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the or(table, column, value) method.

Parameters:
column - The column to run the comparison on
value - An Object.
Returns:
A modified Criteria object.

or

public Criteria or(String column,
                   Object value)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion. This is used as follows:

Criteria crit = new Criteria().or("column", "value"); An EQUAL comparison is used for column and value. The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the or(table, column, value) method.

Parameters:
column - The column to run the comparison on
value - An Object.
Returns:
A modified Criteria object.

or

public Criteria or(Column column,
                   Object value,
                   SqlEnum comparison)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion. If is used as follow:

Criteria crit = new Criteria().or("column", "value" "Criterion.GREATER_THAN"); Any comparison can be used. The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the or(table, column, value) method.

Parameters:
column - The column to run the comparison on
value - An Object.
comparison - A String.
Returns:
A modified Criteria object.

or

public Criteria or(String column,
                   Object value,
                   SqlEnum comparison)
Deprecated. 
This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion. If is used as follow:

Criteria crit = new Criteria().or("column", "value" "Criterion.GREATER_THAN"); Any comparison can be used. The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the or(table, column, value) method.

Parameters:
column - The column to run the comparison on
value - An Object.
comparison - A String.
Returns:
A modified Criteria object.

or

@Deprecated
public Criteria or(String table,
                              String column,
                              Object value)
Deprecated. use or(Column, Object) instead

This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion. If is used as follows:

Criteria crit = new Criteria().or("table", "column", "value"); An EQUAL comparison is used for column and value.

Parameters:
table - Name of the table which contains the column
column - The column to run the comparison on
value - An Object.
Returns:
A modified Criteria object.

or

@Deprecated
public Criteria or(String table,
                              String column,
                              Object value,
                              SqlEnum comparison)
Deprecated. use or(Column, Object, SqlEnum) instead

This method adds a new criterion to the list of criterias. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion. If is used as follows:

Criteria crit = new Criteria().or("table", "column", "value", "Criterion.GREATER_THAN"); Any comparison can be used.

Parameters:
table - Name of table which contains the column
column - The column to run the comparison on
value - An Object.
comparison - String describing how to compare the column with the value
Returns:
A modified Criteria object.

orDate

public Criteria orDate(Column column,
                       int year,
                       int month,
                       int date)
Deprecated. 
Convenience method to add a Date object specified by year, month, and date into the Criteria. Equal to

or(column, new GregorianCalendar(year, month,date), EQUAL);

Parameters:
column - A String value to use as column.
year - An int with the year.
month - An int with the month.
date - An int with the date.
Returns:
A modified Criteria object.

orDate

public Criteria orDate(String column,
                       int year,
                       int month,
                       int date)
Deprecated. 
Convenience method to add a Date object specified by year, month, and date into the Criteria. Equal to

or(column, new GregorianCalendar(year, month,date), EQUAL);

Parameters:
column - A String value to use as column.
year - An int with the year.
month - An int with the month.
date - An int with the date.
Returns:
A modified Criteria object.

orDate

public Criteria orDate(Column column,
                       int year,
                       int month,
                       int date,
                       SqlEnum comparison)
Deprecated. 
Convenience method to add a Date object specified by year, month, and date into the Criteria. Equal to

or(column, new GregorianCalendar(year, month,date), comparison);

Parameters:
column - The column to run the comparison on
year - An int with the year.
month - An int with the month.
date - An int with the date.
comparison - String describing how to compare the column with the value
Returns:
A modified Criteria object.

orDate

public Criteria orDate(String column,
                       int year,
                       int month,
                       int date,
                       SqlEnum comparison)
Deprecated. 
Convenience method to add a Date object specified by year, month, and date into the Criteria. Equal to

or(column, new GregorianCalendar(year, month,date), comparison);

Parameters:
column - The column to run the comparison on
year - An int with the year.
month - An int with the month.
date - An int with the date.
comparison - String describing how to compare the column with the value
Returns:
A modified Criteria object.

orIn

public Criteria orIn(Column column,
                     Object[] values)
Deprecated. 
Adds an 'IN' clause with the criteria supplied as an Object array. For example:

FOO.NAME IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - An Object[] with the allowed values.
Returns:
A modified Criteria object.

orIn

public Criteria orIn(String column,
                     Object[] values)
Deprecated. 
Adds an 'IN' clause with the criteria supplied as an Object array. For example:

FOO.NAME IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - An Object[] with the allowed values.
Returns:
A modified Criteria object.

orIn

public Criteria orIn(Column column,
                     Collection<?> values)
Deprecated. 
Adds an 'IN' clause with the criteria supplied as a List. For example:

FOO.NAME IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - A List with the allowed values.
Returns:
A modified Criteria object.

orIn

public Criteria orIn(String column,
                     Collection<?> values)
Deprecated. 
Adds an 'IN' clause with the criteria supplied as a List. For example:

FOO.NAME IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - A List with the allowed values.
Returns:
A modified Criteria object.

orNotIn

public Criteria orNotIn(Column column,
                        Object[] values)
Deprecated. 
Adds a 'NOT IN' clause with the criteria supplied as an Object array. For example:

FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - An Object[] with the disallowed values.
Returns:
A modified Criteria object.

orNotIn

public Criteria orNotIn(String column,
                        Object[] values)
Deprecated. 
Adds a 'NOT IN' clause with the criteria supplied as an Object array. For example:

FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - An Object[] with the disallowed values.
Returns:
A modified Criteria object.

orNotIn

public Criteria orNotIn(Column column,
                        Collection<?> values)
Deprecated. 
Adds a 'NOT IN' clause with the criteria supplied as a List. For example:

FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - A List with the disallowed values.
Returns:
A modified Criteria object.

orNotIn

public Criteria orNotIn(String column,
                        Collection<?> values)
Deprecated. 
Adds a 'NOT IN' clause with the criteria supplied as a List. For example:

FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')

where 'values' contains three objects that evaluate to the respective strings above when .toString() is called. If a criterion for the requested column already exists, it is "OR"ed to the existing criterion.

Parameters:
column - The column to run the comparison on
values - A List with the disallowed values.
Returns:
A modified Criteria object.


Copyright © 2000-2012 The Apache Software Foundation. All Rights Reserved.