Java Doc for CompassOperations.java in  » Search-Engine » compass-2.0 » org » compass » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Search Engine » compass 2.0 » org.compass.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.compass.core.CompassOperations

All known Subclasses:   org.compass.core.CompassTemplate,
CompassOperations
public interface CompassOperations (Code)
A interface describing all the available operations allowed by compass.
author:
   kimchy




Method Summary
 voidcreate(Object obj)
     Creates a NEW object in Compass.
 voidcreate(String alias, Object obj)
     Creates a NEW object in Compass that shares mapping alais with multiple objects.
 voiddelete(Resource resource)
     Deletes a resource with the specified alias.
 voiddelete(Object obj)
     Deletes an object from Compass.
 voiddelete(String alias, Object obj)
     Deletes an object from Compass with multiple alias's.
 voiddelete(String alias, Object... ids)
     Deletes an object from Compass with multiple alias's based on its ids.
 voiddelete(Class clazz, Object obj)
     Deletes an object from Compass that match the mapping specified for the defined class.
 voiddelete(Class clazz, Object... ids)
     Deletes an object from Compass that match the mapping specified for the defined class based on its ids.
 voiddelete(CompassQuery query)
     Deletes all entries in the index that match the given query.
 voidevict(Object obj)
     Evicts the given object from the first level cache (transaction scoped cache).
 voidevict(String alias, Object id)
     Evicts the given object from the first level cache (transaction scoped cache).
 voidevict(Resource resource)
     Evicts the given resource from the first level cache (transaction scoped cache).
 voidevictAll()
     Evicts all the objects and the resources from the first level cache.
 CompassHitsfind(String query)
     Finds a list of objects that match the specified query.
 Tget(Class<T> clazz, Object id)
     Returns an object that match the mapping specified for the defined class, and matches the specified id.
 Tget(Class<T> clazz, Object... ids)
     Returns an object that match the mapping specified for the defined class, and matches the specified ids.
 Objectget(String alias, Object id)
     Returns an object that match the mapping specified for the defined alias, and matches the specified id.
 Objectget(String alias, Object... ids)
     Returns an object that match the mapping specified for the defined alias, and matches the specified ids.
 ResourcegetResource(Class clazz, Object id)
     Returns a Resource that match the mapping specified for the defined class type, and specified id.
 ResourcegetResource(Class clazz, Object... ids)
     Returns a Resource that match the mapping specified for the defined class type, and specified ids.
 ResourcegetResource(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.
 ResourcegetResource(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.
 Tload(Class<T> clazz, Object id)
     Loads and returns an object that match the mapping specified for the defined class, and matches the specified id.
 Tload(Class<T> clazz, Object... ids)
     Loads and returns an object that match the mapping specified for the defined class, and matches the specified ids.
 Objectload(String alias, Object id)
     Loads and returns an object that match the mapping specified for the defined class, and matches the specified id.
 Objectload(String alias, Object... ids)
     Loads and returns an object that match the mapping specified for the defined class, and matches the specified ids.
 ResourceloadResource(Class clazz, Object id)
     Loads and returns a Resource that match the mapping specified for the defined class, and matches the specified id.
 ResourceloadResource(Class clazz, Object... ids)
     Loads and returns a Resource that match the mapping specified for the defined class, and matches the specified ids.
 ResourceloadResource(String alias, Object id)
     Loads and returns a Resource that match the mapping specified for the defined alias, and matches the specified id.
 ResourceloadResource(String alias, Object... ids)
     Loads and returns a Resource that match the mapping specified for the defined alias, and matches the specified ids.
 voidsave(Object obj)
     Saves an object in Compass.
 voidsave(String alias, Object obj)
     Saves an object in Compass that shares mapping alais with multiple objects.
 voidsaveResource(Resource resource)
     Saves a resource within Search Engine.



Method Detail
create
void create(Object obj) throws CompassException(Code)
Creates a NEW object in Compass. All the meta data defined in the Compass mapping files will be indexed and saved for later searching. Note that if the same object (same alias and same id's already exists in the index, it won't be deleted).
Parameters:
  obj - The object to save.
throws:
  CompassException -



create
void create(String alias, Object obj) throws CompassException(Code)
Creates a NEW object in Compass that shares mapping alais with multiple objects. All the meta data defined in Compass mapping files will be indexed and saved for later searching.
Parameters:
  alias - The alias that match the object mappings
Parameters:
  obj - The object to save
throws:
  CompassException -



delete
void delete(Resource resource) throws CompassException(Code)
Deletes a resource with the specified alias. Note that the resource must have the defined ids in the mapping files set and an alias set.
Parameters:
  resource - The resource to be deleted.
throws:
  CompassException -



delete
void delete(Object obj) throws CompassException(Code)
Deletes an object from Compass. The object must have been either loaded by Compass or it's ids must be set if already known.
Parameters:
  obj - The object to delete
throws:
  CompassException -



delete
void delete(String alias, Object obj) throws CompassException(Code)
Deletes an object from Compass with multiple alias's. The object can either be the id (or an array of ids), or the actual data object with it's property ids set.
Parameters:
  alias - The alias that the objects maps under
Parameters:
  obj - The object to delete
throws:
  CompassException -



delete
void delete(String alias, Object... ids) throws CompassException(Code)
Deletes an object from Compass with multiple alias's based on its ids.
Parameters:
  alias - The alias that the objects maps under
Parameters:
  ids - The ids of the object to delete
throws:
  CompassException -



delete
void delete(Class clazz, Object obj) throws CompassException(Code)
Deletes an object from Compass that match the mapping specified for the defined class. The object can either be the id (or an array of ids), or the actual data object with it's property ids set.
Parameters:
  clazz - The class that represtents the required mapping
Parameters:
  obj - The object to delete
throws:
  CompassException -



delete
void delete(Class clazz, Object... ids) throws CompassException(Code)
Deletes an object from Compass that match the mapping specified for the defined class based on its ids.
Parameters:
  clazz - The class that represtents the required mapping
Parameters:
  ids - The object ids to delete
throws:
  CompassException -



delete
void delete(CompassQuery query) throws CompassException(Code)
Deletes all entries in the index that match the given query.
Parameters:
  query - The query to delete by
throws:
  CompassException -



evict
void evict(Object obj)(Code)
Evicts the given object from the first level cache (transaction scoped cache).
Parameters:
  obj - The objects to evict.



evict
void evict(String alias, Object id)(Code)
Evicts the given object from the first level cache (transaction scoped cache). The object can either be the id (or an array of ids), or the actual data object with it's property ids set.
Parameters:
  alias - The alias of the object/entry to evict.
Parameters:
  id - The id of the object/entry to evict.



evict
void evict(Resource resource)(Code)
Evicts the given resource from the first level cache (transaction scoped cache).
Parameters:
  resource - The resource to evict.



evictAll
void evictAll()(Code)
Evicts all the objects and the resources from the first level cache.



find
CompassHits find(String query) throws CompassException(Code)
Finds a list of objects that match the specified query. The query syntax is a search engine format query. For detailed description of the query syntax please visit the site.

Several examples are:

  • A set of words - i.e. "Jack London". Compass will search the default property (usually ALL properties, specified in CompassEnvironment).
  • A set of words prefixed by meta data name - i.e. author:"Jack London". Compass will search only meta data name author matching keywords Jack London.
  • Multiple meta data names - i.e. author:"Jack London" AND book:Fang*. Compass will search both meta data name author matching keywords Jack London and meta data name book matching wildcard Fang*

Note that the list may contains several object types (classes) with no relation between them (except for the semantic relation).


Parameters:
  query - The query string to search by A hits of objects that matches the query string
throws:
  CompassException -



get
T get(Class<T> clazz, Object id) throws CompassException(Code)
Returns an object that match the mapping specified for the defined class, and matches the specified id. The id can be an object of the class (with the id attributes set), an array of id objects, or the actual id object. Returns null if the object is not found.
Parameters:
  clazz - The class that represents the required mapping
Parameters:
  id - The id that identifies the resource The object, returns null if not found
throws:
  CompassException -



get
T get(Class<T> clazz, Object... ids) throws CompassException(Code)
Returns an object that match the mapping specified for the defined class, and matches the specified ids. Returns null if the object is not found.
Parameters:
  clazz - The class that represents the required mapping
Parameters:
  ids - The ids that identifies the resource The object, returns null if not found
throws:
  CompassException -



get
Object get(String alias, Object id) throws CompassException(Code)
Returns an object that match the mapping specified for the defined alias, and matches the specified id. The id can be an object of the class (with the id attributes set), an array of id objects, or the actual id object. Returns null if the object is not found.
Parameters:
  alias - The alias that represents the required mapping
Parameters:
  id - The id that identifies the resource The object, returns null if not found
throws:
  CompassException -



get
Object get(String alias, Object... ids) throws CompassException(Code)
Returns an object that match the mapping specified for the defined alias, and matches the specified ids. Returns null if the object is not found.
Parameters:
  alias - The alias that represents the required mapping
Parameters:
  ids - The ids that identifies the resource The object, returns null if not found
throws:
  CompassException -



getResource
Resource getResource(Class clazz, Object id) throws CompassException(Code)
Returns a Resource that match the mapping specified for the defined class type, and specified id. The id can be an object of the class (with the id attributes set), an array of id objects, or the actual id object. Returns null if the object is not found.
Parameters:
  clazz - The class that represents the required mapping
Parameters:
  id - The id that identifies the resource The resource, returns null if not found
throws:
  CompassException -



getResource
Resource getResource(Class clazz, Object... ids) throws CompassException(Code)
Returns a Resource that match the mapping specified for the defined class type, and specified ids.
Parameters:
  clazz - The class that represents the required mapping
Parameters:
  ids - The ids that identifies the resource The resource, returns null if not found
throws:
  CompassException -



getResource
Resource getResource(String alias, Object id) throws CompassException(Code)
Returns a Resource that match the mapping specified for the defined alias (possibley different object types), and matches the specified id. The id can be an object of the class (with the id attributes set), an array of id objects, or the actual id object. Returns null if the object is not found.
Parameters:
  alias - The alias that represents the required mapping
Parameters:
  id - The id that identifies the resource The resource
throws:
  CompassException -



getResource
Resource getResource(String alias, Object... ids) throws CompassException(Code)
Returns a Resource that match the mapping specified for the defined alias (possibley different object types), and matches the specified ids. Returns null if the object is not found.
Parameters:
  alias - The alias that represents the required mapping
Parameters:
  ids - The ids that identifies the resource The resource
throws:
  CompassException -



load
T load(Class<T> clazz, Object id) throws CompassException(Code)
Loads and returns an object that match the mapping specified for the defined class, and matches the specified id. The id can be an object of the class (with the id attributes set), an array of id objects, or the actual id object. Throws an exception if the resource is not found.
Parameters:
  clazz - The class that represents the required mapping
Parameters:
  id - The id that identifies the resource The object
throws:
  CompassException -



load
T load(Class<T> clazz, Object... ids) throws CompassException(Code)
Loads and returns an object that match the mapping specified for the defined class, and matches the specified ids.
Parameters:
  clazz - The class that represents the required mapping
Parameters:
  ids - The ids that identifies the resource The object
throws:
  CompassException -



load
Object load(String alias, Object id) throws CompassException(Code)
Loads and returns an object that match the mapping specified for the defined class, and matches the specified id. The id can be an object of the class (with the id attributes set), an array of id objects, or the actual id object. Throws an exception if the resource is not found.
Parameters:
  alias - The alias that represents the required mapping
Parameters:
  id - The id that identifies the resource The object
throws:
  CompassException -



load
Object load(String alias, Object... ids) throws CompassException(Code)
Loads and returns an object that match the mapping specified for the defined class, and matches the specified ids.
Parameters:
  alias - The alias that represents the required mapping
Parameters:
  ids - The ids that identifies the resource The object
throws:
  CompassException -



loadResource
Resource loadResource(Class clazz, Object id) throws CompassException(Code)
Loads and returns a Resource that match the mapping specified for the defined class, and matches the specified id. The id can be an object of the class (with the id attributes set), an array of id objects, or the actual id object. Throws an exception if the resource is not found.
Parameters:
  clazz - The class that represents the required mapping
Parameters:
  id - The id that identifies the resource The resource
throws:
  CompassException -



loadResource
Resource loadResource(Class clazz, Object... ids) throws CompassException(Code)
Loads and returns a Resource that match the mapping specified for the defined class, and matches the specified ids. Throws an exception if the resource is not found.
Parameters:
  clazz - The class that represents the required mapping
Parameters:
  ids - The ids that identifies the resource The resource
throws:
  CompassException -



loadResource
Resource loadResource(String alias, Object id) throws CompassException(Code)
Loads and returns a Resource that match the mapping specified for the defined alias, and matches the specified id. The id can be an object of the class (with the id attributes set), an array of id objects, or the actual id object. Throws an exception if the resource is not found.
Parameters:
  alias - The alias that represents the required mapping
Parameters:
  id - The id that identifies the resource The resource
throws:
  CompassException -



loadResource
Resource loadResource(String alias, Object... ids) throws CompassException(Code)
Loads and returns a Resource that match the mapping specified for the defined alias, and matches the specified ids. Throws an exception if the resource is not found.
Parameters:
  alias - The alias that represents the required mapping
Parameters:
  ids - The ids that identifies the resource The resource
throws:
  CompassException -



save
void save(Object obj) throws CompassException(Code)
Saves an object in Compass. All the meta data defined in the Compass mapping files will be indexed and saved for later searching.
Parameters:
  obj - The object to save.
throws:
  CompassException -



save
void save(String alias, Object obj) throws CompassException(Code)
Saves an object in Compass that shares mapping alais with multiple objects. All the meta data defined in Compass mapping files will be indexed and saved for later searching.
Parameters:
  alias - The alias that match the object mappings
Parameters:
  obj - The object to save
throws:
  CompassException -



saveResource
void saveResource(Resource resource) throws CompassException(Code)
Saves a resource within Search Engine.
Parameters:
  resource - The resource to save
throws:
  CompassException -



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.