Java Doc for DatabasePolicy.java in  » Database-ORM » ODAL » com » completex » objective » components » persistency » 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 » Database ORM » ODAL » com.completex.objective.components.persistency.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.completex.objective.components.persistency.core.DatabasePolicy

All known Subclasses:   com.completex.objective.components.persistency.core.impl.AbstractDatabasePolicy,
DatabasePolicy
public interface DatabasePolicy (Code)
Database policy. Has set of methods that "equalize" database differences.
author:
   Gennady Krizhevsky

Inner Class :static class NullDatabasePolicy implements DatabasePolicy

Field Summary
 intLIMIT_IN_SELECT
    
 intLIMIT_IN_THE_END
    
 intLIMIT_IN_WHERE
    
 intNO_LIMIT
    
final public static  DatabasePolicyNULL_DATABASE_POLICY
    


Method Summary
 StringcharLengthSql(String expression)
    
 StringconnectionActiveSql()
    
 StringdateSql(Date date)
    
 OutputStreamgetAsciiOutputStream(Clob lob)
    
 OutputStreamgetBinaryOutputStream(Blob lob)
    
 WritergetCharacterOutputStream(Clob lob)
    
 intgetLimitLocation()
    
 StringgetLimitSql(int offset, int rowCount)
    
 StringgetLimitSql(int rowCount)
    
 StringgetLockHint(boolean lock, String tableName)
    
 StringgetLockString()
    
 StringgetLockString(long timeout, String forUpdateOf)
    
 CharactergetMultiSymbolWildCard()
    
 StringgetName()
    
 StringgetNoWaitLockString(String forUpdateOf)
    
 QuerygetPaginatedWrapperQuery(QueryFactory queryFactory, Query innerQuery)
    
 intgetRefCursorJdbcType()
    
 CharactergetSingleSymbolWildCard()
    
 voidhandlePostInsert(Transaction transaction, Persistency persistency, Record record, Log logger)
    
 booleanisDuplicate(Exception e)
    
 booleanisLocked(Exception e)
    
public  StringnextSequenceSql(String objectName)
     Return a SQL string to get the next sequence number for a table.
 StringnowSql()
    
 StringproprietoryJoin(Join join)
    
 StringrlikeFunc(String expression, boolean matches)
    
 StringrlikeSql(String expression, String pattern, boolean matches)
    
 booleansupportsAutoincrement()
    
 booleansupportsBlob()
    
 booleansupportsClob()
    
 booleansupportsExplicitRecordLevelLocks()
    
 booleansupportsLimit()
    
 booleansupportsSequences()
    
 booleansupportsSubqueries()
    
 booleanuseAnsiJoin()
    
See Also:   DatabasePolicy.proprietoryJoin(Join)
See Also:    true if ANSI join is to be used.
 booleanuseClobOutputStream()
     Indicator for type handlers to whether to do Clob write processing as a "post-processing".
 booleanuseTwoStepBinaryUpdate()
     Indicator for type handlers to whether to do Blob write processing as a "post-processing".

Field Detail
LIMIT_IN_SELECT
int LIMIT_IN_SELECT(Code)



LIMIT_IN_THE_END
int LIMIT_IN_THE_END(Code)



LIMIT_IN_WHERE
int LIMIT_IN_WHERE(Code)



NO_LIMIT
int NO_LIMIT(Code)
Limit locations:



NULL_DATABASE_POLICY
final public static DatabasePolicy NULL_DATABASE_POLICY(Code)





Method Detail
charLengthSql
String charLengthSql(String expression)(Code)

Parameters:
  expression - sql fragment that uses database specific function to get Length in characters



connectionActiveSql
String connectionActiveSql()(Code)
sql fragment that can be used to check if connection is active



dateSql
String dateSql(Date date)(Code)
Something like oracle's "to_date"
Parameters:
  date - date sql fragment



getAsciiOutputStream
OutputStream getAsciiOutputStream(Clob lob) throws SQLException(Code)
Like clob.getAsciiOutputStream();
Parameters:
  lob - OutputStream
throws:
  SQLException -



getBinaryOutputStream
OutputStream getBinaryOutputStream(Blob lob) throws SQLException(Code)

Parameters:
  lob - BinaryOutputStream from Blob
throws:
  SQLException -



getCharacterOutputStream
Writer getCharacterOutputStream(Clob lob) throws SQLException(Code)
Like clob.getCharacterOutputStream()
Parameters:
  lob - Writer
throws:
  SQLException -



getLimitLocation
int getLimitLocation()(Code)
one of int NO_LIMIT, LIMIT_IN_SELECT, LIMIT_IN_WHERE, LIMIT_IN_THE_END values



getLimitSql
String getLimitSql(int offset, int rowCount)(Code)
Produces limit sql string fragment
Parameters:
  offset - - zero based offset
Parameters:
  rowCount - number rows to bring limit String



getLimitSql
String getLimitSql(int rowCount)(Code)
Produces limit sql string fragment
Parameters:
  rowCount - number rows to bring limit String



getLockHint
String getLockHint(boolean lock, String tableName)(Code)
Something like "holdlock" in MySql
Parameters:
  lock -
Parameters:
  tableName - lock hint



getLockString
String getLockString()(Code)
lock string getLockString(timeout = 0, forUpdateOf = null);



getLockString
String getLockString(long timeout, String forUpdateOf)(Code)

Parameters:
  timeout -
Parameters:
  forUpdateOf - lock string



getMultiSymbolWildCard
Character getMultiSymbolWildCard()(Code)
Like '%' in oracle Multi Symbol Wild Card



getName
String getName()(Code)
policy name



getNoWaitLockString
String getNoWaitLockString(String forUpdateOf)(Code)
Gets lock string that will cause throwing an exception in case of lock encountered
Parameters:
  forUpdateOf - No Wait Lock String



getPaginatedWrapperQuery
Query getPaginatedWrapperQuery(QueryFactory queryFactory, Query innerQuery)(Code)
Defines the way paginatedquery is produced from the "normal" one through means of database
Parameters:
  queryFactory -
Parameters:
  innerQuery - Paginated Wrapper Query



getRefCursorJdbcType
int getRefCursorJdbcType()(Code)
type that is used to replesent Reference Cursor



getSingleSymbolWildCard
Character getSingleSymbolWildCard()(Code)
Like '_' in oracle Single Symbol Wild Card



handlePostInsert
void handlePostInsert(Transaction transaction, Persistency persistency, Record record, Log logger) throws SQLException(Code)
Method will be called after insert to enable populating certain values in the Record
Parameters:
  transaction -
Parameters:
  persistency -
Parameters:
  record -
Parameters:
  logger -
throws:
  SQLException -



isDuplicate
boolean isDuplicate(Exception e)(Code)

Parameters:
  e - true if exception happend because of the duplicate record



isLocked
boolean isLocked(Exception e)(Code)

Parameters:
  e - true if exception happend because of the lock



nextSequenceSql
public String nextSequenceSql(String objectName)(Code)
Return a SQL string to get the next sequence number for a table. When executed, this SQL should return a one column, one row result set with an integer.
Parameters:
  objectName - a value of type 'String' a value of type 'String'



nowSql
String nowSql()(Code)
sql fragment with database system date



proprietoryJoin
String proprietoryJoin(Join join)(Code)
Builds proprietory Join sql fragment
Parameters:
  join - proprietory Join sql fragment



rlikeFunc
String rlikeFunc(String expression, boolean matches)(Code)

Parameters:
  expression -
Parameters:
  matches - false in case of negation "regular expression like" sql fragment that uses placeholder "?" instead of pattern



rlikeSql
String rlikeSql(String expression, String pattern, boolean matches)(Code)

Parameters:
  expression -
Parameters:
  pattern -
Parameters:
  matches - false in case of negation "regular expression like" sql fragment



supportsAutoincrement
boolean supportsAutoincrement()(Code)



supportsBlob
boolean supportsBlob()(Code)
Returns true if driver supports ResultSet.getBlob syntax true if driver supports ResultSet.getBlob syntax



supportsClob
boolean supportsClob()(Code)
Returns true if driver supports ResultSet.getClob syntax true if driver supports ResultSet.getClob syntax



supportsExplicitRecordLevelLocks
boolean supportsExplicitRecordLevelLocks()(Code)



supportsLimit
boolean supportsLimit()(Code)
true if database supports limit clause



supportsSequences
boolean supportsSequences()(Code)



supportsSubqueries
boolean supportsSubqueries()(Code)
true if database supports subqueries



useAnsiJoin
boolean useAnsiJoin()(Code)

See Also:   DatabasePolicy.proprietoryJoin(Join)
See Also:    true if ANSI join is to be used. Otherwise proprietoryJoin has to be defined



useClobOutputStream
boolean useClobOutputStream()(Code)
Indicator for type handlers to whether to do Clob write processing as a "post-processing". In which case the type hadler will try to extract InputStream the value object. Otherwise binding for write is done in usual way by setObject method true if Clob is to be wtitten as post-processing



useTwoStepBinaryUpdate
boolean useTwoStepBinaryUpdate()(Code)
Indicator for type handlers to whether to do Blob write processing as a "post-processing". In which case the type hadler will try to extract InputStream the value object. Otherwise binding for write is done in usual way by setObject method true if Blob is to be wtitten as post-processing



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