|
||||||||||
| 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. |
Property |
createProperty(String name,
byte[] value,
Property.Store store)
Creates a binary property only stored (can be compressed). |
Property |
createProperty(String name,
Reader value)
Creates a property (indexed, and not stored) for the specified reader. |
Property |
createProperty(String name,
Reader value,
Property.TermVector termVector)
Creates a property (indexed, and not stored) for the specified reader. |
Property |
createProperty(String name,
String value,
Property.Store store,
Property.Index index)
Creates a Property that is used with the actual Search Engine. |
Property |
createProperty(String name,
String value,
Property.Store store,
Property.Index index,
Property.TermVector termVector)
Creates a Property that is used with the actual Search Engine. |
Resource |
createResource(String alias)
Creates a resource, that is used with the actual Search Engine implementation. |
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 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. |
Object |
get(Class clazz,
Serializable id)
Returns an object that match the mapping specified for the defined class, and matches the specified id. |
Object |
get(String alias,
Serializable id)
Returns an object that match the mapping specified for the defined alias, and matches the specified id. |
Resource |
getResource(Class clazz,
Serializable id)
Returns a Resource that match the mapping specified for the defined class type, and specified id. |
Resource |
getResource(String alias,
Serializable id)
Returns a Resource that match the mapping specified for the defined alias (possibley different object types), and matches the specified id. |
CompassSettings |
getSettings()
Runtimes settings that apply on the session level. |
Object |
load(Class clazz,
Serializable id)
Loads and returns an object that match the mapping specified for the defined class, and matches the specified id. |
Object |
load(String alias,
Serializable id)
Loads and returns an object that match the mapping specified for the defined class, and matches the specified id. |
Resource |
loadResource(Class clazz,
Serializable id)
Loads and returns a Resource that match the mapping specified for the defined class, and matches the specified id. |
Resource |
loadResource(String alias,
Serializable 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 |
|---|
CompassSettings getSettings()
RuntimeCompassEnvironment,
RuntimeLuceneEnvironment
Resource createResource(String alias)
throws CompassException
CompassException
Property createProperty(String name,
String value,
Property.Store store,
Property.Index index)
throws CompassException
name - value - store - index -
CompassException
Property createProperty(String name,
String value,
Property.Store store,
Property.Index index,
Property.TermVector termVector)
throws CompassException
name - The name of the propertyvalue - The value of the propertystore - The store setting for the propertyindex - The index setting for the property
CompassException
Property createProperty(String name,
Reader value)
throws CompassException
name - The name of the propertyvalue - The value of the property
CompassException
Property createProperty(String name,
Reader value,
Property.TermVector termVector)
throws CompassException
name - The name of the propertyvalue - The value of the propertytermVector - The term vector setting for the property
CompassException
Property createProperty(String name,
byte[] value,
Property.Store store)
throws CompassException
name - The name of the propertyvalue - The value of the propertystore - The store setting for the property
CompassException
void delete(Resource resource)
throws CompassException
resource - The resource to be deleted.
CompassException
Resource getResource(Class clazz,
Serializable 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(String alias,
Serializable 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 loadResource(Class clazz,
Serializable id)
throws CompassException
clazz - The class that represents the required mappingid - The id that identifies the resource
CompassException
Resource loadResource(String alias,
Serializable id)
throws CompassException
alias - The alias that represents the required mappingid - The id 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(Class clazz,
Object obj)
throws CompassException
clazz - The class that represtents the required mappingobj - The object to delete
CompassException
Object get(Class clazz,
Serializable 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
Object get(String alias,
Serializable 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 load(Class clazz,
Serializable id)
throws CompassException
clazz - The class that represents the required mappingid - The id that identifies the resource
CompassException
Object load(String alias,
Serializable id)
throws CompassException
alias - The alias that represents the required mappingid - The id 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 | |||||||||