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


java.lang.Object
   com.versant.core.jdbc.metadata.JdbcClass

JdbcClass
final public class JdbcClass implements Serializable(Code)
Extra meta data for a class stored in JDBC. Some of the fields are also present in the normal ClassMetaData and are duplicated here for performance reasons.


Field Summary
final public static  intINHERITANCE_FLAT
     Subclass fields stored in the table of its immediate superclass.
final public static  intINHERITANCE_HORIZONTAL
     Fields stored in subclass table.
final public static  intINHERITANCE_VERTICAL
     Subclass fields stored in its own table.
final public static  intOPTIMISTIC_LOCKING_CHANGED
     Detect concurrent updates to this class by including the previous values of all changed fields in the where clause.
final public static  intOPTIMISTIC_LOCKING_NONE
     Do not detect concurrent updates to this class.
final public static  intOPTIMISTIC_LOCKING_TIMESTAMP
     Detect concurrent updates to this class by using a timestamp column.
final public static  intOPTIMISTIC_LOCKING_VERSION
     Detect concurrent updates to this class by using a version column.
public  JdbcTable[]allTables
     All the tables for this class including superclass tables.
public  JdbcColumnclassIdCol
     The column used to hold the classId value for each row.
public  ClassMetaDatacmd
     The normal meta data for our class.
public  StringdeleteRowSql
     Cache for SQL required to delete a main table row for this class.
public  booleandoNotCreateTable
     If this flag is set the the table for this class will not be created by the create schema task or the workbench.
public  JdbcField[]fields
     The fields in fieldNo order.
public  intinheritance
     The inheritance strategy for this class.
public  ObjectjdbcClassId
     Our classId for this class.
public  JdbcKeyGeneratorjdbcKeyGenerator
     The JDBC key generator for this class (null if no key generator is required).
public  StringlockRowSql
     Cache for SQL required to lock the main table row for this class.
public  booleannoBatching
     Do not use statement batching with this class.
public  intoptimisticLocking
     How optimistic locking is done for this class (one of the OPTIMISTIC_LOCKING_xxx constants).
public  JdbcSimpleFieldoptimisticLockingField
     The field used to store the row version or timestamp value for this table for optimistic locking.
public  ClassMetaDatareadAsClass
     Treat rows in the database that would be instances of us as instances of readAsClass instead.
final public  SqlDriversqlDriver
     Our SqlDriver.
public  JdbcField[]stateFields
     The fields in State fieldNo order.
public  JdbcTabletable
     Our table.
public  StringtableName
     The name of our table.
public  intuseJoin
     This becomes the default value for the useJoin field for references to this class.

Constructor Summary
public  JdbcClass(SqlDriver sqlDriver)
    

Method Summary
public  voidbuildStateFields()
     Build the stateFields array for this class.
public  voidconvertJdbcClassIdToInteger()
     Convert our jdbcClassId to an Integer if it is not already an Integer.
public  voidcopyOptimisticLockingToSubs()
     Copy our optimistic locking settings to all of our subclasses.
public  voiddump()
    
public  voiddump(PrintStream out, String indent)
    
public  ClassMetaDatafindClass(Object jdbcClassId)
     Find the class with the given JDBC classId.
public  voidfindFieldsForColumn(ClassMetaData cmd, String columnName, List list)
     Find all fields in this class that have columnName in their main table columns and add them to list.
public  JdbcSimpleFieldfindPkField(String fname)
     Find a primary key field of this class or the topmost superclass in the heirachy by name or null if none.
public  intfindPkFieldIndex(JdbcSimpleField f)
     Find the index of the primary key field f or -1 if none.
public  SqlExpgetCheckClassIdExp(SelectExp se)
     Get an SqlExp that will only return instances of this class or one of its subclasses from this table.
public  LiteralExpgetClassIdExp(boolean subclasses)
     Get a LiteralExp for our jdbc-class-id.
public  MapgetColNamesToJdbcField()
    
public  StringgetLockRowColumnName()
     Get the column that should be used for update locking.
public  StringgetLockRowSql()
     Get SQL to lock a row in our table.
public  intgetMaxOIDsForIN(SqlDriver sqlDriver)
     Get the maximum number of OIDs for this class that can be included in an IN (?, .., ?) statement.
public  voidgetTables(HashSet tables)
     Add all tables that belong to this class to the set.
public  booleanisIntJdbcClassIdHeirachy()
     See if our jdbcClassId that those of all of our subclasses are ints.
public  booleanisMultiTableHeirachy()
    
public  voidmarkColumnsShared(String columnName, JdbcTable cTable)
     Mark any columns for fields in this class with name columnName shared = true unless they are primary key fields.
public  voidmarkSubclassColumnsShared(String columnName)
     Find any columns in any of our subclasses (and recursively their subclasses) with columnName and set shared = true for them.
public  voidsetClassIdCol(JdbcColumn classIdCol)
     Set the classIdField for this class and recursively all its subclasses.
public  voidsetJdbcKeyGenerator(JdbcKeyGenerator jdbcKeyGenerator)
     Set the key generator for this class and recursively all its subclasses.
public  voidsetTable(JdbcTable table)
     Set the table for this class.
public static  StringtoOptimisticLockingString(int o)
    
public  StringtoString()
    

Field Detail
INHERITANCE_FLAT
final public static int INHERITANCE_FLAT(Code)
Subclass fields stored in the table of its immediate superclass.



INHERITANCE_HORIZONTAL
final public static int INHERITANCE_HORIZONTAL(Code)
Fields stored in subclass table.



INHERITANCE_VERTICAL
final public static int INHERITANCE_VERTICAL(Code)
Subclass fields stored in its own table.



OPTIMISTIC_LOCKING_CHANGED
final public static int OPTIMISTIC_LOCKING_CHANGED(Code)
Detect concurrent updates to this class by including the previous values of all changed fields in the where clause.



OPTIMISTIC_LOCKING_NONE
final public static int OPTIMISTIC_LOCKING_NONE(Code)
Do not detect concurrent updates to this class.



OPTIMISTIC_LOCKING_TIMESTAMP
final public static int OPTIMISTIC_LOCKING_TIMESTAMP(Code)
Detect concurrent updates to this class by using a timestamp column.



OPTIMISTIC_LOCKING_VERSION
final public static int OPTIMISTIC_LOCKING_VERSION(Code)
Detect concurrent updates to this class by using a version column.



allTables
public JdbcTable[] allTables(Code)
All the tables for this class including superclass tables. The entry at 0 is the table for the topmost superclass. Also table == allTables[allTables.length - 1].



classIdCol
public JdbcColumn classIdCol(Code)
The column used to hold the classId value for each row. This is used to implement inheritance. It may be null if this class has no persistent subclasses or if all of the subclasses use vertical inheritance. This field is set to the same value for all the classes in a heirachy.



cmd
public ClassMetaData cmd(Code)
The normal meta data for our class.



deleteRowSql
public String deleteRowSql(Code)
Cache for SQL required to delete a main table row for this class.



doNotCreateTable
public boolean doNotCreateTable(Code)
If this flag is set the the table for this class will not be created by the create schema task or the workbench.



fields
public JdbcField[] fields(Code)
The fields in fieldNo order. Note that if a fieldNo is transactional then its entry here will be null.



inheritance
public int inheritance(Code)
The inheritance strategy for this class. This will be INHERITANCE_FLAT if the class is not in a heirachy or is a base class.
See Also:   JdbcClass.INHERITANCE_FLAT
See Also:   JdbcClass.INHERITANCE_VERTICAL



jdbcClassId
public Object jdbcClassId(Code)
Our classId for this class. This does not have to be the same as that in ClassMetaData. It only has to be unique within an inheritance heirachy. This will default to the classId of the class. If the classIdCol column is a number (INT etc) then this must be a Number. Otherwise it must be a String.
See Also:   ClassMetaData.classId



jdbcKeyGenerator
public JdbcKeyGenerator jdbcKeyGenerator(Code)
The JDBC key generator for this class (null if no key generator is required).



lockRowSql
public String lockRowSql(Code)
Cache for SQL required to lock the main table row for this class.



noBatching
public boolean noBatching(Code)
Do not use statement batching with this class.



optimisticLocking
public int optimisticLocking(Code)
How optimistic locking is done for this class (one of the OPTIMISTIC_LOCKING_xxx constants).



optimisticLockingField
public JdbcSimpleField optimisticLockingField(Code)
The field used to store the row version or timestamp value for this table for optimistic locking. It may be null. This may be a fake field.



readAsClass
public ClassMetaData readAsClass(Code)
Treat rows in the database that would be instances of us as instances of readAsClass instead. This is used to implement flat inheritance with no descriminator where rows are instances of the leaf class.



sqlDriver
final public SqlDriver sqlDriver(Code)
Our SqlDriver.



stateFields
public JdbcField[] stateFields(Code)
The fields in State fieldNo order. Note that if a fieldNo is transactional then its entry here will be null. This includes all fields from superclasses.



table
public JdbcTable table(Code)
Our table. This may be the table of the pcSuperClass if this is a subclass with fields stored in the base table.



tableName
public String tableName(Code)
The name of our table.



useJoin
public int useJoin(Code)
This becomes the default value for the useJoin field for references to this class.
See Also:   JdbcRefField.useJoin




Constructor Detail
JdbcClass
public JdbcClass(SqlDriver sqlDriver)(Code)




Method Detail
buildStateFields
public void buildStateFields()(Code)
Build the stateFields array for this class.



convertJdbcClassIdToInteger
public void convertJdbcClassIdToInteger()(Code)
Convert our jdbcClassId to an Integer if it is not already an Integer. Recursively process subclasses.



copyOptimisticLockingToSubs
public void copyOptimisticLockingToSubs()(Code)
Copy our optimistic locking settings to all of our subclasses.



dump
public void dump()(Code)



dump
public void dump(PrintStream out, String indent)(Code)



findClass
public ClassMetaData findClass(Object jdbcClassId)(Code)
Find the class with the given JDBC classId. This might be ourselves or one of our subclasses. Returns null if not found.



findFieldsForColumn
public void findFieldsForColumn(ClassMetaData cmd, String columnName, List list)(Code)
Find all fields in this class that have columnName in their main table columns and add them to list.



findPkField
public JdbcSimpleField findPkField(String fname)(Code)
Find a primary key field of this class or the topmost superclass in the heirachy by name or null if none.



findPkFieldIndex
public int findPkFieldIndex(JdbcSimpleField f)(Code)
Find the index of the primary key field f or -1 if none.



getCheckClassIdExp
public SqlExp getCheckClassIdExp(SelectExp se)(Code)
Get an SqlExp that will only return instances of this class or one of its subclasses from this table.
Parameters:
  se - A select against our table



getClassIdExp
public LiteralExp getClassIdExp(boolean subclasses)(Code)
Get a LiteralExp for our jdbc-class-id. If subclasses is true then a list of LiteralExp's are returned including all the



getColNamesToJdbcField
public Map getColNamesToJdbcField()(Code)



getLockRowColumnName
public String getLockRowColumnName()(Code)
Get the column that should be used for update locking.



getLockRowSql
public String getLockRowSql()(Code)
Get SQL to lock a row in our table.



getMaxOIDsForIN
public int getMaxOIDsForIN(SqlDriver sqlDriver)(Code)
Get the maximum number of OIDs for this class that can be included in an IN (?, .., ?) statement. This depends on the database and the number of columns in the primary key. The return value is zero if this class has a composite primary key.



getTables
public void getTables(HashSet tables)(Code)
Add all tables that belong to this class to the set.



isIntJdbcClassIdHeirachy
public boolean isIntJdbcClassIdHeirachy()(Code)
See if our jdbcClassId that those of all of our subclasses are ints. This is used to default the type of the descriminator column to INTEGER if possible.



isMultiTableHeirachy
public boolean isMultiTableHeirachy()(Code)
Is this class stored in a different table to the base class in the heirachy?



markColumnsShared
public void markColumnsShared(String columnName, JdbcTable cTable)(Code)
Mark any columns for fields in this class with name columnName shared = true unless they are primary key fields.



markSubclassColumnsShared
public void markSubclassColumnsShared(String columnName)(Code)
Find any columns in any of our subclasses (and recursively their subclasses) with columnName and set shared = true for them.



setClassIdCol
public void setClassIdCol(JdbcColumn classIdCol)(Code)
Set the classIdField for this class and recursively all its subclasses.



setJdbcKeyGenerator
public void setJdbcKeyGenerator(JdbcKeyGenerator jdbcKeyGenerator)(Code)
Set the key generator for this class and recursively all its subclasses.



setTable
public void setTable(JdbcTable table)(Code)
Set the table for this class. This will also set the tablename and allTables fields. This method must only be invoked one a subclass if it has been called on its superclass.



toOptimisticLockingString
public static String toOptimisticLockingString(int o)(Code)



toString
public String toString()(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.