|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CompassOperations
A interface describing all the available operations allowed by compass.
| Method Summary | ||
|---|---|---|
void |
create(Object obj)
Creates a NEW object in Compass. |
|
void |
create(String alias,
Object obj)
Creates a NEW object in Compass that shares mapping alais with multiple objects. |
|
void |
delete(Class clazz,
Object... ids)
Deletes an object from Compass that match the mapping specified for the defined class based on its ids. |
|
void |
delete(Class clazz,
Object obj)
Deletes an object from Compass that match the mapping specified for the defined class. |
|
void |
delete(CompassQuery query)
Deletes all entries in the index that match the given query. |
|
void |
delete(Object obj)
Deletes an object from Compass. |
|
void |
delete(Resource resource)
Deletes a resource with the specified alias. |
|
void |
delete(String alias,
Object... ids)
Deletes an object from Compass with multiple alias's based on its ids. |
|
void |
delete(String alias,
Object obj)
Deletes an object from Compass with multiple alias's. |
|
void |
evict(Object obj)
Evicts the given object from the first level cache (transaction scoped cache). |
|
void |
evict(Resource resource)
Evicts the given resource from the first level cache (transaction scoped cache). |
|
void |
evict(String alias,
Object id)
Evicts the given object from the first level cache (transaction scoped cache). |
|
void |
evictAll()
Evicts all the objects and the resources from the first level cache. |
|
CompassHits |
find(String query)
Finds a list of objects that match the specified query. |
|
|
get(Class<T> clazz,
Object... ids)
Returns an object that match the mapping specified for the defined class, and matches the specified ids. |
|
|
get(Class<T> clazz,
Object id)
Returns an object that match the mapping specified for the defined class, and matches the specified id. |
|
Object |
get(String alias,
Object... ids)
Returns an object that match the mapping specified for the defined alias, and matches the specified ids. |
|
Object |
get(String alias,
Object id)
Returns an object that match the mapping specified for the defined alias, and matches the specified id. |
|
Resource |
getResource(Class clazz,
Object... ids)
Returns a Resource that match the mapping specified for the defined class type, and specified ids. |
|
Resource |
getResource(Class clazz,
Object id)
Returns a Resource that match the mapping specified for the defined class type, and specified id. |
|
Resource |
getResource(String alias,
Object... ids)
Returns a Resource that match the mapping specified for the defined alias (possibley different object types), and matches the specified ids. |
|
Resource |
getResource(String alias,
Object id)
Returns a Resource that match the mapping specified for the defined alias (possibley different object types), and matches the specified id. |
|
|
load(Class<T> clazz,
Object... ids)
Loads and returns an object that match the mapping specified for the defined class, and matches the specified ids. |
|
|
load(Class<T> clazz,
Object id)
Loads and returns an object that match the mapping specified for the defined class, and matches the specified id. |
|
Object |
load(String alias,
Object... ids)
Loads and returns an object that match the mapping specified for the defined class, and matches the specified ids. |
|
Object |
load(String alias,
Object id)
Loads and returns an object that match the mapping specified for the defined class, and matches the specified id. |
|
Resource |
loadResource(Class clazz,
Object... ids)
Loads and returns a Resource that match the mapping specified for the defined class, and matches the specified ids. |
|
Resource |
loadResource(Class clazz,
Object id)
Loads and returns a Resource that match the mapping specified for the defined class, and matches the specified id. |
|
Resource |
loadResource(String alias,
Object... ids)
Loads and returns a Resource that match the mapping specified for the defined alias, and matches the specified ids. |
|
Resource |
loadResource(String alias,
Object id)
Loads and returns a Resource that match the mapping specified for the defined alias, and matches the specified id. |
|
void |
save(Object obj)
Saves an object in Compass. |
|
void |
save(String alias,
Object obj)
Saves an object in Compass that shares mapping alais with multiple objects. |
|
| Method Detail |
|---|
void delete(Resource resource)
throws CompassException
resource - The resource to be deleted.
CompassException
Resource getResource(Class clazz,
Object id)
throws CompassException
null if the object is not found.
clazz - The class that represents the required mappingid - The id that identifies the resource
null if not found
CompassException
Resource getResource(Class clazz,
Object... ids)
throws CompassException
clazz - The class that represents the required mappingids - The ids that identifies the resource
null if not found
CompassException
Resource getResource(String alias,
Object id)
throws CompassException
null if the
object is not found.
alias - The alias that represents the required mappingid - The id that identifies the resource
CompassException
Resource getResource(String alias,
Object... ids)
throws CompassException
null if the object is not found.
alias - The alias that represents the required mappingids - The ids that identifies the resource
CompassException
Resource loadResource(Class clazz,
Object id)
throws CompassException
clazz - The class that represents the required mappingid - The id that identifies the resource
CompassException
Resource loadResource(Class clazz,
Object... ids)
throws CompassException
clazz - The class that represents the required mappingids - The ids that identifies the resource
CompassException
Resource loadResource(String alias,
Object id)
throws CompassException
alias - The alias that represents the required mappingid - The id that identifies the resource
CompassException
Resource loadResource(String alias,
Object... ids)
throws CompassException
alias - The alias that represents the required mappingids - The ids that identifies the resource
CompassException
void delete(Object obj)
throws CompassException
obj - The object to delete
CompassException
void delete(String alias,
Object obj)
throws CompassException
alias - The alias that the objects maps underobj - The object to delete
CompassException
void delete(String alias,
Object... ids)
throws CompassException
alias - The alias that the objects maps underids - The ids of the object to delete
CompassException
void delete(Class clazz,
Object obj)
throws CompassException
clazz - The class that represtents the required mappingobj - The object to delete
CompassException
void delete(Class clazz,
Object... ids)
throws CompassException
clazz - The class that represtents the required mappingids - The object ids to delete
CompassException
<T> T get(Class<T> clazz,
Object id)
throws CompassException
null if the object is not found.
clazz - The class that represents the required mappingid - The id that identifies the resource
null if not found
CompassException
<T> T get(Class<T> clazz,
Object... ids)
throws CompassException
null if the object
is not found.
clazz - The class that represents the required mappingids - The ids that identifies the resource
null if not found
CompassException
Object get(String alias,
Object id)
throws CompassException
null if the object is not found.
alias - The alias that represents the required mappingid - The id that identifies the resource
null if not found
CompassException
Object get(String alias,
Object... ids)
throws CompassException
null if the object is
not found.
alias - The alias that represents the required mappingids - The ids that identifies the resource
null if not found
CompassException
<T> T load(Class<T> clazz,
Object id)
throws CompassException
clazz - The class that represents the required mappingid - The id that identifies the resource
CompassException
<T> T load(Class<T> clazz,
Object... ids)
throws CompassException
clazz - The class that represents the required mappingids - The ids that identifies the resource
CompassException
Object load(String alias,
Object id)
throws CompassException
alias - The alias that represents the required mappingid - The id that identifies the resource
CompassException
Object load(String alias,
Object... ids)
throws CompassException
alias - The alias that represents the required mappingids - The ids that identifies the resource
CompassException
void delete(CompassQuery query)
throws CompassException
query - The query to delete by
CompassException
CompassHits find(String query)
throws CompassException
Several examples are:
Note that the list may contains several object types (classes) with no relation between them (except for the semantic relation).
query - The query string to search by
CompassException
void create(Object obj)
throws CompassException
obj - The object to save.
CompassException
void create(String alias,
Object obj)
throws CompassException
alias - The alias that match the object mappingsobj - The object to save
CompassException
void save(Object obj)
throws CompassException
obj - The object to save.
CompassException
void save(String alias,
Object obj)
throws CompassException
alias - The alias that match the object mappingsobj - The object to save
CompassExceptionvoid evict(Object obj)
obj - The objects to evict.
void evict(String alias,
Object id)
alias - The alias of the object/entry to evict.id - The id of the object/entry to evict.void evict(Resource resource)
resource - The resource to evict.void evictAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||