org.apache.ojb.broker.query
Class QueryByMtoNCriteria

java.lang.Object
  extended by org.apache.ojb.broker.query.AbstractQueryImpl
      extended by org.apache.ojb.broker.query.QueryByCriteria
          extended by org.apache.ojb.broker.query.QueryByMtoNCriteria
All Implemented Interfaces:
Serializable, MtoNQuery, Query

public class QueryByMtoNCriteria
extends QueryByCriteria
implements MtoNQuery

represents a search by criteria. "find all articles where article.price > 100" could be represented as: Criteria crit = new Criteria(); crit.addGreaterThan("price", new Double(100)); Query qry = new QueryByCriteria(Article.class, crit); The PersistenceBroker can retrieve Objects by Queries as follows: PersistenceBroker broker = PersistenceBrokerFactory.createPersistenceBroker(); Collection col = broker.getCollectionByQuery(qry);

Version:
$Id: QueryByMtoNCriteria.java,v 1.1 2007-08-24 22:17:36 ewestfal Exp $
Author:
Thomas Mahler
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.ojb.broker.query.QueryByCriteria
CRITERIA_SELECT_ALL
 
Fields inherited from class org.apache.ojb.broker.query.AbstractQueryImpl
m_baseClass, m_searchClass
 
Fields inherited from interface org.apache.ojb.broker.query.Query
NO_END_AT_INDEX, NO_START_AT_INDEX, NOT_SCROLLABLE, SCROLLABLE
 
Constructor Summary
QueryByMtoNCriteria(Class targetClass, String indirectionTable, Criteria criteria)
          Build a Query for class targetClass with criteria.
QueryByMtoNCriteria(Class targetClass, String indirectionTable, Criteria criteria, boolean distinct)
          Build a Query for class targetClass with criteria.
 
Method Summary
 String getIndirectionTable()
          return indirectionTable
 String toString()
          Insert the method's description here.
 
Methods inherited from class org.apache.ojb.broker.query.QueryByCriteria
addGroupBy, addGroupBy, addGroupBy, addOrderBy, addOrderBy, addOrderBy, addOrderByAscending, addOrderByDescending, addPathClass, addPrefetchedRelationship, getClassesForPath, getCriteria, getGroupBy, getHavingCriteria, getObjectProjectionAttribute, getOrderBy, getOuterJoinPaths, getPathClasses, getPrefetchedRelationships, isDistinct, isPathOuterJoin, setCriteria, setDistinct, setHavingCriteria, setObjectProjectionAttribute, setObjectProjectionAttribute, setPathClass, setPathOuterJoin
 
Methods inherited from class org.apache.ojb.broker.query.AbstractQueryImpl
fullSize, fullSize, getBaseClass, getEndAtIndex, getExampleObject, getFetchSize, getSearchClass, getStartAtIndex, getWithExtents, setEndAtIndex, setFetchSize, setStartAtIndex, setWithExtents, usePaging
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryByMtoNCriteria

public QueryByMtoNCriteria(Class targetClass,
                           String indirectionTable,
                           Criteria criteria)
Build a Query for class targetClass with criteria. Criteriy may be null (will result in a query returning ALL objects from a table)


QueryByMtoNCriteria

public QueryByMtoNCriteria(Class targetClass,
                           String indirectionTable,
                           Criteria criteria,
                           boolean distinct)
Build a Query for class targetClass with criteria. Criteriy may be null (will result in a query returning ALL objects from a table)

Method Detail

getIndirectionTable

public String getIndirectionTable()
return indirectionTable

Specified by:
getIndirectionTable in interface MtoNQuery
Returns:
Returns a String[]

toString

public String toString()
Insert the method's description here. Creation date: (07.02.2001 22:01:55)

Overrides:
toString in class QueryByCriteria
Returns:
java.lang.String


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.