ISDMCache interface

The SDMCache component is responsible for storing and accessing OData related objects in the memory of the device.

Package

com.sap.mobile.lib.sdmcache

Syntax

public interface ISDMCache extends ISDMPersistable

Implemented interfaces

Derived classes

Members

All members of ISDMCache, including inherited members.

Variables
Modifier and Type Variable Description
public static final int FULLTERM_PREFIX_SEARCH Constant ID of Full Term Prefix-search algorithm: Searching for the full search-term as a prefix of searchable values.
public static final int FULLTERM_CONTAIN_SEARCH Constant ID of Full Term Contain-search algorithm: Searching for the full search-term as a part of searchable values.
public static final int TOKENIZED_PREFIX_SEARCH Constant ID of Tokenized Prefix-search algorithm: Searching for all the tokens of the search-term as a prefix of searchable values. Tokens can be found in different values of the same entry.
public static final int TOKENIZED_CONTAIN_SEARCH Constant ID of Tokenized Contain-search algorithm: Searching for all the tokens of the search-term as a part of searchable values. Tokens can be found in different values of the same entry.
public static final int TOKENIZED_CONTAIN_ALL_SEARCH Constant ID of All Token Contain-search algorithm: Searching for all the tokens of the search-term as a part of searchable values. All tokens must be found in the same value.
public static final int REGEX_SEARCH Constant ID of regex search algorithm.
public static final int DEFAULT_SEARCH Constant ID of default algorithm:
Methods
Modifier and Type Method Description
public void clear() Removes all objects (including SDMOData Service Document and SDMOData Schema) from SDMCache.
public ISDMEntrySearch getEntrySearch() Returns the current search object that implements the search method that should be used during searching in entries.
public ISDMParserDocument getSDMODataDocument(String) Returns an SDMParserDocument object with the specified key if it is stored in SDMCache or null otherwise.
public List< ISDMODataEntry > getSDMODataEntries(String) Returns all of the SDMOData Entries that belong to the specified collection.
public ISDMODataEntry getSDMODataEntry(String) Returns an SDMOData Entry with the specified key if it is stored in SDMCache or null otherwise.
public ISDMODataSchema getSDMODataSchema() Returns the SDMOData Schema (aka Metadata) if it is stored in SDMCache or null otherwise.
public ISDMODataServiceDocument getSDMODataServiceDocument() Returns the SDMOData Service Document if it is stored in SDMCache or null otherwise.
public int getSearchAlgorithm() Returns the constant ID of the current search algorithm.
public List< ISDMParserDocument > getStoredDocuments() Returns all of the SDMParserDocuments from the store (including SDMODataEntries).
public boolean removeSDMODataDocument(String) Removes stored object from SDMCache with the specified key if it is stored.
public boolean removeSDMODataEntries(String) Removes SDMOData Entries from SDMCache that belong to the specified collection.
public void removeStoredDocuments() Removes all stored documents (except from Service Document and Schema) from SDMCache.
public List< ISDMODataEntry > searchSDMODataEntries(String, String) Returns all of the SDMOData Entries that belong to the specified collection and either of its searchable fields' value's token (tokenized with space) that starts with the searchTerm.
public void setEntrySearch(ISDMEntrySearch) Seats the new search object that implements the search method that should be used during searching in entries.
public void setSDMODataDocument(String, ISDMParserDocument) Stores an SDMParserDocument object in SDMCache.
public void setSDMODataEntries(List< ISDMODataEntry >) Stores several SDMOData Entries in SDMCache.
public void setSDMODataEntry(ISDMODataEntry) Stores an SDMOData Entry in SDMCache.
public void setSDMODataSchema(ISDMODataSchema) Stores SDMOData Schema in SDMCache.
public void setSDMODataServiceDocument(ISDMODataServiceDocument) Stores SDMOData Service Document in SDMCache.
public void setSearchAlgorithm(int) Sets the constant ID of the search algorithm that should be used during search in entries.
Inherited members from ISDMPersistable
Modifier and Type Member Description
public void read(BufferedReader)  
public void write(BufferedWriter)  

Usage

List of features:
  • Storing OData objects in the memory
  • Accessing OData entries in the memory directly by their key
  • Searching for OData entries in the memory using tokenized prefix search on their searchable fields
  • Managing the number of stored OData entries based on the maximum size of the capacity, removing the a non-recently used OData entry first