DODS 7.3 API

org.enhydra.dods.cache
Interface QueryCacheItem

All Known Implementing Classes:
QueryCacheItemImpl

public interface QueryCacheItem

This interface stores one query and its necessary data, for query array.

Version:
2.0 15.06.2003.
Author:
Tanja Jovanovic, Nenad Vico

Method Summary
 void add(CoreDataStruct obj)
          Adds DataStruct object obj to array DOs.
 void add(GenericDO obj)
          Adds data object obj to array DOs.
 void addCond(Condition cond)
          Adds condition to query.
 boolean checkConditions(CoreDataStruct obj)
          Checks whether DataStruct object obj satisfies conditions of this query.
 boolean checkConditions(GenericDO obj)
          Checks whether data object obj satisfies conditions of this query.
 void delete(CoreDataStruct obj)
          Removes DataStruct object obj from array DOs, if present.
 void delete(GenericDO obj)
          Removes data object obj from array DOs, if present.
 java.lang.String get_OriginDatabase()
          Returns query database.
 java.util.ArrayList getConds()
          Returns array of query conditions conds.
 java.util.Collection getOIds()
          Returns OIds (Collection of object IDs which are results of the query).
 java.lang.String getOriginDatabase()
          Deprecated. Use get_OriginDatabase()
 java.lang.String getQueryId()
          Returns query id (String it the form: "query_database_name.String_presentation_of_query").
 int getResultNum()
          Returns number of cached query results.
 int getTime()
          Returns time needed for query execution.
 boolean isCompleteResult()
          Returns true if all query results are cached, otherwise false.
 boolean isModifiedQuery()
          Returns true if there have been performed inserts, updates or deletes concerning results of this query, otherwise false.
 void setCompleteResult(boolean newCompleteRes)
          Sets new boolean value about the cached query results (true if all query results are cached, otherwise false).
 void setConds(java.util.ArrayList conds)
          Sets array of query conditions.
 void setModifiedQuery(boolean mod)
          Sets flag coccerning information whether the query is modified.
 void setQueryId(java.lang.String queryId)
          Sets query id (String it the form: "query_database_name.String_presentation_of_query").
 void setTime(int time)
          Sets time needed for query execution.
 void update(CoreDataStruct obj)
          Inserts DataStruct object obj (or updates it if already exists) in array DOs, if it satisfies this query.
 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

java.lang.String getQueryId()
Returns query id (String it the form: "query_database_name.String_presentation_of_query").

Returns:
Query id.

setQueryId

void setQueryId(java.lang.String queryId)
Sets query id (String it the form: "query_database_name.String_presentation_of_query").

Parameters:
queryId - String that unique represents query.

getOIds

java.util.Collection getOIds()
Returns OIds (Collection of object IDs which are results of the query).

Returns:
Collection of object IDs which are results of the query.

getResultNum

int getResultNum()
Returns number of cached query results.

Returns:
Number of cached query results.

isCompleteResult

boolean isCompleteResult()
Returns true if all query results are cached, otherwise false.

Returns:
true if all query results are cached, otherwise false.

setCompleteResult

void setCompleteResult(boolean newCompleteRes)
Sets new boolean value about the cached query results (true if all query results are cached, otherwise false).

Parameters:
newCompleteRes - true if all query results are cached, otherwise false.

isModifiedQuery

boolean isModifiedQuery()
Returns true if there have been performed inserts, updates or deletes concerning results of this query, otherwise false.

Returns:
true if there have been performed inserts, updates or deletes concerning results of this query, otherwise false.

setModifiedQuery

void setModifiedQuery(boolean mod)
Sets flag coccerning information whether the query is modified.

Parameters:
mod - true if there have been performed inserts, updates or deletes concerning results of this query, otherwise false.

getTime

int getTime()
Returns time needed for query execution.

Returns:
Time needed for query execution.

setTime

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

Parameters:
time - Time needed for query execution.

getConds

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

Returns:
Array of query conditions.

setConds

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

Parameters:
conds - Array of query conditions.

addCond

void addCond(Condition cond)
Adds condition to query.

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

getOriginDatabase

java.lang.String getOriginDatabase()
Deprecated. Use get_OriginDatabase()

Returns query database.

Returns:
Query database.

get_OriginDatabase

java.lang.String get_OriginDatabase()
Returns query database.

Returns:
Query database.

checkConditions

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

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

checkConditions

boolean checkConditions(CoreDataStruct obj)
Checks whether DataStruct object obj satisfies conditions of this query.

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

update

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.

update

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

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

delete

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

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

delete

void delete(CoreDataStruct obj)
Removes DataStruct object obj from array DOs, if present.

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

add

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

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

add

void add(CoreDataStruct obj)
Adds DataStruct object obj to array DOs.

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

DODS 7.3 API