org.apache.empire.db
Class DBCombinedCmd

java.lang.Object
  extended by org.apache.empire.db.DBObject
      extended by org.apache.empire.db.DBExpr
          extended by org.apache.empire.db.DBCommandExpr
              extended by org.apache.empire.db.DBCombinedCmd
All Implemented Interfaces:
Serializable

public class DBCombinedCmd
extends DBCommandExpr

This class is used for building up a partition of a SQL-Command. It handles the insert from a specified key word between two DBCommandExpr objects.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.empire.db.DBCommandExpr
DBCommandExpr.DBCmdColumn, DBCommandExpr.DBCmdQuery
 
Field Summary
protected  String keyWord
           
protected  DBCommandExpr left
           
protected  DBCommandExpr right
           
 
Fields inherited from class org.apache.empire.db.DBCommandExpr
cmdQuery, orderBy
 
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
DBCombinedCmd(DBCommandExpr left, String keyWord, DBCommandExpr right)
          Constructs a new DBFuncExpr object and sets the specified parameters to this object.
 
Method Summary
 void addReferencedColumns(Set<DBColumn> list)
          Internal function to obtain all DBColumnExpr-objects used by this expression.
 DBDatabase getDatabase()
          Returns the current DBDatabase object.
 Object[] getParamValues()
          Returns the list of parameter values for a prepared statement.
 void getSelect(StringBuilder buf)
          Creates the SQL-Command.
 DBColumnExpr[] getSelectExprList()
          Calls the method dbDBCommandExpr.getSelectExprList from the private variable 'left'.
 boolean isValid()
           
 void orderBy(DBOrderByExpr... exprs)
          Adds an order by expression the command
 
Methods inherited from class org.apache.empire.db.DBCommandExpr
addListExpr, addSQL, clearLimit, clearOrderBy, getCmdColumn, getInsertInto, getInsertInto, getInsertInto, getSelect, intersect, limitRows, orderBy, orderBy, skipRows, union
 
Methods inherited from class org.apache.empire.db.DBExpr
getObjectValue, getValueClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

left

protected DBCommandExpr left

right

protected DBCommandExpr right

keyWord

protected String keyWord
Constructor Detail

DBCombinedCmd

public DBCombinedCmd(DBCommandExpr left,
                     String keyWord,
                     DBCommandExpr right)
Constructs a new DBFuncExpr object and sets the specified parameters to this object.

Parameters:
left - the first DBCommandExpr object
keyWord - the key word between the two DBCommandExpr objects
right - the second DBCommandExpr object
Method Detail

isValid

public boolean isValid()
Specified by:
isValid in class DBCommandExpr

getDatabase

public DBDatabase getDatabase()
Returns the current DBDatabase object.

Specified by:
getDatabase in class DBObject
Returns:
the current DBDatabase object

addReferencedColumns

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

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

getSelectExprList

public DBColumnExpr[] getSelectExprList()
Calls the method dbDBCommandExpr.getSelectExprList from the private variable 'left'. Returns a array of all DBColumnExpr object of the Vector: 'select'.

Specified by:
getSelectExprList in class DBCommandExpr
Returns:
returns an array of all DBColumnExpr object of the Vector: 'select'
See Also:
DBCommandExpr.getSelectExprList()

getParamValues

public Object[] getParamValues()
Returns the list of parameter values for a prepared statement.

Specified by:
getParamValues in class DBCommandExpr
Returns:
the list of parameter values for a prepared statement

getSelect

public void getSelect(StringBuilder buf)
Creates the SQL-Command.

Specified by:
getSelect in class DBCommandExpr
Parameters:
buf - the SQL-Command

orderBy

public void orderBy(DBOrderByExpr... exprs)
Description copied from class: DBCommandExpr
Adds an order by expression the command

Overrides:
orderBy in class DBCommandExpr
Parameters:
exprs - vararg of orderBy expressions
See Also:
DBCommandExpr.orderBy(DBColumnExpr, boolean)


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