Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jdbf.engine.sql
Class SelectStatement  view SelectStatement download SelectStatement.java

java.lang.Object
  extended byorg.jdbf.engine.sql.SQLStatement
      extended byorg.jdbf.engine.sql.SelectStatement

public class SelectStatement
extends SQLStatement

SelectStatement is that class that represents the select sql statement. SelectStatement handles the creation of sql statement with the informations specified in a RepositoryView object and provides to execute the select statement.


Field Summary
protected static java.lang.String FROM
          FROM statement
protected static java.lang.String SELECT
          SELECT statement
 
Fields inherited from class org.jdbf.engine.sql.SQLStatement
className, CLOSE_BRACE, criteria, OPEN_BRACE, statement, WHERE
 
Constructor Summary
SelectStatement()
          Creates the empty object
SelectStatement(org.jdbf.engine.repository.RepositoryView view, java.lang.String[] propertiesNames, org.jdbf.engine.criteria.Criteria criteria)
          Creates the SelectStatement object and build the statement
 
Method Summary
 java.lang.String buildStatement(org.jdbf.engine.repository.RepositoryView repository, java.lang.String[] propertiesNames)
          Builds the select statement with the informations passed by repository.
 java.lang.String buildStatementForCriteria(org.jdbf.engine.repository.RepositoryView repository, java.lang.String[] propertiesNames)
           
protected  java.util.ArrayList getValuesFromResultSet(org.jdbf.engine.repository.RepositoryView view, java.sql.ResultSet results)
          Get results of select statement from ResultSet.
 QueryResults select(java.lang.String repositoryViewName, org.jdbf.engine.repository.RepositoryView view, java.sql.Connection connection)
          Executes the select statement and retunathe ObjectMapped object specified in obj.
 
Methods inherited from class org.jdbf.engine.sql.SQLStatement
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SELECT

protected static final java.lang.String SELECT
SELECT statement


FROM

protected static final java.lang.String FROM
FROM statement

Constructor Detail

SelectStatement

public SelectStatement(org.jdbf.engine.repository.RepositoryView view,
                       java.lang.String[] propertiesNames,
                       org.jdbf.engine.criteria.Criteria criteria)
Creates the SelectStatement object and build the statement


SelectStatement

public SelectStatement()
Creates the empty object

Method Detail

buildStatement

public java.lang.String buildStatement(org.jdbf.engine.repository.RepositoryView repository,
                                       java.lang.String[] propertiesNames)
Builds the select statement with the informations passed by repository. These informations are:
  • tableName;
  • columnTableName

    Specified by:
    buildStatement in class SQLStatement

  • buildStatementForCriteria

    public java.lang.String buildStatementForCriteria(org.jdbf.engine.repository.RepositoryView repository,
                                                      java.lang.String[] propertiesNames)
    Specified by:
    buildStatementForCriteria in class SQLStatement

    select

    public QueryResults select(java.lang.String repositoryViewName,
                               org.jdbf.engine.repository.RepositoryView view,
                               java.sql.Connection connection)
                        throws java.sql.SQLException,
                               org.jdbf.engine.mapping.MappingException
    Executes the select statement and retunathe ObjectMapped object specified in obj.


    getValuesFromResultSet

    protected java.util.ArrayList getValuesFromResultSet(org.jdbf.engine.repository.RepositoryView view,
                                                         java.sql.ResultSet results)
                                                  throws java.sql.SQLException,
                                                         org.jdbf.engine.mapping.MappingException
    Get results of select statement from ResultSet. It creates an instance of ObjectMapped object. Type of ObjectMapped is specified in repository, then it sets all properties of this object with the values