| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oozie.util.db.SqlStatement
org.apache.oozie.util.db.SqlStatement.Select
public static class SqlStatement.Select
Select Statement generator. Generate the SQL Statement for select statements. Provide methods to add WHERE clause, ORDER BY clause, FOR UPDATE clause.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class org.apache.oozie.util.db.SqlStatement | 
|---|
SqlStatement.Condition, SqlStatement.Delete, SqlStatement.Insert, SqlStatement.ResultSetReader, SqlStatement.Select, SqlStatement.Update | 
| Field Summary | 
|---|
| Fields inherited from class org.apache.oozie.util.db.SqlStatement | 
|---|
forUpdate, sb, values | 
| Method Summary | |
|---|---|
 SqlStatement.Select | 
forUpdate()
Set the "for update" flag to lock the rows for updating  | 
 SqlStatement.Select | 
limit(int offset,
           int limit)
Setting the offset and limit for LIMIT clause  | 
 SqlStatement.Select | 
orderBy(Schema.Column column,
               boolean order)
Sets the column to sort and the order of sort  | 
 SqlStatement.Select | 
orderBy(Schema.Column column0,
               boolean order0,
               Schema.Column column1,
               boolean order1)
To sort 2 columns  | 
 String | 
toString()
Generate the SQL Select Statement with conditions and other clauses that were set  | 
 SqlStatement.Select | 
where(SqlStatement.Condition condition)
Set the condition for where clause  | 
| Methods inherited from class org.apache.oozie.util.db.SqlStatement | 
|---|
and, between, deleteFrom, getCount, getNewStatementWithValues, greaterThan, greaterThanOrEqual, in, in, insertInto, isEqual, isLike, isNotEqual, isNotLike, isNotNull, isNull, lessThan, lessThanOrEqual, notBetween, notIn, notIn, or, parse, prepare, prepare, prepareAndSetValues, prepareForBatch, selectAllFrom, selectColumns, setValue, update | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Method Detail | 
|---|
public SqlStatement.Select where(SqlStatement.Condition condition)
condition - condition for where clause
Select for cascading
public SqlStatement.Select orderBy(Schema.Column column,
                                   boolean order)
column - column to sortorder - true = ascending
Select for cascading
public SqlStatement.Select orderBy(Schema.Column column0,
                                   boolean order0,
                                   Schema.Column column1,
                                   boolean order1)
column0 - First column to be sortedorder0 - true = ascendingcolumn1 - Second column to be sortedorder1 - true = ascending
Select for cascading
public SqlStatement.Select limit(int offset,
                                 int limit)
offset - limit - 
Select for cascadingpublic SqlStatement.Select forUpdate()
Select for cascadingpublic String toString()
toString in class Object
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||