|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.liquidsite.core.data.ContentQuery
A content database query. This class is used to compose complex select queries for selecting lists of content objects.
| Field Summary | |
static java.lang.String |
AUTHOR_KEY
The content revision author sorting key. |
static java.lang.String |
CATEGORY_KEY
The content category sorting key. |
static java.lang.String |
COMMENT_KEY
The content revision comment sorting key. |
static java.lang.String |
ID_KEY
The content identifier sorting key. |
static java.lang.String |
MODIFIED_KEY
The content revision modified date sorting key. |
static java.lang.String |
NAME_KEY
The content name sorting key. |
static java.lang.String |
ONLINE_KEY
The content online date sorting key. |
static java.lang.String |
PARENT_KEY
The content parent identifier sorting key. |
static java.lang.String |
REVISION_KEY
The content revision sorting key. |
| Constructor Summary | |
ContentQuery(java.lang.String domain)
Creates a new content query for objects in the specified domain. |
|
| Method Summary | |
DatabaseQuery |
createCountQuery()
Creates a new database count query containing all of the parameters in this query. |
DatabaseQuery |
createSelectQuery()
Creates a new database select query containing all of the parameters in this query. |
boolean |
isSorting()
Checks if the query contains sort columns. |
void |
limitResults(int start,
int count)
Sets the result start and count limitations. |
void |
requireAttribute(java.lang.String attribute,
java.lang.String value)
Sets the attribute value requirement. |
void |
requireCategory(int category)
Sets the content category requirement. |
void |
requireOnline(boolean online)
Sets the online content requirement. |
void |
requireParent(int parent)
Adds a content parent requirement. |
void |
requirePublished(boolean published)
Sets the published content requirement. |
void |
sortByAttribute(java.lang.String attribute,
boolean ascending)
Adds a sort key attribute to the query. |
void |
sortByKey(java.lang.String key,
boolean ascending)
Adds a sort key column to the query. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String ID_KEY
public static final java.lang.String REVISION_KEY
public static final java.lang.String CATEGORY_KEY
public static final java.lang.String NAME_KEY
public static final java.lang.String PARENT_KEY
public static final java.lang.String ONLINE_KEY
public static final java.lang.String MODIFIED_KEY
public static final java.lang.String AUTHOR_KEY
public static final java.lang.String COMMENT_KEY
| Constructor Detail |
public ContentQuery(java.lang.String domain)
domain - the domain name| Method Detail |
public boolean isSorting()
public void requireParent(int parent)
parent - the content parent identifierpublic void requireCategory(int category)
category - the content category requiredpublic void requirePublished(boolean published)
published - the published flagpublic void requireOnline(boolean online)
online - the online flag
public void requireAttribute(java.lang.String attribute,
java.lang.String value)
attribute - the attribute namevalue - the attribute value
public void sortByKey(java.lang.String key,
boolean ascending)
key - the sort column keyascending - the ascending sort order flag
public void sortByAttribute(java.lang.String attribute,
boolean ascending)
attribute - the sort attribute nameascending - the ascending sort order flag
public void limitResults(int start,
int count)
start - the index of the first result rowcount - the maximum number of result rowspublic DatabaseQuery createCountQuery()
public DatabaseQuery createSelectQuery()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||