Enhydra 5.1 API

org.enhydra.dods.cache
Interface QueryCacheItem

All Known Implementing Classes:
QueryCacheItemImpl

public interface QueryCacheItem

This class is for storing one query and its necessary data, for query array.


Method Summary
 void add(GenericDO obj)
          Adds data object obj to array DOs.
 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 DOs, 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.
 void update(GenericDO obj)
          Inserts data object obj (or updates it if already exists) in array DOs, if it satisfies this query.
 

Method Detail

getQueryId

public java.lang.String getQueryId()
Returns query id.

Returns:
query id

setQueryId

public void setQueryId(java.lang.String queryId)
Sets unique representation of query object.

Parameters:
queryId - String that unique represent query.

getOIds

public java.util.HashSet getOIds()
Returns OIds (array of data objects which are the results of the query).

Returns:
query array of data objects which are the results of the query

setOIds

public void setOIds(java.util.LinkedHashSet OIds)
Sets OIds (array of data objects which are the results of the query).


getTime

public int getTime()
Returns time needed for query execution.

Returns:
time needed for query execution

setTime

public void setTime(int time)
Sets time needed for query execution.

Parameters:
time - time needed for query execution

getConds

public java.util.ArrayList getConds()
Returns array of conditions conds.

Returns:
array of conditions

setConds

public void setConds(java.util.ArrayList conds)
Sets array of conditions.

Parameters:
conds - array of conditions

addCond

public void addCond(Condition cond)
Add condition to query.

Parameters:
cond - Condition that will be added to query.

getOriginDatabase

public java.lang.String getOriginDatabase()
Returns query database.

Returns:
query database

checkConditions

public boolean checkConditions(GenericDO obj)
Checks whether data object obj satisfies conditions of this query.

Parameters:
obj - dataobject for which are checked conditions of this query
Returns:
true if data object obj satisfies conditions of this query, otherwise false.

update

public void update(GenericDO obj)
Inserts data object obj (or updates it if already exists) in array DOs, if it satisfies this query.

Parameters:
obj - data object which may be inserted (or updated) in array DOs

delete

public void delete(GenericDO obj)
Removes data object obj from array DOs, if present.

Parameters:
obj - data object which will be removed from array DOs

add

public void add(GenericDO obj)
Adds data object obj to array DOs.

Parameters:
obj - data object which will be added to array DOs

Enhydra 5.1 API