com.compoze.exchange.webdav.sql
Class SelectStatement
java.lang.Object
|
+--com.compoze.exchange.webdav.sql.AbstractSqlFragment
|
+--com.compoze.exchange.webdav.sql.SelectStatement
- All Implemented Interfaces:
- ISqlFragment, java.io.Serializable
- public class SelectStatement
- extends AbstractSqlFragment
- implements ISqlFragment, java.io.Serializable
This class represents the Structured Query Language (SQL) "SELECT" statement.
The "SELECT" statement is used to select items from a data store.
The following example illustrates the use of SelectStatement
:
SelectStatement stmt = new SelectStatement(
new String[]
{
"\"DAV:href\"",
"\"DAV:displayname\"",
"\"DAV:contentclass\"",
"\"urn:schemas:httpmail:subject\""
},
new FromClause(new String[]
{
"/exchange/skip.ogrudnick/Inbox/",
"/exchange/skip.ogrudnick/Inbox/sub1/",
"/exchange/skip.ogrudnick/Inbox/sub2/"
}, IScope.SHALLOW_TRAVERSAL),
new WhereClause(Condition.create(new GreaterThanOperator("urn:schemas:contacts:givenName", "Skip"), true)),
new GroupByClause(new String[]
{
"DAV:href",
"DAV:contentclass"
}),
OrderByClause.create("uurn:schemas:httpmail:datereceived", OrderByClause.DESCENDING));
System.out.println(stmt);
- See Also:
- Serialized Form
Method Summary |
static void |
main(java.lang.String[] args)
Main. |
java.lang.String |
toSQL()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SelectStatement
public SelectStatement(java.lang.String[] properties,
java.lang.String[] sources,
int iScope)
- Constructor.
- Parameters:
properties
- an array of propertiessources
- an array of URLs of source collectionsiScope
- the scope of the search
SelectStatement
public SelectStatement(java.lang.String[] properties,
FromClause from,
WhereClause where,
GroupByClause groupBy,
OrderByClause orderBy)
- Constructor.
- Parameters:
properties
- an array of propertiesfrom
- the "FROM" clausewhere
- the "WHERE" clausegroupBy
- the "GROUP BY" clauseorderBy
- the "ORDER BY" clause
toSQL
public java.lang.String toSQL()
- Returns a string representation of the object.
- Specified by:
toSQL
in interface ISqlFragment
- Overrides:
toSQL
in class AbstractSqlFragment
- Returns:
- the string representation of the object
main
public static void main(java.lang.String[] args)
- Main.
This is the exerciser.
- Parameters:
args
- array of arguments
Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.