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


java.lang.Object
   com.versant.core.jdbc.JdbcStorageManager

JdbcStorageManager
final public class JdbcStorageManager implements StorageManager(Code)
StorageManager implementation for JDBC.

Inner Class :public class OIDRefGraphIndexComparator implements Comparator

Field Summary
final public static  StringSTATUS_OPEN_QUERY_RESULT_COUNT
    

Constructor Summary
public  JdbcStorageManager(ModelMetaData jmd, JdbcConnectionSource conSrc, SqlDriver sqlDriver, StorageCache cache, CompiledQueryCache compiledQueryCache, LogEventStore pes, JdbcConfig c)
    

Method Summary
public  SqlExpaddSelectFetchGroup(SelectExp root, FetchGroup group, boolean includeSubclasses, FgDs fgDs, boolean crossJoinFirstPass2Field)
     Make whatever changes are necessary to root to select group.
public  SqlExpaddSelectFetchGroup(SelectExp root, FetchGroup group, boolean includeSubclasses, FgDs fgDs, SelectExp s, JdbcColumn[] lCols, JdbcField fromField)
    
public  voidbegin(boolean optimistic)
    
public  ObjectcacheTx()
     Get our cache transaction.
public  voidclientConClosed()
     This is called when a JDBC Connection previously given to a client is closed.
public  voidcloseQuery(RunningQuery runningQuery)
    
public  voidcommit()
    
public  CompiledQuerycompileQuery(QueryDetails query)
    
public  Connectioncon()
     Get our database connection.
public  OIDcreateOID(ClassMetaData cmd)
    
public  StatecreateStateImp(ResultSet rs, OID oid, FetchGroup group, boolean forUpdate, int firstCol, MutableInt nextCol, boolean includeSubclasses, StateContainer container, FgDs fgDs, boolean fetchPass2Fields, boolean crossJoinFirstPass2Field, JoinStructure js)
     Create a state from rs which must contain columns as added by addSelectFetchGroup.
public  voiddeletePass2(DeletePacket graph)
     Delete main table rows.
public  voiddestroy()
    
public  ExecuteQueryReturnexecuteQuery(ApplicationContext context, QueryDetails query, CompiledQuery compiledQuery, Object[] params)
    
public  QueryResultContainerexecuteQueryAll(ApplicationContext context, QueryDetails query, CompiledQuery compiledQuery, Object[] params)
    
public  intexecuteQueryCount(QueryDetails query, CompiledQuery compiledQuery, Object[] params)
    
public  StatesReturnedfetch(ApplicationContext context, OID oid, State current, FetchGroup fetchGroup, FieldMetaData triggerField)
    
public  StatesReturnedfetch(ApplicationContext context, OIDArray oids, FieldMetaData triggerField)
    
public  QueryResultContainerfetchNextQueryResult(ApplicationContext context, RunningQuery runningQuery, int skipAmount)
    
public  intfetchPass2Field(OID oid, State state, FetchGroupField field, boolean forUpdate, StateContainer container, boolean fetchPass2Fields, ColFieldHolder colFHolder)
     Fetch a pass 2 field (e.g.
public  QueryResultContainerfetchRandomAccessQueryResult(ApplicationContext context, RunningQuery runningQuery, int index, int fetchAmount)
    
public  CharBufgenerateSql(SelectExp root)
     Generate SQL text for the expression.
public  StorageCachegetCache()
    
public  intgetConnectionPolicy()
    
public  HashMapgetDatabaseTableNames(Connection con)
     Get the names of all tables in the database converted to lower case.
public  ObjectgetDatastoreConnection()
    
public  StorageManagergetInnerStorageManager()
    
public  JdbcConnectionSourcegetJdbcConnectionSource()
    
public  JdbcMetaDatagetJdbcMetaData()
    
public  ModelMetaDatagetJmd()
     Get the meta data.
public  intgetLockingPolicy()
    
public  LogEventStoregetPerfEventStore()
    
public  VersantQueryPlangetQueryPlan(QueryDetails query, CompiledQuery compiledQuery, Object[] params)
    
public  intgetRandomAccessQueryCount(ApplicationContext context, RunningQuery runningQuery)
    
public  SqlDrivergetSqlDriver()
    
public  StategetState(OID oid, FetchGroup fetchGroup, StateContainer container)
     Return a state for the supplied oid containing at least the fetch group specified.
public  voidgetState(ApplicationContext context, OID oid, FetchGroup fetchGroup, JdbcQueryResult queryResult, StateContainer container)
     Get a state and any prefeched states from queryResult.
public  MapgetStatus()
    
public  RuntimeExceptionhandleException(Throwable e)
     Wrap an exception appropriately and return one to be thrown.
public  RuntimeExceptionhandleException(String msg, Throwable e)
     Wrap an exception appropriately and return one to be thrown.
public  RuntimeExceptionhandleException(String msg, Throwable e, boolean convertLockTimeout, Object failed)
     Wrap an exception appropriately and return one to be thrown.
public  booleanhasDatastoreConnection()
    
public  booleanisActive()
    
public  booleanisFlushed()
    
public  booleanisForUpdate()
    
public  booleanisNotifyDirty()
    
public  booleanisOptimistic()
    
public  booleanisUseBatchInsert()
    
public  booleanisUseBatchUpdate()
    
public  voidlogEvent(int level, String description, int ms)
    
public  voidnotifyDirty(OID oid)
    
public  voidpersistPass1(PersistGraph graph)
     Persist main table fields.
public  voidreset()
    
public  voidrollback()
    
public  voidsetConnectionPolicy(int policy)
    
public  voidsetLockingPolicy(int policy)
    
public  voidsetUserObject(Object o)
    
public  intskipState(int firstCol, FgDs fgds)
     Skip over states not needed from a select.
public  StatesReturnedstore(StatesToStore toStore, DeletePacket toDelete, boolean returnFieldsUpdatedBySM, int storeOption, boolean evictClasses)
    

Field Detail
STATUS_OPEN_QUERY_RESULT_COUNT
final public static String STATUS_OPEN_QUERY_RESULT_COUNT(Code)




Constructor Detail
JdbcStorageManager
public JdbcStorageManager(ModelMetaData jmd, JdbcConnectionSource conSrc, SqlDriver sqlDriver, StorageCache cache, CompiledQueryCache compiledQueryCache, LogEventStore pes, JdbcConfig c)(Code)




Method Detail
addSelectFetchGroup
public SqlExp addSelectFetchGroup(SelectExp root, FetchGroup group, boolean includeSubclasses, FgDs fgDs, boolean crossJoinFirstPass2Field)(Code)
Make whatever changes are necessary to root to select group. Root must be a SelectExp from the table for the class of group. This will append the fields in the group to select list of root and will add joins to pick up references where required. It will reuse existing joins where possible.

If includeSubclasses is true then fields from sub fetch groups will be included. Outer joins will be done to pickup the fields for subclasses stored in different tables if they have useSubclassJoin true.


See Also:   JdbcStorageManager.getGetStateSql
See Also:   com.versant.core.jdbc.query.JdbcJDOQLCompiler.compile




addSelectFetchGroup
public SqlExp addSelectFetchGroup(SelectExp root, FetchGroup group, boolean includeSubclasses, FgDs fgDs, SelectExp s, JdbcColumn[] lCols, JdbcField fromField)(Code)



begin
public void begin(boolean optimistic)(Code)



cacheTx
public Object cacheTx()(Code)
Get our cache transaction. This will begin one if there is none.



clientConClosed
public void clientConClosed()(Code)
This is called when a JDBC Connection previously given to a client is closed.



closeQuery
public void closeQuery(RunningQuery runningQuery)(Code)



commit
public void commit()(Code)



compileQuery
public CompiledQuery compileQuery(QueryDetails query)(Code)



con
public Connection con()(Code)
Get our database connection. This will allocate one if we currently have none. It will also start a cache transaction if there is none.



createOID
public OID createOID(ClassMetaData cmd)(Code)



createStateImp
public State createStateImp(ResultSet rs, OID oid, FetchGroup group, boolean forUpdate, int firstCol, MutableInt nextCol, boolean includeSubclasses, StateContainer container, FgDs fgDs, boolean fetchPass2Fields, boolean crossJoinFirstPass2Field, JoinStructure js) throws SQLException(Code)
Create a state from rs which must contain columns as added by addSelectFetchGroup. If there are no main table columns in the group then rs may be null. If includeSubclasses is true then fields from sub classes will be also be read. The nextCol parameter is set to the index of the column after the last column read if it is not null. The oid parameter will be resolved from the created state.



deletePass2
public void deletePass2(DeletePacket graph)(Code)
Delete main table rows.
See Also:   JdbcStorageManager.deletePass1



destroy
public void destroy()(Code)



executeQuery
public ExecuteQueryReturn executeQuery(ApplicationContext context, QueryDetails query, CompiledQuery compiledQuery, Object[] params)(Code)



executeQueryAll
public QueryResultContainer executeQueryAll(ApplicationContext context, QueryDetails query, CompiledQuery compiledQuery, Object[] params)(Code)



executeQueryCount
public int executeQueryCount(QueryDetails query, CompiledQuery compiledQuery, Object[] params)(Code)



fetch
public StatesReturned fetch(ApplicationContext context, OID oid, State current, FetchGroup fetchGroup, FieldMetaData triggerField)(Code)



fetch
public StatesReturned fetch(ApplicationContext context, OIDArray oids, FieldMetaData triggerField)(Code)



fetchNextQueryResult
public QueryResultContainer fetchNextQueryResult(ApplicationContext context, RunningQuery runningQuery, int skipAmount)(Code)



fetchPass2Field
public int fetchPass2Field(OID oid, State state, FetchGroupField field, boolean forUpdate, StateContainer container, boolean fetchPass2Fields, ColFieldHolder colFHolder) throws SQLException(Code)
Fetch a pass 2 field (e.g. a collection) and put its value(s) in state.



fetchRandomAccessQueryResult
public QueryResultContainer fetchRandomAccessQueryResult(ApplicationContext context, RunningQuery runningQuery, int index, int fetchAmount)(Code)



generateSql
public CharBuf generateSql(SelectExp root)(Code)
Generate SQL text for the expression.



getCache
public StorageCache getCache()(Code)



getConnectionPolicy
public int getConnectionPolicy()(Code)



getDatabaseTableNames
public HashMap getDatabaseTableNames(Connection con) throws SQLException(Code)
Get the names of all tables in the database converted to lower case. The lower case name is mapped to the real case name.



getDatastoreConnection
public Object getDatastoreConnection()(Code)



getInnerStorageManager
public StorageManager getInnerStorageManager()(Code)



getJdbcConnectionSource
public JdbcConnectionSource getJdbcConnectionSource()(Code)



getJdbcMetaData
public JdbcMetaData getJdbcMetaData()(Code)



getJmd
public ModelMetaData getJmd()(Code)
Get the meta data.



getLockingPolicy
public int getLockingPolicy()(Code)



getPerfEventStore
public LogEventStore getPerfEventStore()(Code)



getQueryPlan
public VersantQueryPlan getQueryPlan(QueryDetails query, CompiledQuery compiledQuery, Object[] params)(Code)



getRandomAccessQueryCount
public int getRandomAccessQueryCount(ApplicationContext context, RunningQuery runningQuery)(Code)



getSqlDriver
public SqlDriver getSqlDriver()(Code)



getState
public State getState(OID oid, FetchGroup fetchGroup, StateContainer container)(Code)
Return a state for the supplied oid containing at least the fetch group specified. Additional states may be supplied to the container. The must oid must be resolved by this call. The state returned is added to the container.



getState
public void getState(ApplicationContext context, OID oid, FetchGroup fetchGroup, JdbcQueryResult queryResult, StateContainer container)(Code)
Get a state and any prefeched states from queryResult.



getStatus
public Map getStatus()(Code)



handleException
public RuntimeException handleException(Throwable e)(Code)
Wrap an exception appropriately and return one to be thrown.



handleException
public RuntimeException handleException(String msg, Throwable e)(Code)
Wrap an exception appropriately and return one to be thrown.



handleException
public RuntimeException handleException(String msg, Throwable e, boolean convertLockTimeout, Object failed)(Code)
Wrap an exception appropriately and return one to be thrown.



hasDatastoreConnection
public boolean hasDatastoreConnection()(Code)
Do we have a JDBC Connection?



isActive
public boolean isActive()(Code)



isFlushed
public boolean isFlushed()(Code)



isForUpdate
public boolean isForUpdate()(Code)



isNotifyDirty
public boolean isNotifyDirty()(Code)



isOptimistic
public boolean isOptimistic()(Code)



isUseBatchInsert
public boolean isUseBatchInsert()(Code)



isUseBatchUpdate
public boolean isUseBatchUpdate()(Code)



logEvent
public void logEvent(int level, String description, int ms)(Code)



notifyDirty
public void notifyDirty(OID oid)(Code)



persistPass1
public void persistPass1(PersistGraph graph)(Code)
Persist main table fields. All the OID's for new objects are replaced with real OID's.
See Also:   JdbcStorageManager.persistPass2



reset
public void reset()(Code)



rollback
public void rollback()(Code)



setConnectionPolicy
public void setConnectionPolicy(int policy)(Code)



setLockingPolicy
public void setLockingPolicy(int policy)(Code)



setUserObject
public void setUserObject(Object o)(Code)



skipState
public int skipState(int firstCol, FgDs fgds)(Code)
Skip over states not needed from a select. This follows the same recursive algorithm as populateStateFromSelect but does not read anything. It is usefull if some states have to be skipped but others need to be read from other columns in the ResultSet.



store
public StatesReturned store(StatesToStore toStore, DeletePacket toDelete, boolean returnFieldsUpdatedBySM, int storeOption, boolean evictClasses)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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