org.apache.ojb.broker.accesslayer.sql
Class SqlSelectStatement
java.lang.Object
org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement
org.apache.ojb.broker.accesslayer.sql.SqlSelectStatement
- All Implemented Interfaces:
- JoinSyntaxTypes, SqlStatement
- public class SqlSelectStatement
- extends SqlQueryStatement
Model a SELECT Statement
- Version:
- $Id: SqlSelectStatement.java,v 1.17 2004/02/14 19:36:53 brj Exp $
- Author:
- Jakob Braeuchi
Method Summary |
protected java.util.List |
appendListOfColumns(java.lang.String[] columns,
java.lang.StringBuffer buf)
Appends to the statement a comma separated list of column names. |
protected java.util.List |
appendListOfColumnsForSelect(ClassDescriptor cld,
java.lang.StringBuffer buf)
Appends to the statement a comma separated list of column names. |
java.lang.String |
getStatement()
Answer the SELECT-Sql for the Statement |
Methods inherited from class org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement |
appendClause, appendColName, appendColName, appendColName, appendCriteria, appendGroupByClause, appendHavingClause, appendOrderByClause, appendSQLClause, appendTableWithJoins, appendWhereClause, buildSuperJoinTree, ensureColumns, getAttributeInfo, getBaseClassDescriptor, getColName, getFieldDescriptor, getJoinSyntaxType, getJoinTreeToCriteria, getLogger, getQuery, getRoot, getSearchClassDescriptor, getSearchTable, setRoot, splitCriteria |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SqlSelectStatement
public SqlSelectStatement(Platform pf,
ClassDescriptor cld,
Query query,
Logger logger)
- Constructor for SqlSelectStatement.
- Parameters:
pf
- cld
- query
- logger
-
SqlSelectStatement
public SqlSelectStatement(SqlQueryStatement parent,
Platform pf,
ClassDescriptor cld,
Query query,
Logger logger)
- Constructor for SqlSelectStatement.
- Parameters:
parent
- pf
- cld
- query
- logger
-
appendListOfColumnsForSelect
protected java.util.List appendListOfColumnsForSelect(ClassDescriptor cld,
java.lang.StringBuffer buf)
- Appends to the statement a comma separated list of column names.
MBAIRD: if the object being queried on has multiple classes mapped to the table,
then we will get all the fields that are a unique set across all those classes so if we need to
we can materialize an extent
DO NOT use this if order of columns is important. The row readers build reflectively and look up
column names to find values, so this is safe. In the case of update, you CANNOT use this as the
order of columns is important.
- Returns:
- list of column names for the set of all unique columns for multiple classes mapped to the
same table.
appendListOfColumns
protected java.util.List appendListOfColumns(java.lang.String[] columns,
java.lang.StringBuffer buf)
- Appends to the statement a comma separated list of column names.
- Parameters:
columns
- defines the columns to be selected (for reports)
- Returns:
- list of column names
getStatement
public java.lang.String getStatement()
- Answer the SELECT-Sql for the Statement
Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14