|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.unidu.is.sql.SQL
A class for storing abstract SQL "select" and "insert into" statements.
| Field Summary | |
protected java.util.List |
from
A list of table names, or of strings of the form {tablename} {alias}. |
protected java.util.List |
group
A list of group by expressions. |
protected java.lang.String |
insertTable
The name of the table where values have to be inserted. |
protected boolean |
isDistinct
A flag specifying if a distinct clause has to be used in the select part. |
protected int |
limit
A maximum number of documents to be selected, or zero if there is no limit part. |
protected java.util.List |
order
A list of columns specifiying the order of the rows. |
protected boolean |
orderDesc
A flag specifying if the order is ascending (flag is false) or descending (flag is true). |
protected java.util.List |
select
A list of expressions, forming the select part. |
protected java.util.List |
where
A list of expressions, forming the where part. |
| Constructor Summary | |
SQL()
|
|
| Method Summary | |
java.util.List |
getFrom()
Returns the from list. |
java.util.List |
getGroup()
Returns the group list. |
java.lang.String |
getInsertTable()
Returns the name of the name in which the selected data should be inserted into. |
int |
getLimit()
Returns the maximum number of documents to retrieve. |
java.util.List |
getOrder()
Returns the order list. |
java.util.List |
getSelect()
Returns the list of select expression. |
java.util.List |
getWhere()
Returns the list of where expressions. |
boolean |
isDistinct()
Returns whether the rows have to be distinct. |
boolean |
isOrderDesc()
Returns whether the order is descening, if ther is an order part. |
void |
setDistinct(boolean flag)
Sets whether the rows have to be distinct. |
void |
setFrom(java.util.List list)
Sets the from list. |
void |
setGroup(java.util.List list)
Sets the group list |
void |
setInsertTable(java.lang.String name)
Sets the name of the name in which the selected data should be inserted into. |
void |
setLimit(int limit)
Sets the maximum number of documents to retrieve. |
void |
setOrder(java.util.List list)
Sets the order list |
void |
setOrder(java.util.List list,
boolean orderDesc)
Sets the order list and if it is descending or ascending. |
void |
setOrderDesc(boolean b)
Sets if it is descending or ascending. |
void |
setSelect(java.util.List list)
Sets the list of select expressions. |
void |
setWhere(java.util.List list)
Sets the list of where expressions. |
java.lang.String |
toString()
Returns a textual description of this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String insertTable
protected java.util.List select
protected java.util.List from
{tablename} {alias}.
protected java.util.List where
protected java.util.List group
protected int limit
protected java.util.List order
protected boolean orderDesc
protected boolean isDistinct
| Constructor Detail |
public SQL()
| Method Detail |
public java.lang.String getInsertTable()
public void setInsertTable(java.lang.String name)
name - table namepublic java.util.List getSelect()
public void setSelect(java.util.List list)
list - list of select expressionspublic boolean isDistinct()
public void setDistinct(boolean flag)
flag - return true iff the rows have to be distinctpublic java.util.List getFrom()
public void setFrom(java.util.List list)
list - from listpublic java.util.List getWhere()
public void setWhere(java.util.List list)
list - list of where expressionspublic java.util.List getGroup()
public void setGroup(java.util.List list)
list - group listpublic int getLimit()
public void setLimit(int limit)
limit - maximum number of documents to retrievepublic java.util.List getOrder()
public boolean isOrderDesc()
public void setOrder(java.util.List list)
list - order list
public void setOrder(java.util.List list,
boolean orderDesc)
list - order listorderDesc - if true, then the order is descendingpublic void setOrderDesc(boolean b)
b - if true, then the order is descendingpublic java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||