org.apache.empire.db
Class DBCommandExpr.DBCmdQuery

java.lang.Object
  extended by org.apache.empire.commons.ErrorObject
      extended by org.apache.empire.db.DBObject
          extended by org.apache.empire.db.DBExpr
              extended by org.apache.empire.db.DBRowSet
                  extended by org.apache.empire.db.DBCommandExpr.DBCmdQuery
All Implemented Interfaces:
java.io.Serializable, ErrorInfo
Enclosing class:
DBCommandExpr

protected static class DBCommandExpr.DBCmdQuery
extends DBRowSet

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.empire.commons.ErrorObject
ErrorObject.ObjectErrorInfo
 
Field Summary
 
Fields inherited from class org.apache.empire.db.DBRowSet
columnReferences, columns, comment, db, log, primaryKey, timestampColumn
 
Fields inherited from class org.apache.empire.db.DBExpr
CTX_ALIAS, CTX_ALL, CTX_DEFAULT, CTX_FULLNAME, CTX_NAME, CTX_NOPARENTHESES, CTX_VALUE
 
Constructor Summary
DBCommandExpr.DBCmdQuery(DBCommandExpr cmd, DBColumnExpr[] colList)
          Creates a new DBCmdQueryObject
 
Method Summary
 void addReferencedColumns(java.util.Set<DBColumn> list)
          Internal function to obtain all DBColumnExpr-objects used by this expression.
 void addSQL(java.lang.StringBuilder buf, long context)
          Creates the SQL-Command adds the select statement into the SQL-Command.
 boolean createRecord(DBRecord rec, java.sql.Connection conn)
          Returns the error message: ERR_NOTSUPPORTED
 boolean deleteRecord(java.lang.Object[] keys, java.sql.Connection conn)
          Returns the error message: ERR_NOTSUPPORTED
 java.lang.String getAlias()
          Not applicable - returns null
 DBColumn[] getKeyColumns()
          Prints the error message: ERR_NOTSUPPORTED.
 java.lang.String getName()
          Not applicable - returns null
 java.lang.Object[] getRecordKey(DBRecord rec)
          Prints the error message: ERR_NOTSUPPORTED.
 boolean initRecord(DBRecord rec, java.lang.Object[] keyValues)
          Returns the error message: ERR_NOTSUPPORTED
 boolean readRecord(DBRecord rec, java.lang.Object[] keys, java.sql.Connection conn)
          Returns the error message: ERR_NOTSUPPORTED
 boolean updateRecord(DBRecord rec, java.sql.Connection conn)
          Returns the error message: ERR_NOTSUPPORTED
 
Methods inherited from class org.apache.empire.db.DBRowSet
addColumnReference, completeInitRecord, count, deleteAllReferences, deleteRecord, deleteReferenceRecords, getColumn, getColumn, getColumnIndex, getColumnIndex, getColumnReferences, getColumns, getComment, getDatabase, getFullName, getRenameTablePhrase, getTimestampColumn, initRecord, isColumnReadOnly, isKeyColumn, prepareInitRecord, readRecord, recordExists, recordExists, setComment, setKeyConstraints, setTimestampColumn
 
Methods inherited from class org.apache.empire.db.DBExpr
getObjectValue, getValueClass
 
Methods inherited from class org.apache.empire.db.DBObject
error, error
 
Methods inherited from class org.apache.empire.commons.ErrorObject
clearError, clearErrorInfo, error, error, error, error, error, getErrorInfo, getErrorMessage, getErrorParams, getErrorSource, getErrorType, getMessage, hasError, internalSetError, isExceptionsEnabled, setExceptionsEnabled, success
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBCommandExpr.DBCmdQuery

public DBCommandExpr.DBCmdQuery(DBCommandExpr cmd,
                                DBColumnExpr[] colList)
Creates a new DBCmdQueryObject

Parameters:
cmd - the command expression
colList -
Method Detail

getName

public java.lang.String getName()
Not applicable - returns null

Specified by:
getName in class DBRowSet

getAlias

public java.lang.String getAlias()
Not applicable - returns null

Specified by:
getAlias in class DBRowSet

addReferencedColumns

public void addReferencedColumns(java.util.Set<DBColumn> list)
Description copied from class: DBExpr
Internal function to obtain all DBColumnExpr-objects used by this expression.

Overrides:
addReferencedColumns in class DBRowSet
Parameters:
list - list to which all used column expressions must be added
See Also:
DBExpr.addReferencedColumns(Set)

addSQL

public void addSQL(java.lang.StringBuilder buf,
                   long context)
Creates the SQL-Command adds the select statement into the SQL-Command.

Specified by:
addSQL in class DBExpr
Parameters:
buf - the SQL-Command
context - the current SQL-Command context

getKeyColumns

public DBColumn[] getKeyColumns()
Prints the error message: ERR_NOTSUPPORTED.

Overrides:
getKeyColumns in class DBRowSet
Returns:
null

getRecordKey

public java.lang.Object[] getRecordKey(DBRecord rec)
Prints the error message: ERR_NOTSUPPORTED.

Overrides:
getRecordKey in class DBRowSet
Parameters:
rec - the DBRecord object, contains all fields and the field properties
Returns:
null

initRecord

public boolean initRecord(DBRecord rec,
                          java.lang.Object[] keyValues)
Returns the error message: ERR_NOTSUPPORTED

Overrides:
initRecord in class DBRowSet
Parameters:
rec - the Record object
keyValues - an array of the primary key columns
Returns:
true if successful

createRecord

public boolean createRecord(DBRecord rec,
                            java.sql.Connection conn)
Returns the error message: ERR_NOTSUPPORTED

Specified by:
createRecord in class DBRowSet

readRecord

public boolean readRecord(DBRecord rec,
                          java.lang.Object[] keys,
                          java.sql.Connection conn)
Returns the error message: ERR_NOTSUPPORTED

Overrides:
readRecord in class DBRowSet
Parameters:
rec - the DBRecord object which will hold the record data
keys - the primary key values
conn - a valid JDBC connection.
Returns:
true if successful

updateRecord

public boolean updateRecord(DBRecord rec,
                            java.sql.Connection conn)
Returns the error message: ERR_NOTSUPPORTED

Overrides:
updateRecord in class DBRowSet
Parameters:
rec - the DBRecord object. contains all fields and the field properties
conn - a valid JDBC connection.
Returns:
true if the update was sucessful or false otherwise

deleteRecord

public boolean deleteRecord(java.lang.Object[] keys,
                            java.sql.Connection conn)
Returns the error message: ERR_NOTSUPPORTED

Specified by:
deleteRecord in class DBRowSet


Copyright © 2008-2011 Apache Software Foundation. All Rights Reserved.