Uses of Class
org.apache.torque.criteria.Criteria
-
Packages that use Criteria Package Description org.apache.torque.criteria This package contains Torque's Criteria classes.org.apache.torque.map Description of the schema layout.org.apache.torque.om.mapper Contains the Mapper interface which defines how to map from a ResultSet to an object, and simple implementations of this interface.org.apache.torque.sql This package contains classes which are mainly used in the SQL generation process.org.apache.torque.sql.objectbuilder This package contains classes which can build PreparedStatementParts from a single value or column.org.apache.torque.util Misc. utility classes. -
-
Uses of Criteria in org.apache.torque.criteria
Methods in org.apache.torque.criteria that return Criteria Modifier and Type Method Description CriteriaCriteria. addAlias(String alias, String table)Allows one to specify an alias for a table.CriteriaCriteria. addAlias(String alias, Criteria subselect)Allows one to specify an alias for a subselect.CriteriaCriteria. addAscendingOrderByColumn(Column column)Adds an order by clause, explicitly specifying ascending.CriteriaCriteria. addAscendingOrderByColumn(Column column, boolean ignoreCase)Add an order by clause, explicitly specifying ascending.CriteriaCriteria. addAsColumn(String name, Column clause)Add an AS clause to the select columns.CriteriaCriteria. addDescendingOrderByColumn(Column column)Add order by column name, explicitly specifying descending.CriteriaCriteria. addDescendingOrderByColumn(Column column, boolean ignoreCase)Add order by column name, explicitly specifying descending.CriteriaCriteria. addFrom(String tableName)Adds a table to the from clause, not using a joinType or joinCondition.CriteriaCriteria. addFrom(FromElement fromElement)Adds a new Element to the from clause.CriteriaCriteria. addGroupByColumn(Column groupBy)Add a group by clause.CriteriaCriteria. addHaving(Criterion having)This method adds a prepared Criterion object to the Criteria as a having clause.CriteriaCriteria. addJoin(String leftTable, String rightTable, Criterion joinCondition, JoinType joinType)Adds a join to the criteria.CriteriaCriteria. addJoin(Column left, Column right)Adds a join to the criteria, E.g. to create the conditionCriteriaCriteria. addJoin(Column left, Column right, JoinType joinType)Adds a join to the criteria, E.g. to create the conditionCriteriaCriteria. addJoin(Column left, Column right, SqlEnum comparison, JoinType joinType)Adds a join to the criteria, E.g. to create the conditionCriteriaCriteria. addJoin(PreparedStatementPart leftTable, PreparedStatementPart rightTable, Criterion joinCondition, JoinType joinType)Adds a join to the criteria, E.g. to create the conditionCriteriaCriteria. addSelectColumn(Column column)Adds a select column to the Criteria.CriteriaCriteria. and(Object lValue, Object rValue)"AND"s a new condition with the conditions in this Criteria.CriteriaCriteria. and(Object lValue, Object rValue, SqlEnum comparison)"AND"s a new condition with the conditions in this Criteria.CriteriaCriteria. and(Criterion criterion)"AND"s Criterion object with the conditions in this Criteria.CriteriaCriteria. andDate(Object lValue, int year, int month, int day)Convenience method to AND a new date comparison with the conditions in this Criteria.CriteriaCriteria. andDate(Object lValue, int year, int month, int day, SqlEnum comparison)Convenience method to AND a new date comparison with the conditions in this Criteria.CriteriaCriteria. andIn(Object lValue, Object[] rValues)Convenience method to AND a "in" comparison with the conditions in this Criteria.CriteriaCriteria. andIn(Object lValue, Collection<?> rValues)Convenience method to AND a "in" comparison with the conditions in this Criteria.CriteriaCriteria. andNotIn(Object lValue, Object[] rValues)Convenience method to AND a "not in" comparison with the conditions in this Criteria.CriteriaCriteria. andNotIn(Object lValue, Collection<?> rValues)Convenience method to AND a "not in" comparison with the conditions in this Criteria.CriteriaCriteria. andVerbatimSql(String sql, Object[] replacements)Ands a verbatim sql condition to this Criteria.CriteriaCriteria. andVerbatimSql(String sql, Object[] replacements, Column toAddToFromClause1, Column toAddToFromClause2)ANDs a verbatim sql condition to this Criteria.CriteriaCriteria. except(Criteria other)Creates a SQL EXCEPT between this Criteria and the passed other criteria.CriteriaCriteria. exceptAll(Criteria other)Creates a SQL EXCEPT between this Criteria and the passed other criteria.CriteriaCriteria. forUpdate()Sets that FOR UPDATE clause should be added to the query.CriteriaCriteria. getSubselectForAlias(String alias)Returns the subselect associated with an alias.CriteriaCriteria. intersect(Criteria other)Creates a SQL INTERSECT between this Criteria and the passed other criteria.CriteriaCriteria. intersectAll(Criteria other)Creates a SQL INTERSECT ALL between this Criteria and the passed other criteria.CriteriaCriteria. or(Object lValue, Object rValue)"OR"s a new condition with the conditions in this Criteria.CriteriaCriteria. or(Object lValue, Object rValue, SqlEnum comparison)"OR"s a new condition with the conditions in this Criteria.CriteriaCriteria. or(Criterion criterion)"OR"s a Criterion object with the conditions in this Criteria.CriteriaCriteria. orDate(Object lValue, int year, int month, int day)Convenience method to OR a new date comparison with the conditions in this Criteria.CriteriaCriteria. orDate(Object lValue, int year, int month, int day, SqlEnum comparison)Convenience method to OR a new date comparison with the conditions in this Criteria.CriteriaCriteria. orIn(Object lValue, Object[] rValues)Convenience method to OR a "in" comparison with the conditions in this Criteria.CriteriaCriteria. orIn(Object lValue, Collection<?> rValues)Convenience method to OR a "in" comparison with the conditions in this Criteria.CriteriaCriteria. orNotIn(Object lValue, Object[] rValues)Convenience method to OR a "not in" comparison with the conditions in this Criteria.CriteriaCriteria. orNotIn(Object lValue, Collection<?> rValues)Convenience method to OR a "not in" comparison with the conditions in this Criteria.CriteriaCriteria. orVerbatimSql(String sql, Object[] replacements)ORs a verbatim sql condition to this Criteria.CriteriaCriteria. orVerbatimSql(String sql, Object[] replacements, Column toAddToFromClause1, Column toAddToFromClause2)ORs a verbatim sql condition to this Criteria.CriteriaCriteria. setAll()Adds "ALL " to the SQL statement.CriteriaCriteria. setDbName(String dbName)Set the Database name.CriteriaCriteria. setDistinct()Adds "DISTINCT " to the SQL statement.CriteriaCriteria. setFetchSize(Integer fetchSize)Sets the JDBC statement fetch size to use for queries.CriteriaCriteria. setForUpdate(boolean forUpdate)Sets whether FOR UPDATE clause should be added to the query.CriteriaCriteria. setIgnoreCase(boolean ignoreCase)Sets whether case should be ignored in where clauses and order by whenever String columns are encountered.CriteriaCriteria. setLimit(int limit)Set a limit for the queryCriteriaCriteria. setOffset(long offset)Set the offset.CriteriaCriteria. setSingleRecord(boolean b)Switch the check on or off that a query returns exactly one record.CriteriaCriteria. union(Criteria other)Creates a SQL UNION between this Criteria and the passed other criteria.CriteriaCriteria. unionAll(Criteria other)Creates a SQL UNION ALL between this Criteria and the passed other criteria.CriteriaCriteria. where(Object lValue, Object rValue)"AND"s a new condition with the conditions in this Criteria.CriteriaCriteria. where(Object lValue, Object rValue, SqlEnum comparison)"AND"s a new condition with the conditions in this Criteria.CriteriaCriteria. where(Criterion criterion)"AND"s Criterion object with the conditions in this Criteria.CriteriaCriteria. whereDate(Object lValue, int year, int month, int day)Convenience method to AND a new date comparison with the conditions in this Criteria.CriteriaCriteria. whereDate(Object lValue, int year, int month, int day, SqlEnum comparison)Convenience method to AND a new date comparison with the conditions in this Criteria.CriteriaCriteria. whereIn(Object lValue, Object[] rValues)Convenience method to AND a "in" comparison with the conditions in this Criteria.CriteriaCriteria. whereIn(Object lValue, Collection<?> rValues)Convenience method to AND a "in" comparison with the conditions in this Criteria.CriteriaCriteria. whereNotIn(Object lValue, Object[] rValues)Convenience method to AND a "not in" comparison with the conditions in this Criteria.CriteriaCriteria. whereNotIn(Object lValue, Collection<?> rValues)Convenience method to AND a "not in" comparison with the conditions in this Criteria.CriteriaCriteria. whereVerbatimSql(String sql, Object[] replacements)Convenience method to AND a verbatim sql condition to this Criteria.CriteriaCriteria. whereVerbatimSql(String sql, Object[] replacements, Column toAddToFromClause1, Column toAddToFromClause2)Convenience method to AND a verbatim sql condition to this Criteria.Methods in org.apache.torque.criteria that return types with arguments of type Criteria Modifier and Type Method Description List<Criteria>Criteria. getSetCriteriaParts()Return the parts of the criteria which compose a query using set operations (union, except, intersect).Methods in org.apache.torque.criteria with parameters of type Criteria Modifier and Type Method Description CriteriaCriteria. addAlias(String alias, Criteria subselect)Allows one to specify an alias for a subselect.protected voidCriteria. appendSetOperation(Criteria other, SqlEnum setOperator)Appends a set operation (union, except, intersect) to this Criteria.CriteriaCriteria. except(Criteria other)Creates a SQL EXCEPT between this Criteria and the passed other criteria.CriteriaCriteria. exceptAll(Criteria other)Creates a SQL EXCEPT between this Criteria and the passed other criteria.CriteriaCriteria. intersect(Criteria other)Creates a SQL INTERSECT between this Criteria and the passed other criteria.CriteriaCriteria. intersectAll(Criteria other)Creates a SQL INTERSECT ALL between this Criteria and the passed other criteria.CriteriaCriteria. union(Criteria other)Creates a SQL UNION between this Criteria and the passed other criteria.CriteriaCriteria. unionAll(Criteria other)Creates a SQL UNION ALL between this Criteria and the passed other criteria.Constructors in org.apache.torque.criteria with parameters of type Criteria Constructor Description Criteria(Criteria toCopy)Copy-constructor. -
Uses of Criteria in org.apache.torque.map
Methods in org.apache.torque.map with parameters of type Criteria Modifier and Type Method Description static ColumnMapMapHelper. getColumnMap(Column column, Criteria criteria)Returns the column map for a column.static TableMapMapHelper. getTableMap(Object possibleColumn, Criteria criteria, TableMap defaultTableMap)Returns the table map for a table name. -
Uses of Criteria in org.apache.torque.om.mapper
Methods in org.apache.torque.om.mapper with parameters of type Criteria Modifier and Type Method Description BigDecimalBigDecimalMapper. processRow(ResultSet resultSet, int rowOffset, Criteria criteria)Maps the current row in the result to a BigDecimal.List<Object>CompositeMapper. processRow(ResultSet resultSet, int offset, Criteria criteria)Maps the current row in the result Set by applying all known mappers and putting the result of each mapper in the result list.DateDateMapper. processRow(ResultSet resultSet, int rowOffset, Criteria criteria)Maps the current row in the result set to a java.util.Date.IntegerIntegerMapper. processRow(ResultSet resultSet, int rowOffset, Criteria criteria)Maps the current row in the result set to a Integer.LongLongMapper. processRow(ResultSet resultSet, int rowOffset, Criteria criteria)Maps the current row in the result set to a Long.List<Object>ObjectListMapper. processRow(ResultSet resultSet, int offset, Criteria criteria)Maps the current row in the result set by reading all columns from offset on to the end of the row and store an object for each column in the result.TRecordMapper. processRow(ResultSet resultSet, int rowOffset, Criteria criteria)Constructs the object from the current row in the resultSet.StringStringMapper. processRow(ResultSet resultSet, int rowOffset, Criteria criteria)Maps the current row in the result set to a String. -
Uses of Criteria in org.apache.torque.sql
Methods in org.apache.torque.sql with parameters of type Criteria Modifier and Type Method Description static QuerySqlBuilder. buildQuery(Criteria crit)Builds a Query from a criteria.static StringSqlBuilder. guessFullTableFromCriteria(Criteria criteria)Guesses a table name from a criteria by inspecting the first column in the criteria.static voidJoinBuilder. processJoins(Criteria criteria, Query query)Adds the Joins from the criteria to the query. -
Uses of Criteria in org.apache.torque.sql.objectbuilder
Constructors in org.apache.torque.sql.objectbuilder with parameters of type Criteria Constructor Description PreparedStatementPartForSubselect(Criteria toBuildFrom, Query outerQuery)Constructor. -
Uses of Criteria in org.apache.torque.util
Methods in org.apache.torque.util that return Criteria Modifier and Type Method Description CriteriaAbstractPeerImpl. buildCriteria(ObjectKey<?> pk)Build a Criteria object which selects all objects which have a given primary key.abstract CriteriaAbstractPeerImpl. buildCriteria(T obj)Build a Criteria object from the data object for this peer.CriteriaSummaryHelper. buildCriteria(Criteria c)Builds the criteria to use in summarizing the information.abstract CriteriaAbstractPeerImpl. buildSelectCriteria(T obj)Build a Criteria object from the data object for this peer, skipping all binary columns.Methods in org.apache.torque.util with parameters of type Criteria Modifier and Type Method Description voidBasePeerImpl. addSelectColumns(Criteria criteria)Add all the columns needed to create a new object.BigDecimalAvgHelper. avg(Criteria c, String columnName)Returns the average of a column in a query.BigDecimalAvgHelper. avg(Criteria c, Connection conn, String columnName, TableMap tableMap)Returns the average of a column in a query.BigDecimalAvgHelper. avg(Criteria c, Connection conn, Column column)Returns the average of a column in a query.BigDecimalAvgHelper. avg(Criteria c, Column column)Returns the average of a column in a query.CriteriaSummaryHelper. buildCriteria(Criteria c)Builds the criteria to use in summarizing the information.voidBasePeerImpl. correctBooleans(Criteria criteria)Checks all columns in the criteria to see whether booleanchar and booleanint columns are queried with a boolean.intCountHelper. count(Criteria c)The COUNT function returns the number of rows in a query.intCountHelper. count(Criteria c, String columnName)Returns the number of rows in a query.intCountHelper. count(Criteria c, Connection conn)The COUNT function returns the number of rows in a query.intCountHelper. count(Criteria c, Connection conn, String columnName, TableMap tableMap)Returns the number of rows in a query.intCountHelper. count(Criteria c, Connection conn, Column column)Returns the number of rows in a query.intCountHelper. count(Criteria c, Column column)Returns the number of rows in a query.intBasePeerImpl. doDelete(Criteria criteria)Deletes rows from a database table.intBasePeerImpl. doDelete(Criteria criteria, Connection connection)Deletes rows from a table.intBasePeerImpl. doInsert(Column[] toInsertInto, Criteria criteria)Executes a insert into...select statement.intBasePeerImpl. doInsert(Column[] toInsertInto, Criteria criteria, String dbName)Executes a insert into...select statement.intBasePeerImpl. doInsert(Column[] toInsertInto, Criteria criteria, String dbName, Connection connection)Executes a insert into...select statement.intBasePeerImpl. doInsert(Column[] toInsertInto, Criteria criteria, Connection connection)Executes a insert into...select statement.List<T>BasePeerImpl. doSelect(Criteria criteria)Selects objects from a database.List<T>BasePeerImpl. doSelect(Criteria criteria, Connection connection)Selects objects from a database within a transaction.<TT> List<TT>BasePeerImpl. doSelect(Criteria criteria, RecordMapper<TT> mapper)Selects rows from a database an maps them to objects.<TT> List<TT>BasePeerImpl. doSelect(Criteria criteria, RecordMapper<TT> mapper, Connection connection)Performs a SQLselectusing a PreparedStatement.Stream<T>BasePeerImpl. doSelectAsStream(Criteria criteria, Connection connection)Selects objects from a database within a transaction.<TT> Stream<TT>BasePeerImpl. doSelectAsStream(Criteria criteria, RecordMapper<TT> mapper, Connection connection)Performs a SQLselectusing a PreparedStatement.TBasePeerImpl. doSelectSingleRecord(Criteria criteria)Selects at most one object from a database.TBasePeerImpl. doSelectSingleRecord(Criteria criteria, Connection connection)Selects at most one object from a database within a transaction.<TT> TTBasePeerImpl. doSelectSingleRecord(Criteria criteria, RecordMapper<TT> mapper)Selects at most a single row from a database an maps them to objects.<TT> TTBasePeerImpl. doSelectSingleRecord(Criteria criteria, RecordMapper<TT> mapper, Connection connection)Selects at most a single row from a database an maps them to objects.intBasePeerImpl. doUpdate(Criteria selectCriteria, ColumnValues updateValues)Executes an update against the database.intBasePeerImpl. doUpdate(Criteria criteria, ColumnValues updateValues, Connection connection)Executes an update against the database.protected voidBasePeerImpl. setDbName(Criteria crit)Sets the database name in the passed criteria to the table's default, if it is not already set.List<ListOrderedMapCI<Object>>SummaryHelper. summarize(Criteria crit)Return a list of ListOrderedMapCI objects with the results of the summary query.List<ListOrderedMapCI<Object>>SummaryHelper. summarize(Criteria crit, Connection conn)Return a list of OrderedMap objects with the results of the summary query.List<ListOrderedMapCI<Object>>SummaryHelper. summarize(Criteria crit, List<Class<?>> resultTypes)Return a list of ListOrderedMapCI objects with the results of the summary query.List<ListOrderedMapCI<Object>>SummaryHelper. summarize(Criteria crit, List<Class<?>> resultTypes, Connection conn)Return a list of ListOrderedMapCI objects with the results of the summary query.Constructors in org.apache.torque.util with parameters of type Criteria Constructor Description LargeSelect(Criteria criteria, int pageSize, int memoryPageLimit, BasePeerImpl<T> peerImpl)Creates a LargeSelect whose results are returned as aListcontaining a maximum ofpageSizeobjects of the type T at a time, maintaining a maximum ofmemoryPageLimitpages of results in memory.LargeSelect(Criteria criteria, int pageSize, BasePeerImpl<T> peerImpl)Creates a LargeSelect whose results are returned as aListcontaining a maximum ofpageSizeobjects of the type defined within the class namedreturnBuilderClassNameat a time, maintaining a maximum ofLargeSelect.memoryPageLimitpages of results in memory.ResultsetSpliterator(RecordMapper<T> recordMapper, Criteria criteria, Statement statement, ResultSet resultSet)Constructor
-