Java Doc for Platform.java in  » Database-ORM » db-ojb » org » apache » ojb » broker » platforms » 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 » Database ORM » db ojb » org.apache.ojb.broker.platforms 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.ojb.broker.platforms.Platform

All known Subclasses:   org.apache.ojb.broker.platforms.PlatformDefaultImpl,
Platform
public interface Platform (Code)
This interface provides callbacks that allow to perform RDBMS Platform specific operations wherever neccessary. The Platform implementation is selected by the platform attribute for each jdbc-connection-descriptor entry in the repository file.
version:
   $Id: Platform.java,v 1.24.2.6 2005/12/18 16:43:19 tomdz Exp $
author:
   Thomas Mahler




Method Summary
 voidaddBatch(PreparedStatement stmt)
     Called when adding statements to current batch.
 voidaddPagingSql(StringBuffer anSqlString)
    
 voidafterStatementClose(Statement stmt, ResultSet rs)
     Called by org.apache.ojb.broker.accesslayer.StatementManagerIF implementation after invoking stmt.close() method.
 voidafterStatementCreate(Statement stmt)
     Called after a statement has been created.
 voidbeforeBatch(PreparedStatement stmt)
     Called before batching operations on a statement.
 voidbeforeStatementClose(Statement stmt, ResultSet rs)
     Called by org.apache.ojb.broker.accesslayer.StatementManagerIF implementation before invoking stmt.close() method.
 intbindPagingParameters(PreparedStatement ps, int index, int startAt, int endAt)
    
 booleanbindPagingParametersFirst()
    
 voidchangeAutoCommitState(JdbcConnectionDescriptor jcd, Connection con, boolean newState)
     Used to do a temporary change of the m_connection autoCommit state.
 Stringconcatenate(String[] theColumns)
    
 StringcreateSequenceQuery(String sequenceName, Properties prop)
     Returns a query to create a sequence entry.
Parameters:
  sequenceName - The name of the sequence to create.
Parameters:
  prop - The database specific sequence properties.
 StringcreateSequenceQuery(String sequenceName)
     Returns a query to create a sequence entry.
Parameters:
  sequenceName - The name of the sequence to create.
 StringdropSequenceQuery(String sequenceName)
     Returns a query to drop a sequence entry.
 int[]executeBatch(PreparedStatement stmt)
     Executes current batch.
 StringgetEscapeClause(LikeCriteria aCriteria)
    
 bytegetJoinSyntaxType()
     Get join syntax type for this RDBMS - one of the constants from JoinSyntaxTypes interface.
 StringgetLastInsertIdentityQuery(String tableName)
     If database supports native key generation via identity column, this method should return the sql-query to obtain the last generated id.
 voidinitializeJdbcConnection(JdbcConnectionDescriptor jcd, Connection conn)
     Called immediately after a JDBC connection has been created by a ConnectionFactory implementation (not used for DataSource connections).
 StringnextSequenceQuery(String sequenceName)
     Returns a query to obtain the next sequence key.
 CallableStatementprepareNextValProcedureStatement(Connection con, String procedureName, String sequenceName)
     Create stored procedure call for a special sequence manager implementation org.apache.ojb.broker.util.sequence.SequenceManagerStoredProcedureImpl , because it seems that jdbc-driver differ in handling of CallableStatement.
 voidregisterOutResultSet(CallableStatement stmt, int position)
     Registers call argument at position as returning a ResultSet value.
 voidsetNullForStatement(PreparedStatement ps, int index, int sqlType)
     Called to let the Platform implementation perform any JDBC type-specific operations needed by the driver when binding null parameters for a PreparedStatement.
 voidsetObjectForStatement(PreparedStatement ps, int index, Object value, int sqlType)
     Called to let the Platform implementation perform any JDBC type-specific operations needed by the driver when binding positional parameters for a PreparedStatement.
 booleansupportsBatchOperations()
     If this platform supports the batch operations jdbc 2.0 feature.
 booleansupportsMultiColumnCountDistinct()
     Whether the platform supports a COUNT DISTINCT across multiple columns.
 booleansupportsPaging()
    
 booleanuseCountForResultsetSize()
     Override default ResultSet size determination (rs.last();rs.getRow()) with select count(*) operation.



Method Detail
addBatch
void addBatch(PreparedStatement stmt) throws PlatformException(Code)
Called when adding statements to current batch.
Parameters:
  stmt - the statement you are adding to the batch
throws:
  PlatformException -



addPagingSql
void addPagingSql(StringBuffer anSqlString)(Code)
Add the LIMIT or equivalent to the SQL SQL-Paging is not yet supported



afterStatementClose
void afterStatementClose(Statement stmt, ResultSet rs) throws PlatformException(Code)
Called by org.apache.ojb.broker.accesslayer.StatementManagerIF implementation after invoking stmt.close() method.



afterStatementCreate
void afterStatementCreate(Statement stmt) throws PlatformException(Code)
Called after a statement has been created.



beforeBatch
void beforeBatch(PreparedStatement stmt) throws PlatformException(Code)
Called before batching operations on a statement.
Parameters:
  stmt - the statement you want to batch on
throws:
  PlatformException -



beforeStatementClose
void beforeStatementClose(Statement stmt, ResultSet rs) throws PlatformException(Code)
Called by org.apache.ojb.broker.accesslayer.StatementManagerIF implementation before invoking stmt.close() method.



bindPagingParameters
int bindPagingParameters(PreparedStatement ps, int index, int startAt, int endAt) throws SQLException(Code)
Bind the Paging Parameters SQL-Paging is not yet supported
Parameters:
  ps -
Parameters:
  index - parameter index
Parameters:
  startAt -
Parameters:
  endAt -



bindPagingParametersFirst
boolean bindPagingParametersFirst()(Code)
Answer true if the LIMIT parameters are bound before the query parameters SQL-Paging is not yet supported



changeAutoCommitState
void changeAutoCommitState(JdbcConnectionDescriptor jcd, Connection con, boolean newState)(Code)
Used to do a temporary change of the m_connection autoCommit state. When using this method ensure to reset the original state before m_connection was returned to pool or closed. Only when org.apache.ojb.broker.metadata.JdbcConnectionDescriptor.getUseAutoCommit was set to org.apache.ojb.broker.metadata.JdbcConnectionDescriptor.AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE the change of the autoCommit state take effect.



concatenate
String concatenate(String[] theColumns)(Code)
Concatenate the columns
ie: col1 || col2 || col3 (ANSI)
ie: col1 + col2 + col3 (MS SQL-Server)
ie: concat(col1, col2, col3) (MySql)
Parameters:
  theColumns - the concatenated String



createSequenceQuery
String createSequenceQuery(String sequenceName, Properties prop)(Code)
Returns a query to create a sequence entry.
Parameters:
  sequenceName - The name of the sequence to create.
Parameters:
  prop - The database specific sequence properties. a sql string to create a sequence



createSequenceQuery
String createSequenceQuery(String sequenceName)(Code)
Returns a query to create a sequence entry.
Parameters:
  sequenceName - The name of the sequence to create. a sql string to create a sequencePlatform.createSequenceQuery(String)



dropSequenceQuery
String dropSequenceQuery(String sequenceName)(Code)
Returns a query to drop a sequence entry. a sql string to drop a sequence



executeBatch
int[] executeBatch(PreparedStatement stmt) throws PlatformException(Code)
Executes current batch.
Parameters:
  stmt - the statement you want to execute the batch on
throws:
  PlatformException -



getEscapeClause
String getEscapeClause(LikeCriteria aCriteria)(Code)
Answer the Clause used Escape wildcards in LIKE
Parameters:
  aCriteria -



getJoinSyntaxType
byte getJoinSyntaxType()(Code)
Get join syntax type for this RDBMS - one of the constants from JoinSyntaxTypes interface.
See Also:   org.apache.ojb.broker.accesslayer.JoinSyntaxTypes.SQL92_JOIN_SYNTAX
See Also:   org.apache.ojb.broker.accesslayer.JoinSyntaxTypes.SQL92_NOPAREN_JOIN_SYNTAX
See Also:   org.apache.ojb.broker.accesslayer.JoinSyntaxTypes.ORACLE_JOIN_SYNTAX
See Also:   org.apache.ojb.broker.accesslayer.JoinSyntaxTypes.SYBASE_JOIN_SYNTAX



getLastInsertIdentityQuery
String getLastInsertIdentityQuery(String tableName)(Code)
If database supports native key generation via identity column, this method should return the sql-query to obtain the last generated id.



initializeJdbcConnection
void initializeJdbcConnection(JdbcConnectionDescriptor jcd, Connection conn) throws PlatformException(Code)
Called immediately after a JDBC connection has been created by a ConnectionFactory implementation (not used for DataSource connections).
Parameters:
  conn - the Connection to be initialized



nextSequenceQuery
String nextSequenceQuery(String sequenceName)(Code)
Returns a query to obtain the next sequence key. a sql string to get next sequence value



prepareNextValProcedureStatement
CallableStatement prepareNextValProcedureStatement(Connection con, String procedureName, String sequenceName) throws PlatformException(Code)
Create stored procedure call for a special sequence manager implementation org.apache.ojb.broker.util.sequence.SequenceManagerStoredProcedureImpl , because it seems that jdbc-driver differ in handling of CallableStatement.
Note: The out-parameter of the stored procedure must be registered at first position, because lookup for new long id in the implementation:
 Connection con = broker.serviceConnectionManager().getConnection();
 cs = getPlatform().prepareNextValProcedureStatement(con, PROCEDURE_NAME, sequenceName);
 cs.executeUpdate();
 return cs.getLong(1);
 



registerOutResultSet
void registerOutResultSet(CallableStatement stmt, int position) throws SQLException(Code)
Registers call argument at position as returning a ResultSet value.
Parameters:
  stmt - the statement
Parameters:
  position - argument position



setNullForStatement
void setNullForStatement(PreparedStatement ps, int index, int sqlType) throws SQLException(Code)
Called to let the Platform implementation perform any JDBC type-specific operations needed by the driver when binding null parameters for a PreparedStatement.



setObjectForStatement
void setObjectForStatement(PreparedStatement ps, int index, Object value, int sqlType) throws SQLException(Code)
Called to let the Platform implementation perform any JDBC type-specific operations needed by the driver when binding positional parameters for a PreparedStatement.



supportsBatchOperations
boolean supportsBatchOperations()(Code)
If this platform supports the batch operations jdbc 2.0 feature. This is by driver, so we check the driver's metadata once and set something in the platform. true if the platform supports batch, false otherwise.



supportsMultiColumnCountDistinct
boolean supportsMultiColumnCountDistinct()(Code)
Whether the platform supports a COUNT DISTINCT across multiple columns. true if it is supported



supportsPaging
boolean supportsPaging()(Code)
Answer true if LIMIT or equivalent is supported SQL-Paging is not yet supported



useCountForResultsetSize
boolean useCountForResultsetSize()(Code)
Override default ResultSet size determination (rs.last();rs.getRow()) with select count(*) operation.



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