DODS 6.5 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

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

Returns:
Query id.

setQueryId

public 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

public 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

public int getResultNum()
Returns number of cached query results.

Returns:
Number of cached query results.

isCompleteResult

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

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

setCompleteResult

public 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

public 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

public 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

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 query conditions conds.

Returns:
Array of query conditions.

setConds

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

Parameters:
conds - Array of query conditions.

addCond

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

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

getOriginDatabase

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

Returns query database.

Returns:
Query database.

get_OriginDatabase

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

Returns:
Query database.

checkConditions

public 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

public 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

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.

update

public 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

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.

delete

public 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

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

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

add

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

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

DODS 6.5 API