org.apache.empire.db
Class DBCombinedCmd
java.lang.Object
org.apache.empire.commons.ErrorObject
org.apache.empire.db.DBObject
org.apache.empire.db.DBExpr
org.apache.empire.db.DBCommandExpr
org.apache.empire.db.DBCombinedCmd
- All Implemented Interfaces:
- ErrorInfo
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.
Methods inherited from class org.apache.empire.db.DBCommandExpr |
addListExpr, addSQL, clearOrderBy, getCmdColumn, getCmdColumn, getInsertInto, getInsertInto, getInsertInto, getSelect, intersect, orderBy, union |
Methods inherited from class org.apache.empire.commons.ErrorObject |
clearError, clearErrorInfo, error, error, 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 |
DBCombinedCmd
public DBCombinedCmd(DBCommandExpr left,
java.lang.String keyWord,
DBCommandExpr right)
- Constructs a new DBFuncExpr object and
sets the specified parameters to this object.
- Parameters:
left
- the first DBCommandExpr objectkeyWord
- the key word between the wo DBCommandExpr objectsright
- the second DBCommandExpr object
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(java.util.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()
getSelect
public boolean getSelect(java.lang.StringBuilder buf)
- Creates the SQL-Command.
- Specified by:
getSelect
in class DBCommandExpr
- Parameters:
buf
- the SQL-Command
- Returns:
- true if the creation was successful
orderBy
public void orderBy(DBColumnExpr expr,
boolean desc)
- Description copied from class:
DBCommandExpr
- Adds an order by with ascending or descending order
- Overrides:
orderBy
in class DBCommandExpr
- Parameters:
expr
- the DBColumnExpr objectdesc
- if true, the results from select statement will sort top down
Copyright © 2008-2009 Apache Software Foundation. All Rights Reserved.