org.apache.ojb.broker.query
Class ReportQueryByCriteria

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.ReportQueryByCriteria
All Implemented Interfaces:
java.io.Serializable, Query, ReportQuery
Direct Known Subclasses:
ReportQueryByMtoNCriteria

public class ReportQueryByCriteria
extends QueryByCriteria
implements ReportQuery

Query for Reports. Supports selection of a subset of attributes.

Version:
$Id: ReportQueryByCriteria.java 365232 2005-12-21 22:36:07Z tomdz $
Author:
Jakob Braeuchi
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.ojb.broker.query.QueryByCriteria
CRITERIA_SELECT_ALL
 
Fields inherited from interface org.apache.ojb.broker.query.Query
NO_END_AT_INDEX, NO_START_AT_INDEX, NOT_SCROLLABLE, SCROLLABLE
 
Constructor Summary
ReportQueryByCriteria(java.lang.Class targetClass, Criteria criteria)
          Constructor for ReportQueryByCriteria.
ReportQueryByCriteria(java.lang.Class targetClass, Criteria criteria, boolean distinct)
          Constructor for ReportQueryByCriteria.
ReportQueryByCriteria(java.lang.Class targetClass, java.lang.String[] attributes, Criteria criteria)
          Constructor for ReportQueryByCriteria.
ReportQueryByCriteria(java.lang.Class targetClass, java.lang.String[] attributes, Criteria criteria, boolean distinct)
          Constructor for ReportQueryByCriteria.
 
Method Summary
 java.util.Map getAttributeFieldDescriptors()
          Returns a Map with FieldDescriptors identified by Attribute
 java.lang.String[] getAttributes()
          Gets the attributes to be selected.
 java.lang.String[] getColumns()
          Deprecated. use getAttributes()
 int[] getJdbcTypes()
          Gets the Jdbc-Types of the columns used for the Report.
 java.lang.String[] getJoinAttributes()
          Gets the additional attributes used for building the Join.
 void setAttributeFieldDescriptors(java.util.Map attrToFld)
           
 void setAttributes(java.lang.String[] attributes)
          Sets the attributes to be selected.
 void setColumns(java.lang.String[] columns)
          Deprecated. use setAttributes()
 void setJdbcTypes(int[] jdbcTypes)
           
 void setJoinAttributes(java.lang.String[] joinAttributes)
           
 java.lang.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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReportQueryByCriteria

public ReportQueryByCriteria(java.lang.Class targetClass,
                             java.lang.String[] attributes,
                             Criteria criteria,
                             boolean distinct)
Constructor for ReportQueryByCriteria.

Parameters:
targetClass -
attributes[] -
criteria -
distinct -

ReportQueryByCriteria

public ReportQueryByCriteria(java.lang.Class targetClass,
                             java.lang.String[] attributes,
                             Criteria criteria)
Constructor for ReportQueryByCriteria.

Parameters:
targetClass -
attributes[] -
criteria -

ReportQueryByCriteria

public ReportQueryByCriteria(java.lang.Class targetClass,
                             Criteria criteria)
Constructor for ReportQueryByCriteria.

Parameters:
targetClass -
criteria -

ReportQueryByCriteria

public ReportQueryByCriteria(java.lang.Class targetClass,
                             Criteria criteria,
                             boolean distinct)
Constructor for ReportQueryByCriteria.

Parameters:
targetClass -
criteria -
distinct -
Method Detail

getColumns

public java.lang.String[] getColumns()
Deprecated. use getAttributes()

Gets the columns.

Specified by:
getColumns in interface ReportQuery
Returns:
Returns a String[]

setColumns

public void setColumns(java.lang.String[] columns)
Deprecated. use setAttributes()

Sets the columns.

Parameters:
columns - The columns to set

getAttributes

public java.lang.String[] getAttributes()
Gets the attributes to be selected.
Attributes are translated into db-columns

Specified by:
getAttributes in interface ReportQuery
Returns:
the attributes to be selected

setAttributes

public void setAttributes(java.lang.String[] attributes)
Sets the attributes to be selected.
Attributes are translated into db-columns

Parameters:
attributes - The attributes to set

getJdbcTypes

public int[] getJdbcTypes()
Description copied from interface: ReportQuery
Gets the Jdbc-Types of the columns used for the Report. If null the Jdbc-Type is taken from the ResultSet

Specified by:
getJdbcTypes in interface ReportQuery
Returns:
Returns the jdbcTypes.
See Also:
Types

setJdbcTypes

public void setJdbcTypes(int[] jdbcTypes)
Parameters:
jdbcTypes - The jdbcTypes to set.

getJoinAttributes

public java.lang.String[] getJoinAttributes()
Description copied from interface: ReportQuery
Gets the additional attributes used for building the Join. These Attributes are not appended to the select-clause.

Specified by:
getJoinAttributes in interface ReportQuery
Returns:
Returns the joinAttributes.

setJoinAttributes

public void setJoinAttributes(java.lang.String[] joinAttributes)
Parameters:
joinAttributes - The joinAttributes to set.

toString

public java.lang.String toString()
Description copied from class: QueryByCriteria
Insert the method's description here. Creation date: (07.02.2001 22:01:55)

Overrides:
toString in class QueryByCriteria
Returns:
java.lang.String
See Also:
Object.toString()

getAttributeFieldDescriptors

public java.util.Map getAttributeFieldDescriptors()
Description copied from interface: ReportQuery
Returns a Map with FieldDescriptors identified by Attribute

Specified by:
getAttributeFieldDescriptors in interface ReportQuery
Returns:
Map

setAttributeFieldDescriptors

public void setAttributeFieldDescriptors(java.util.Map attrToFld)


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30