Java Doc for JdbcColumn.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.JdbcColumn

JdbcColumn
final public class JdbcColumn implements Serializable(Code)
A column in a JDBC table.


Field Summary
public  booleanautoinc
    
public  Stringcomment
     Comment info for the SQL script (e.g.
public transient  JdbcConverterconverter
     This is responsible for getting a suitable java value for this column from a ResultSet and setting the java value of this column on a PreparedStatement.
public  booleanequalityTest
     Can values from this column be compared for equality with Java values? Non-exact data types should have false here (e.g.
public  booleanforeignKey
    
public transient  ClassjavaType
     The java type of this column.
public  intjavaTypeCode
     The java type code of this column from MDStatics.
public  intjdbcType
     The JDBC type of this column from java.sql.Types.
public  intlength
     The length (or precision) of this column.
public  Stringname
     The JDBC name of this column.
public  booleannulls
    
public  booleanpartOfIndex
    
public  booleanpk
    
public transient  JdbcSimpleFieldrefField
     The name of the field this column references.
public  intscale
     The scale of this column (number of digits after the decimal point).
public  booleanshared
     Should this column not be created when generating the schema? This is used when columns are shared between one or more fields.
public  StringsqlType
     The actual SQL type of this column for create scripts etc.
public transient  JdbcTabletable
     The table this column belongs to.

Constructor Summary
public  JdbcColumn()
    
public  JdbcColumn(JdbcJavaTypeMapping m, JdbcTypeRegistry jdbcTypeRegistry)
    

Method Summary
public  voidaddColumnNames(String tableName, JdbcNameGenerator nameGen)
     If the column or its component columns have names then add them to nameGen.
public static  voidaddColumnNames(String tableName, JdbcColumn[] cols, JdbcNameGenerator namegen)
     If the column or its component columns have names then add them to nameGen.
public static  voidappendEqualsParam(CharBuf s, JdbcColumn[] cols, SqlDriver driver)
     /** Append a 'cola = ? [and colb = ?' string for an array of simple cols to s.
public  voidappendNames(CharBuf s)
     Append a comma list of our column name(s) to s.
public  voidappendParams(CharBuf s)
     Append a comma param list to s (e.g.
public static  JdbcColumn[]concat(JdbcColumn[] a, JdbcColumn[] b)
     Combine two arrays of JdbcColumn's into one.
public static  JdbcColumn[]concat(JdbcColumn[] a, JdbcColumn b)
     Combine an arrays of JdbcColumn's and a single column into one.
public  JdbcColumncopy()
     Duplicate this column but leave the name, table and refField fields of the duplicates null.
public  LiteralExpcreateClassIdLiteralExp(Object val)
    
public static  SqlExpcreateEqualsParamExp(JdbcColumn[] scols, SelectExp se)
     Get a 'cola = ? [and colb = ?]' expression for an array of simple columns from se.
public  SqlExpcreateEqualsParamExp(SelectExp se)
     Create a col = ? expression.
public static  InExpcreateInParamExp(JdbcColumn[] scols, SelectExp se, int size)
    
public  booleanequals(Object o)
    
public  Objectget(ResultSet rs, int index)
     Get the value of this column from a ResultSet.
public  String[]getColumnNames()
     Get the names of all our component columns.
public  voidgetColumnNames(String[] names)
     Get the names of all our component columns into the array.
public static  String[]getColumnNames(JdbcColumn[] cols)
     Get the names of all the simple columns in an array of columns.
public  intgetInt(ResultSet rs, int index)
     Get the value of this column from the ResultSet as an int.
public  ClassgetJavaType()
    
public  StringgetShortName()
    
public  StringgetTypeString()
    
public  inthashCode()
    
public  booleanisForUpdate()
    
public  voidset(PreparedStatement ps, int index, Object value)
     Set a value for this column on a PreparedStatement.
public  voidset(PreparedStatement ps, int index, int value)
     Set a value for this column on a PreparedStatement.
public  voidsetColumnNames(String[] names)
     Set the names of all our component columns from the array.
public static  voidsetColumnNames(JdbcColumn[] cols, String[] names)
     Set the names of all the simple columns in an array of columns.
public  voidsetJavaType(Class javaType)
     Set the javaType and the javaTypeCode.
public  voidsetNulls(boolean nulls)
     Set the nulls value for all of our columns.
public  voidsetShared(boolean shared)
    
public  voidsetTable(JdbcTable t)
     Set our table field and recursively all our columns.
public static  StringtoNameString(JdbcColumn[] cols)
     Format an array of columns as a comma separated String of the names.
public static  SqlExptoSqlExp(JdbcColumn[] cols, SelectExp se)
     Flatten cols into a list of expressions to select all the cols.
public static  SqlExptoSqlExp(JdbcColumn[] cols, SelectExp se, SqlExp sList)
     Flatten cols into a list of expressions to select all the cols.
public  SqlExptoSqlExp(SelectExp se)
     Get a list of expressions to select all our simple cols.
public  StringtoString()
    
public  voidupdateFrom(JdbcJavaTypeMapping m, JdbcTypeRegistry jdbcTypeRegistry)
     Set our properties based on the info in the mapping.

Field Detail
autoinc
public boolean autoinc(Code)
Is this an autoincrement column?



comment
public String comment(Code)
Comment info for the SQL script (e.g. what field this column is for).



converter
public transient JdbcConverter converter(Code)
This is responsible for getting a suitable java value for this column from a ResultSet and setting the java value of this column on a PreparedStatement. It may be null in which case the ResultSet should be accessed directly using one of the getXXX or setXXX methods.



equalityTest
public boolean equalityTest(Code)
Can values from this column be compared for equality with Java values? Non-exact data types should have false here (e.g. float and double).



foreignKey
public boolean foreignKey(Code)
Is this column part of a foreign key reference to another table?



javaType
public transient Class javaType(Code)
The java type of this column. This is used to select converters etc and when the state of this column needs to be stored. For a column for a persistent field this will just be the type of the field.



javaTypeCode
public int javaTypeCode(Code)
The java type code of this column from MDStatics.
See Also:   com.versant.core.metadata.MDStatics



jdbcType
public int jdbcType(Code)
The JDBC type of this column from java.sql.Types.



length
public int length(Code)
The length (or precision) of this column.



name
public String name(Code)
The JDBC name of this column.



nulls
public boolean nulls(Code)
Does this column allow nulls?



partOfIndex
public boolean partOfIndex(Code)
Is this column part of an index?



pk
public boolean pk(Code)
Is this column part of the primary key for its table?



refField
public transient JdbcSimpleField refField(Code)
The name of the field this column references. This is used for columns that reference composite primary key classes to identify which primary key field the column is for.



scale
public int scale(Code)
The scale of this column (number of digits after the decimal point).



shared
public boolean shared(Code)
Should this column not be created when generating the schema? This is used when columns are shared between one or more fields.



sqlType
public String sqlType(Code)
The actual SQL type of this column for create scripts etc.



table
public transient JdbcTable table(Code)
The table this column belongs to.




Constructor Detail
JdbcColumn
public JdbcColumn()(Code)



JdbcColumn
public JdbcColumn(JdbcJavaTypeMapping m, JdbcTypeRegistry jdbcTypeRegistry)(Code)




Method Detail
addColumnNames
public void addColumnNames(String tableName, JdbcNameGenerator nameGen) throws IllegalArgumentException(Code)
If the column or its component columns have names then add them to nameGen.
throws:
  IllegalArgumentException - if any names are invalid



addColumnNames
public static void addColumnNames(String tableName, JdbcColumn[] cols, JdbcNameGenerator namegen) throws IllegalArgumentException(Code)
If the column or its component columns have names then add them to nameGen.
throws:
  IllegalArgumentException - if any names are invalid



appendEqualsParam
public static void appendEqualsParam(CharBuf s, JdbcColumn[] cols, SqlDriver driver)(Code)
/** Append a 'cola = ? [and colb = ?' string for an array of simple cols to s.



appendNames
public void appendNames(CharBuf s)(Code)
Append a comma list of our column name(s) to s.



appendParams
public void appendParams(CharBuf s)(Code)
Append a comma param list to s (e.g. ?, ?).



concat
public static JdbcColumn[] concat(JdbcColumn[] a, JdbcColumn[] b)(Code)
Combine two arrays of JdbcColumn's into one. If b is null then a is returned as is.



concat
public static JdbcColumn[] concat(JdbcColumn[] a, JdbcColumn b)(Code)
Combine an arrays of JdbcColumn's and a single column into one. If the single column is null then the array is returned as is.



copy
public JdbcColumn copy()(Code)
Duplicate this column but leave the name, table and refField fields of the duplicates null.



createClassIdLiteralExp
public LiteralExp createClassIdLiteralExp(Object val)(Code)
Create a Literal Exp for a classIdColumn



createEqualsParamExp
public static SqlExp createEqualsParamExp(JdbcColumn[] scols, SelectExp se)(Code)
Get a 'cola = ? [and colb = ?]' expression for an array of simple columns from se.



createEqualsParamExp
public SqlExp createEqualsParamExp(SelectExp se)(Code)
Create a col = ? expression.



createInParamExp
public static InExp createInParamExp(JdbcColumn[] scols, SelectExp se, int size)(Code)



equals
public boolean equals(Object o)(Code)



get
public Object get(ResultSet rs, int index) throws SQLException(Code)
Get the value of this column from a ResultSet.



getColumnNames
public String[] getColumnNames()(Code)
Get the names of all our component columns.



getColumnNames
public void getColumnNames(String[] names)(Code)
Get the names of all our component columns into the array.



getColumnNames
public static String[] getColumnNames(JdbcColumn[] cols)(Code)
Get the names of all the simple columns in an array of columns.



getInt
public int getInt(ResultSet rs, int index) throws SQLException(Code)
Get the value of this column from the ResultSet as an int.



getJavaType
public Class getJavaType()(Code)



getShortName
public String getShortName()(Code)



getTypeString
public String getTypeString()(Code)



hashCode
public int hashCode()(Code)



isForUpdate
public boolean isForUpdate()(Code)
Must this column be included in update and insert statements?



set
public void set(PreparedStatement ps, int index, Object value) throws SQLException(Code)
Set a value for this column on a PreparedStatement.



set
public void set(PreparedStatement ps, int index, int value) throws SQLException(Code)
Set a value for this column on a PreparedStatement.



setColumnNames
public void setColumnNames(String[] names)(Code)
Set the names of all our component columns from the array.



setColumnNames
public static void setColumnNames(JdbcColumn[] cols, String[] names)(Code)
Set the names of all the simple columns in an array of columns.



setJavaType
public void setJavaType(Class javaType)(Code)
Set the javaType and the javaTypeCode.



setNulls
public void setNulls(boolean nulls)(Code)
Set the nulls value for all of our columns.



setShared
public void setShared(boolean shared)(Code)



setTable
public void setTable(JdbcTable t)(Code)
Set our table field and recursively all our columns.



toNameString
public static String toNameString(JdbcColumn[] cols)(Code)
Format an array of columns as a comma separated String of the names.



toSqlExp
public static SqlExp toSqlExp(JdbcColumn[] cols, SelectExp se)(Code)
Flatten cols into a list of expressions to select all the cols.



toSqlExp
public static SqlExp toSqlExp(JdbcColumn[] cols, SelectExp se, SqlExp sList)(Code)
Flatten cols into a list of expressions to select all the cols. Add the sqlExp to the end of the created list.



toSqlExp
public SqlExp toSqlExp(SelectExp se)(Code)
Get a list of expressions to select all our simple cols.



toString
public String toString()(Code)



updateFrom
public void updateFrom(JdbcJavaTypeMapping m, JdbcTypeRegistry jdbcTypeRegistry)(Code)
Set our properties based on the info in the mapping. This is useful when a column is based on another column instead of being created by resolving the mapping (e.g. reference fields).



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.