Java Doc for StorageManager.java in  » Testing » PolePosition-0.20 » com » versant » core » storagemanager » 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 » Testing » PolePosition 0.20 » com.versant.core.storagemanager 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.versant.core.storagemanager.StorageManager

All known Subclasses:   com.versant.core.jdbc.JdbcStorageManager,  com.versant.core.storagemanager.logging.LoggingStorageManager,
StorageManager
public interface StorageManager (Code)
This keeps track of server side transaction and other information for a application level session (e.g. a PersistenceManager for JDO) and provides persistence services for State instances. These methods are designed to be used from an application API layer (e.g. JDO PersistenceManager) that may be in a different tier. All calls from the application API layer go through this interface. For example there are methods to return results from queries that could have been implemented via a separate "server side query result" interface. The query related methods need a lot more refactoring but one thing at a time ...


Field Summary
final public static  intCON_POLICY_PIN
     Pin the datastore connection indefinitely (even between tx's).
final public static  intCON_POLICY_PIN_FOR_TX
     Pin the datastore connection for the duration of the tx.
final public static  intCON_POLICY_RELEASE
     Release the datastore connection as quickly as possible.
final public static  intEVENT_ALL
    
final public static  intEVENT_ERRORS
    
final public static  intEVENT_NORMAL
    
final public static  intEVENT_VERBOSE
    
final public static  intLOCK_POLICY_ALL
     Lock all objects in datastore tx.
final public static  intLOCK_POLICY_FIRST
     Lock only the first object navigated or fetched in datastore tx.
final public static  intLOCK_POLICY_NONE
     Do not lock any objects in datastore tx.
final public static  intSTORE_OPTION_COMMIT
     Call commit after store.
final public static  intSTORE_OPTION_FLUSH
     Send changes to the datastore and do not commit.
final public static  intSTORE_OPTION_PREPARE
     Call prepareForCommit after store.


Method Summary
public  voidbegin(boolean optimistic)
     Begin a tx using the optimistic or datastore transation model.
public  voidcloseQuery(RunningQuery runningQuery)
     Close the query.
public  voidcommit()
     Commit the tx.
public  CompiledQuerycompileQuery(QueryDetails query)
     Compile a query into a form for the datastore (e.g.
public  OIDcreateOID(ClassMetaData cmd)
     Create a real OID for a new instance.
public  voiddestroy()
     Destroy cleaning up all resources.
public  ExecuteQueryReturnexecuteQuery(ApplicationContext context, QueryDetails query, CompiledQuery compiledQuery, Object[] params)
     Execute a query.
public  QueryResultContainerexecuteQueryAll(ApplicationContext context, QueryDetails query, CompiledQuery compiledQuery, Object[] params)
     Prepare and execute the query, returning all results in the supplied container.
public  intexecuteQueryCount(QueryDetails query, CompiledQuery compiledQuery, Object[] params)
     Prepare and execute the query and return the number of results using count(*) or something similar.
public  StatesReturnedfetch(ApplicationContext context, OID oid, State current, FetchGroup fetchGroup, FieldMetaData triggerField)
     Get the State for an OID.
public  StatesReturnedfetch(ApplicationContext context, OIDArray oids, FieldMetaData triggerField)
     Get the States for a batch of OIDs.
public  QueryResultContainerfetchNextQueryResult(ApplicationContext context, RunningQuery runningQuery, int skipAmount)
     Return the next batch of results for the query.
public  QueryResultContainerfetchRandomAccessQueryResult(ApplicationContext context, RunningQuery runningQuery, int index, int fetchAmount)
     This is used by random access queries to return absolute results.
public  ObjectgetDatastoreConnection()
     Get the underlying datastore connection.
public  StorageManagergetInnerStorageManager()
     If we are decorating another SM then return it.
public  intgetLockingPolicy()
     Get the locking policy.
public  VersantQueryPlangetQueryPlan(QueryDetails query, CompiledQuery compiledQuery, Object[] params)
     Get the datastore specific query plan for the query (e.g.
public  intgetRandomAccessQueryCount(ApplicationContext context, RunningQuery runningQuery)
     This is used by random access queries to return the number of results.
public  MapgetStatus()
     Get internal status information in the form of property -> value pairs.
public  booleanhasDatastoreConnection()
    
public  booleanisNotifyDirty()
    
public  voidlogEvent(int level, String description, int ms)
     Log an event to our event log.
public  voidnotifyDirty(OID oid)
     The object for the oid is about to become dirty or deleted.
public  voidreset()
     Restore to an initial inactive state.
public  voidrollback()
     Rollback a tx.
public  voidsetConnectionPolicy(int policy)
     Control pinning of datastore connections.
public  voidsetLockingPolicy(int policy)
     Control locking of objects in datastore transactions.
public  voidsetUserObject(Object o)
     Set a userObject on this SM.
public  StatesReturnedstore(StatesToStore toStore, DeletePacket toDelete, boolean returnFieldsUpdatedBySM, int storeOption, boolean evictClasses)
     Persist a graph of State's (insert, update and delete).

Field Detail
CON_POLICY_PIN
final public static int CON_POLICY_PIN(Code)
Pin the datastore connection indefinitely (even between tx's).



CON_POLICY_PIN_FOR_TX
final public static int CON_POLICY_PIN_FOR_TX(Code)
Pin the datastore connection for the duration of the tx.



CON_POLICY_RELEASE
final public static int CON_POLICY_RELEASE(Code)
Release the datastore connection as quickly as possible.



EVENT_ALL
final public static int EVENT_ALL(Code)



EVENT_ERRORS
final public static int EVENT_ERRORS(Code)



EVENT_NORMAL
final public static int EVENT_NORMAL(Code)



EVENT_VERBOSE
final public static int EVENT_VERBOSE(Code)



LOCK_POLICY_ALL
final public static int LOCK_POLICY_ALL(Code)
Lock all objects in datastore tx.



LOCK_POLICY_FIRST
final public static int LOCK_POLICY_FIRST(Code)
Lock only the first object navigated or fetched in datastore tx.



LOCK_POLICY_NONE
final public static int LOCK_POLICY_NONE(Code)
Do not lock any objects in datastore tx.



STORE_OPTION_COMMIT
final public static int STORE_OPTION_COMMIT(Code)
Call commit after store.



STORE_OPTION_FLUSH
final public static int STORE_OPTION_FLUSH(Code)
Send changes to the datastore and do not commit.



STORE_OPTION_PREPARE
final public static int STORE_OPTION_PREPARE(Code)
Call prepareForCommit after store.





Method Detail
begin
public void begin(boolean optimistic)(Code)
Begin a tx using the optimistic or datastore transation model.



closeQuery
public void closeQuery(RunningQuery runningQuery)(Code)
Close the query.



commit
public void commit()(Code)
Commit the tx. Note that non-XA transactions can call StorageManager.store with StorageManager.STORE_OPTION_COMMIT to commit instead of having to also call this method. XA transactions should use the StorageManager.STORE_OPTION_PREPARE and call this method later. Normal transactions might still call this method if they have no changes or have already used StorageManager.STORE_OPTION_FLUSH to flush changes.



compileQuery
public CompiledQuery compileQuery(QueryDetails query)(Code)
Compile a query into a form for the datastore (e.g. generate the SQL for JDBC).



createOID
public OID createOID(ClassMetaData cmd)(Code)
Create a real OID for a new instance. This is called prior to commit when the real OID is required. If it is not possible to create the OID (e.g. an IDENTITY column in JDBC) then an exception must be thrown. For these classes a flush must be done instead.



destroy
public void destroy()(Code)
Destroy cleaning up all resources. No methods should be invoked on a destroyed StorageManager but the StorageManager is not required to enforce this.



executeQuery
public ExecuteQueryReturn executeQuery(ApplicationContext context, QueryDetails query, CompiledQuery compiledQuery, Object[] params)(Code)
Execute a query. If compiledQuery is not null then query is ignored and may be null. If compiledQuery is null then query is used to compile the query. The compiledQuery is accessable through the returned ExecuteQueryReturn instance for reuse in future calls.



executeQueryAll
public QueryResultContainer executeQueryAll(ApplicationContext context, QueryDetails query, CompiledQuery compiledQuery, Object[] params)(Code)
Prepare and execute the query, returning all results in the supplied container.



executeQueryCount
public int executeQueryCount(QueryDetails query, CompiledQuery compiledQuery, Object[] params)(Code)
Prepare and execute the query and return the number of results using count(*) or something similar.



fetch
public StatesReturned fetch(ApplicationContext context, OID oid, State current, FetchGroup fetchGroup, FieldMetaData triggerField)(Code)
Get the State for an OID.
Parameters:
  triggerField - The field that triggered the fetch or null if



fetch
public StatesReturned fetch(ApplicationContext context, OIDArray oids, FieldMetaData triggerField)(Code)
Get the States for a batch of OIDs. The default fetch group is fetched for each OID.
Parameters:
  triggerField - The field that triggered the fetch or null if



fetchNextQueryResult
public QueryResultContainer fetchNextQueryResult(ApplicationContext context, RunningQuery runningQuery, int skipAmount)(Code)
Return the next batch of results for the query.



fetchRandomAccessQueryResult
public QueryResultContainer fetchRandomAccessQueryResult(ApplicationContext context, RunningQuery runningQuery, int index, int fetchAmount)(Code)
This is used by random access queries to return absolute results.



getDatastoreConnection
public Object getDatastoreConnection()(Code)
Get the underlying datastore connection. If no connection is associated with this StorageManager then one is allocated and pinned. The returned object must be a proxy for the real connection that is returned when its "close" method is called.



getInnerStorageManager
public StorageManager getInnerStorageManager()(Code)
If we are decorating another SM then return it. Otherwise return null.



getLockingPolicy
public int getLockingPolicy()(Code)
Get the locking policy.



getQueryPlan
public VersantQueryPlan getQueryPlan(QueryDetails query, CompiledQuery compiledQuery, Object[] params)(Code)
Get the datastore specific query plan for the query (e.g. the SQL and database plan for JDBC).



getRandomAccessQueryCount
public int getRandomAccessQueryCount(ApplicationContext context, RunningQuery runningQuery)(Code)
This is used by random access queries to return the number of results.



getStatus
public Map getStatus()(Code)
Get internal status information in the form of property -> value pairs.



hasDatastoreConnection
public boolean hasDatastoreConnection()(Code)
Are we holding a datastore connection?



isNotifyDirty
public boolean isNotifyDirty()(Code)
Does the datastore require notification before an object becomes dirty or deleted for the first time in the tx?
See Also:   StorageManager.notifyDirty(com.versant.core.common.OID)



logEvent
public void logEvent(int level, String description, int ms)(Code)
Log an event to our event log.



notifyDirty
public void notifyDirty(OID oid)(Code)
The object for the oid is about to become dirty or deleted.
See Also:   StorageManager.isNotifyDirty()



reset
public void reset()(Code)
Restore to an initial inactive state.



rollback
public void rollback()(Code)
Rollback a tx.



setConnectionPolicy
public void setConnectionPolicy(int policy)(Code)
Control pinning of datastore connections. Note that the datastore may ignore these options.
See Also:   StorageManager.CON_POLICY_RELEASE
See Also:   StorageManager.CON_POLICY_PIN_FOR_TX
See Also:   StorageManager.CON_POLICY_PIN



setLockingPolicy
public void setLockingPolicy(int policy)(Code)
Control locking of objects in datastore transactions. Note that the datastore may ignore this options.
See Also:   StorageManager.LOCK_POLICY_NONE
See Also:   StorageManager.LOCK_POLICY_FIRST
See Also:   StorageManager.LOCK_POLICY_ALL



setUserObject
public void setUserObject(Object o)(Code)
Set a userObject on this SM.



store
public StatesReturned store(StatesToStore toStore, DeletePacket toDelete, boolean returnFieldsUpdatedBySM, int storeOption, boolean evictClasses)(Code)
Persist a graph of State's (insert, update and delete). For some states persisting them will change some of their fields (e.g. autoset fields) and the new values of these fields must be returned if returnFieldsUpdatedBySM is true.
Parameters:
  returnFieldsUpdatedBySM - Return States containing any fieldsupdated by us (i.e. instead of using the value in the incomingState, if any) in returned.
Parameters:
  storeOption - Option to prepare or commit the tx after the storeoperation (StorageManager.STORE_OPTION_PREPARE,StorageManager.STORE_OPTION_COMMIT, StorageManager.STORE_OPTION_FLUSH).
Parameters:
  evictClasses - If this is true then classes with instancesmodified in the transaction are evicted instead of the instances



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