|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--arlut.csd.ganymede.Query
The Query class is used to submit query requests to the GANYMEDE server, both for complex database searches and for simple object listings. A Query class can fully specify a boolean search expression on any field of any object type in the GANYMEDE database. Each Query, however, can only search one object type at a time.
While providing support for arbitrarily complex queries, the Query class also includes constructors for the simple "list object" case.
| Field Summary | |
(package private) boolean |
editableOnly
If true, this query will only be matched against objects in the database that the user has permission to edit. |
(package private) boolean |
filtered
If true, this query will only be matched against the subset of objects in the database that the user has requested via the Session filter mechanism. |
(package private) java.util.Vector |
linkedQueries
A Vector of Query's that can be associated with this query. This vector is used to allow the inclusion of queries on embedded objects.. |
(package private) java.lang.String |
objectName
The name of the object type that the queryNodes are looking to match on. |
(package private) short |
objectType
The id of the object type that the queryNodes are looking to match on. |
(package private) java.util.Hashtable |
permitList
A list of field id's in Short form that the server will take into account when returning a data dump. |
(package private) java.lang.String |
returnName
The name of the object type that the query should return.. |
(package private) short |
returnType
The id of the object type that the query should return.. |
(package private) arlut.csd.ganymede.QueryNode |
root
The root of a graph of QueryNodes that encodes the desired search criteria. |
(package private) java.lang.String |
saveName
We want to be able to save a query on the server and re-issue it on behalf of the user. |
(package private) static long |
serialVersionUID
|
| Constructor Summary | |
Query(short objectType)
Constructor for a query to list all editable objects of the specified type. |
|
Query(short objectType,
arlut.csd.ganymede.QueryNode root)
Constructor to create a query returning only editable objects (base by id) |
|
Query(short objectType,
arlut.csd.ganymede.QueryNode root,
boolean editableOnly)
Constructor for fully specified query (base by id) |
|
Query(java.lang.String objectName)
Constructor for a query to list all editable objects of the specified type. |
|
Query(java.lang.String objectName,
arlut.csd.ganymede.QueryNode root)
Constructor to create a query returning only editable objects (base by name) |
|
Query(java.lang.String objectName,
arlut.csd.ganymede.QueryNode root,
boolean editableOnly)
Constructor for fully specified query (base by name) |
|
| Method Summary | |
void |
addField(short id)
This method adds a field identifier to the list of fields that may be returned. |
void |
addQuery(arlut.csd.ganymede.Query query)
This method allows the client to add a list of subordinate queries to this query. |
void |
resetPermitList()
This method resets the permitList, allowing all fields to be returned by default. |
void |
setFiltered(boolean filtered)
This method determines whether the query engine will filter the query according to the current list of visible owner groups. |
void |
setReturnType(short returnType)
This method sets the desired return type, for use in performing queries on embedded types when a parent type is what is desired. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
static final long serialVersionUID
java.lang.String objectName
java.lang.String returnName
java.lang.String saveName
short objectType
short returnType
arlut.csd.ganymede.QueryNode root
boolean editableOnly
boolean filtered
java.util.Hashtable permitList
java.util.Vector linkedQueries
| Constructor Detail |
public Query(short objectType,
arlut.csd.ganymede.QueryNode root,
boolean editableOnly)
objectType - numeric object type code to search overroot - root node of a boolean logic tree to be processed in an in-order traversaleditableOnly - if true, the server will only return objects that the user's session
currently has permission to edit
public Query(java.lang.String objectName,
arlut.csd.ganymede.QueryNode root,
boolean editableOnly)
objectName - name of object type to queryroot - root node of a boolean logic tree to be processed in an in-order traversaleditableOnly - if true, the server will only return objects that
the user's session currently has permission to edit
public Query(short objectType,
arlut.csd.ganymede.QueryNode root)
objectType - numeric object type code to search overroot - root node of a boolean logic tree to be processed in an in-order traversal
public Query(java.lang.String objectName,
arlut.csd.ganymede.QueryNode root)
objectName - name of object type to queryroot - root node of a boolean logic tree to be processed in an in-order traversalpublic Query(short objectType)
objectType - numeric object type code to search overpublic Query(java.lang.String objectName)
objectName - name of object type to query| Method Detail |
public void setFiltered(boolean filtered)
This method determines whether the query engine will filter the query according to the current list of visible owner groups. Queries by default are filtered.
filtered - If true, the query will be masked by ownershipSession.filterQueries(java.util.Vector)public void resetPermitList()
This method resets the permitList, allowing all fields to be returned by default.
public void setReturnType(short returnType)
This method sets the desired return type, for use in performing queries on embedded types when a parent type is what is desired.
public void addField(short id)
This method adds a field identifier to the list of fields that may be returned. Once this method is called with a field identifier, the query will only return fields that have been explicitly added.
resetPermitList() may be called to reset the list to the initial allow-all state.
public void addQuery(arlut.csd.ganymede.Query query)
This method allows the client to add a list of subordinate queries to this query. The queries attached to this query *will not* have their subordinate queries processed.
Queries added with this method are used to allow queries to include checks on embedded objects.
It does no good to pass queries to addQuery that do not have the same return type as this query.
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||