|
DODS 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.dods.cache.QueryCacheItemImpl
This class is for storing one query and its necessary data, for query array.
Field Summary | |
java.util.ArrayList |
conds
Array of conditions declared in WHERE part of the query (array of org.enhydra.dods.cache.Condition objects). |
java.util.LinkedHashSet |
OIds
Array of data object IDs which are results of the query. |
java.lang.String |
originDatabase
Database of the query. |
java.lang.String |
queryId
Query id: query in the form of string. |
int |
time
Time needed for query execution. |
Constructor Summary | |
QueryCacheItemImpl(java.lang.String origDb)
Constructor (String). |
|
QueryCacheItemImpl(java.lang.String qId,
java.util.LinkedHashSet OIds,
int time,
java.util.ArrayList conditions,
java.lang.String origDb)
Constructor (String, LinkedHashSet, int, ArrayList, String). |
Method Summary | |
void |
add(GenericDO obj)
Adds data object obj to array OIds. |
void |
addCond(Condition cond)
Add condition to query. |
boolean |
checkConditions(GenericDO obj)
Checks whether data object obj satisfies conditions of this query. |
void |
delete(GenericDO obj)
Removes data object obj from array OIds, if present. |
java.util.ArrayList |
getConds()
Returns array of conditions conds. |
java.util.HashSet |
getOIds()
Returns OIds (array of data objects which are the results of the query). |
java.lang.String |
getOriginDatabase()
Returns query database. |
java.lang.String |
getQueryId()
Returns query id. |
int |
getTime()
Returns time needed for query execution. |
void |
setConds(java.util.ArrayList conds)
Sets array of conditions. |
void |
setOIds(java.util.LinkedHashSet OIds)
Sets OIds (array of data objects which are the results of the query). |
void |
setQueryId(java.lang.String queryId)
Sets unique representation of query object. |
void |
setTime(int time)
Sets time needed for query execution. |
java.lang.String |
toString()
Shows content of this class. |
void |
update(GenericDO obj)
Inserts data object obj (or updates it if already exists) in array OIds, if it satisfies this query. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public java.lang.String queryId
public java.util.LinkedHashSet OIds
public int time
public java.util.ArrayList conds
public java.lang.String originDatabase
Constructor Detail |
public QueryCacheItemImpl(java.lang.String origDb)
origDb
- query databasepublic QueryCacheItemImpl(java.lang.String qId, java.util.LinkedHashSet OIds, int time, java.util.ArrayList conditions, java.lang.String origDb)
qId
- query idtime
- query execution timeconditions
- conditions (WHERE part of the query)origDb
- query databaseMethod Detail |
public java.lang.String getQueryId()
getQueryId
in interface QueryCacheItem
public void setQueryId(java.lang.String queryId)
setQueryId
in interface QueryCacheItem
queryId
- String
that unique represent query.public java.util.HashSet getOIds()
getOIds
in interface QueryCacheItem
public void setOIds(java.util.LinkedHashSet OIds)
setOIds
in interface QueryCacheItem
public int getTime()
getTime
in interface QueryCacheItem
public void setTime(int time)
setTime
in interface QueryCacheItem
time
- time needed for query executionpublic java.util.ArrayList getConds()
getConds
in interface QueryCacheItem
public void setConds(java.util.ArrayList conds)
setConds
in interface QueryCacheItem
conds
- array of conditionspublic void addCond(Condition cond)
addCond
in interface QueryCacheItem
cond
- Condition
that will be added to query.public java.lang.String getOriginDatabase()
getOriginDatabase
in interface QueryCacheItem
public boolean checkConditions(GenericDO obj)
checkConditions
in interface QueryCacheItem
obj
- dataobject for which are checked conditions of this query
public void update(GenericDO obj)
update
in interface QueryCacheItem
obj
- data object which may be inserted (or updated) in array OIdspublic void delete(GenericDO obj)
delete
in interface QueryCacheItem
obj
- data object which will be removed from array OIdspublic void add(GenericDO obj)
add
in interface QueryCacheItem
obj
- data object which will be added to array OIdspublic java.lang.String toString()
toString
in class java.lang.Object
|
DODS 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |