Java Doc for Table.java in  » Database-ORM » Torque » org » apache » torque » engine » database » model » 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 » Torque » org.apache.torque.engine.database.model 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.torque.engine.database.model.Table

Table
public class Table implements IDMethod(Code)
Data about a table used in an application.
author:
   Leon Messerschmidt
author:
   Jason van Zyl
author:
   John McNally
author:
   Byron Foster
author:
   Table()
    
public  Table(String name)
    

Method Summary
public  ColumnaddColumn(Attributes attrib)
     A utility function to create a new column from attrib and add it to this table.
public  voidaddColumn(Column col)
    
public  ForeignKeyaddForeignKey(Attributes attrib)
     A utility function to create a new foreign key from attrib and add it to this table.
public  voidaddForeignKey(ForeignKey fk)
    
public  IdMethodParameteraddIdMethodParameter(Attributes attrib)
     A utility function to create a new id method parameter from attrib and add it to this table.
public  voidaddIdMethodParameter(IdMethodParameter imp)
     Adds a new ID method parameter to the list and sets the parent table of the column associated with the supplied parameter to this table.
public  voidaddIndex(Index index)
    
public  IndexaddIndex(Attributes attrib)
     A utility function to create a new index from attrib and add it to this table.
public  voidaddOption(String key, String value)
     Add an XML Specified option key/value pair to this element's option set.
public  voidaddReferrer(ForeignKey fk)
     Adds the foreign key from another table that refers to this table.
public  voidaddUnique(Unique unique)
    
public  UniqueaddUnique(Attributes attrib)
     A utility function to create a new Unique from attrib and add it to this table.
public  booleancontainsColumn(Column col)
    
public  booleancontainsColumn(String name)
    
public  voiddoFinalInitialization()
    
public  StringgetAlias()
     JavaName of om object this entry references.
public  StringgetBaseClass()
     Gets the value of base class for classes produced from this table.
public  StringgetBasePeer()
     Get the value of basePeer.
public  ColumngetChildrenColumn()
     Gets the column that subclasses of the class representing this table can be produced from.
public  ListgetChildrenNames()
     Get the objects that can be created from this table.
public  ColumngetColumn(String name)
     Returns a specified column.
public  ColumngetColumnByJavaName(String javaName)
     Returns a specified column.
public  ListgetColumns()
    
public  booleangetContainsForeignPK()
    
public  DatabasegetDatabase()
    
public  StringgetDescription()
    
public  ForeignKeygetForeignKey(String col)
     Return the first foreign key that includes col in it's list of local columns.
public  ListgetForeignKeys()
    
public  ListgetForeignTableNames()
    
public  StringgetIdMethod()
    
public  ListgetIdMethodParameters()
     Returns a Collection of parameters relevant for the chosen id generation method.
public  ListgetIndices()
    
public  StringgetInterface()
    
public  StringgetJavaName()
    
public  StringgetName()
    
public  intgetNumColumns()
    
public  StringgetOption(String key)
     Get the value that was associated with this key in an XML option element.
Parameters:
  key - the key of the option.
public  MapgetOptions()
     Gets the full ordered hashtable array of items specified by XML option statements under this element.

Note, this is not thread save but since it's only used for generation which is single threaded, there should be minimum danger using this in Velocity. An Map of all options.

public  StringgetPackage()
     Get the value of package.
public  ListgetPrimaryKey()
     Returns the collection of Columns which make up the single primary key for this table.
public  ListgetReferrers()
     Get list of references to this table.
public  StringgetSequenceName()
     A name to use for creating a sequence if one is not specified.
public  ListgetUnices()
    
public  booleanhasPrimaryKey()
     Determine whether this table has a primary key.
public  booleanisAbstract()
     When a table is abstract, it marks the business object class that is generated as being abstract.
public  booleanisAlias()
     Is this table specified in the schema or is there just a foreign key reference to it.
public  booleanisForReferenceOnly()
     Flag to determine if code/sql gets created for this table.
public  booleanisSkipSql()
     Skip generating sql for this table (in the event it should not be created from scratch).
public  voidloadFromXML(Attributes attrib, String defaultIdMethod)
     Load the table object from an xml tag.
public  StringprintPrimaryKey()
     Returns all parts of the primary key, separated by commas.
public  booleanrequiresTransactionInPostgres()
    
public  voidsetAbstract(boolean v)
     When a table is abstract, it marks the business object class that is generated as being abstract.
public  voidsetAlias(String v)
     Set whether this table specified in the schema or is there just a foreign key reference to it.
public  voidsetBaseClass(String v)
     Set the value of baseClass.
public  voidsetBasePeer(String v)
     Set the value of basePeer.
public  voidsetContainsForeignPK(boolean b)
    
public  voidsetCorrectGetters(Boolean value)
     Force all columns to set the correctGetters property.
public  voidsetDatabase(Database parent)
    
public  voidsetDescription(String newDescription)
    
public  voidsetForReferenceOnly(boolean v)
     Flag to determine if code/sql gets created for this table.
public  voidsetIdMethod(String idMethod)
    
public  voidsetInterface(String v)
    
public  voidsetJavaName(String javaName)
    
public  voidsetName(String newName)
    
public  voidsetPackage(String v)
     Set the value of package.
public  voidsetSkipSql(boolean v)
     Set whether this table should have its creation sql generated.
public  StringtoString()
     Returns a XML representation of this table.


Constructor Detail
Table
public Table()(Code)
Default Constructor



Table
public Table(String name)(Code)
Constructs a table object with a name
Parameters:
  name - table name




Method Detail
addColumn
public Column addColumn(Attributes attrib)(Code)
A utility function to create a new column from attrib and add it to this table.
Parameters:
  attrib - xml attributes for the column to add the added column



addColumn
public void addColumn(Column col)(Code)
Adds a new column to the column list and set the parent table of the column to the current table
Parameters:
  col - the column to add



addForeignKey
public ForeignKey addForeignKey(Attributes attrib)(Code)
A utility function to create a new foreign key from attrib and add it to this table.
Parameters:
  attrib - the xml attributes the created ForeignKey



addForeignKey
public void addForeignKey(ForeignKey fk)(Code)
Adds a new FK to the FK list and set the parent table of the column to the current table
Parameters:
  fk - A foreign key



addIdMethodParameter
public IdMethodParameter addIdMethodParameter(Attributes attrib)(Code)
A utility function to create a new id method parameter from attrib and add it to this table.



addIdMethodParameter
public void addIdMethodParameter(IdMethodParameter imp)(Code)
Adds a new ID method parameter to the list and sets the parent table of the column associated with the supplied parameter to this table.
Parameters:
  imp - The column to add as an ID method parameter.



addIndex
public void addIndex(Index index)(Code)
Adds a new index to the index list and set the parent table of the column to the current table



addIndex
public Index addIndex(Attributes attrib)(Code)
A utility function to create a new index from attrib and add it to this table.



addOption
public void addOption(String key, String value)(Code)
Add an XML Specified option key/value pair to this element's option set.
Parameters:
  key - the key of the option.
Parameters:
  value - the value of the option.



addReferrer
public void addReferrer(ForeignKey fk)(Code)
Adds the foreign key from another table that refers to this table.
Parameters:
  fk - A foreign key refering to this table



addUnique
public void addUnique(Unique unique)(Code)
Adds a new Unique to the Unique list and set the parent table of the column to the current table



addUnique
public Unique addUnique(Attributes attrib)(Code)
A utility function to create a new Unique from attrib and add it to this table.
Parameters:
  attrib - the xml attributes



containsColumn
public boolean containsColumn(Column col)(Code)
Returns true if the table contains a specified column
Parameters:
  col - the column true if the table contains the column



containsColumn
public boolean containsColumn(String name)(Code)
Returns true if the table contains a specified column
Parameters:
  name - name of the column true if the table contains the column



doFinalInitialization
public void doFinalInitialization()(Code)

A hook for the SAX XML parser to call when this table has been fully loaded from the XML, and all nested elements have been processed.

Performs heavy indexing and naming of elements which weren't provided with a name.




getAlias
public String getAlias()(Code)
JavaName of om object this entry references. value of external.



getBaseClass
public String getBaseClass()(Code)
Gets the value of base class for classes produced from this table. The base class for classes produced from this table.



getBasePeer
public String getBasePeer()(Code)
Get the value of basePeer. value of basePeer.



getChildrenColumn
public Column getChildrenColumn()(Code)
Gets the column that subclasses of the class representing this table can be produced from.



getChildrenNames
public List getChildrenNames()(Code)
Get the objects that can be created from this table.



getColumn
public Column getColumn(String name)(Code)
Returns a specified column.
Parameters:
  name - name of the column Return a Column object or null if it does not exist.



getColumnByJavaName
public Column getColumnByJavaName(String javaName)(Code)
Returns a specified column.
Parameters:
  javaName - java name of the column Return a Column object or null if it does not exist.



getColumns
public List getColumns()(Code)
Returns a List containing all the columns in the table a List containing all the columns



getContainsForeignPK
public boolean getContainsForeignPK()(Code)
Determine if this table contains a foreign PK



getDatabase
public Database getDatabase()(Code)
Get the parent of the table the parant database



getDescription
public String getDescription()(Code)
Get the description for the Table



getForeignKey
public ForeignKey getForeignKey(String col)(Code)
Return the first foreign key that includes col in it's list of local columns. Eg. Foreign key (a,b,c) refrences tbl(x,y,z) will be returned of col is either a,b or c.
Parameters:
  col - column name included in the key Return a Column object or null if it does not exist.



getForeignKeys
public List getForeignKeys()(Code)
Returns a List containing all the FKs in the table a List containing all the FKs



getForeignTableNames
public List getForeignTableNames()(Code)
A list of tables referenced by foreign keys in this table A list of tables



getIdMethod
public String getIdMethod()(Code)
Get the method for generating pk's



getIdMethodParameters
public List getIdMethodParameters()(Code)
Returns a Collection of parameters relevant for the chosen id generation method.



getIndices
public List getIndices()(Code)
Returns a List containing all the indices in the table A List containing all the indices



getInterface
public String getInterface()(Code)
Interface which objects for this table will implement value of interface.



getJavaName
public String getJavaName()(Code)
Get name to use in Java sources



getName
public String getName()(Code)
Get the name of the Table



getNumColumns
public int getNumColumns()(Code)
Utility method to get the number of columns in this table



getOption
public String getOption(String key)(Code)
Get the value that was associated with this key in an XML option element.
Parameters:
  key - the key of the option. The value for the key or a null.



getOptions
public Map getOptions()(Code)
Gets the full ordered hashtable array of items specified by XML option statements under this element.

Note, this is not thread save but since it's only used for generation which is single threaded, there should be minimum danger using this in Velocity. An Map of all options. Will not be null but may be empty.




getPackage
public String getPackage()(Code)
Get the value of package. value of package.



getPrimaryKey
public List getPrimaryKey()(Code)
Returns the collection of Columns which make up the single primary key for this table. A list of the primary key parts.



getReferrers
public List getReferrers()(Code)
Get list of references to this table. A list of references to this table



getSequenceName
public String getSequenceName()(Code)
A name to use for creating a sequence if one is not specified. name of the sequence



getUnices
public List getUnices()(Code)
Returns a List containing all the UKs in the table A List containing all the UKs



hasPrimaryKey
public boolean hasPrimaryKey()(Code)
Determine whether this table has a primary key. Whether this table has any primary key parts.



isAbstract
public boolean isAbstract()(Code)
When a table is abstract, it marks the business object class that is generated as being abstract. If you have a table called "FOO", then the Foo BO will be public abstract class Foo This helps support class hierarchies value of abstractValue.



isAlias
public boolean isAlias()(Code)
Is this table specified in the schema or is there just a foreign key reference to it. value of external.



isForReferenceOnly
public boolean isForReferenceOnly()(Code)
Flag to determine if code/sql gets created for this table. Table will be skipped, if return true. value of forReferenceOnly.



isSkipSql
public boolean isSkipSql()(Code)
Skip generating sql for this table (in the event it should not be created from scratch). value of skipSql.



loadFromXML
public void loadFromXML(Attributes attrib, String defaultIdMethod)(Code)
Load the table object from an xml tag.
Parameters:
  attrib - xml attributes
Parameters:
  defaultIdMethod - defined at db level



printPrimaryKey
public String printPrimaryKey()(Code)
Returns all parts of the primary key, separated by commas. A CSV list of primary key parts.



requiresTransactionInPostgres
public boolean requiresTransactionInPostgres()(Code)
Return true if the column requires a transaction in Postgres



setAbstract
public void setAbstract(boolean v)(Code)
When a table is abstract, it marks the business object class that is generated as being abstract. If you have a table called "FOO", then the Foo BO will be public abstract class Foo This helps support class hierarchies
Parameters:
  v - Value to assign to abstractValue.



setAlias
public void setAlias(String v)(Code)
Set whether this table specified in the schema or is there just a foreign key reference to it.
Parameters:
  v - Value to assign to alias.



setBaseClass
public void setBaseClass(String v)(Code)
Set the value of baseClass.
Parameters:
  v - Value to assign to baseClass.



setBasePeer
public void setBasePeer(String v)(Code)
Set the value of basePeer.
Parameters:
  v - Value to assign to basePeer.



setContainsForeignPK
public void setContainsForeignPK(boolean b)(Code)
Set whether this table contains a foreign PK
Parameters:
  b -



setCorrectGetters
public void setCorrectGetters(Boolean value)(Code)
Force all columns to set the correctGetters property.
Parameters:
  value - The new value of the correctGetters property.
since:
   3.2



setDatabase
public void setDatabase(Database parent)(Code)
Set the parent of the table
Parameters:
  parent - the parant database



setDescription
public void setDescription(String newDescription)(Code)
Set the description for the Table
Parameters:
  newDescription - description for the Table



setForReferenceOnly
public void setForReferenceOnly(boolean v)(Code)
Flag to determine if code/sql gets created for this table. Table will be skipped, if set to true.
Parameters:
  v - Value to assign to forReferenceOnly.



setIdMethod
public void setIdMethod(String idMethod)(Code)
Set the method for generating pk's



setInterface
public void setInterface(String v)(Code)
Interface which objects for this table will implement
Parameters:
  v - Value to assign to interface.



setJavaName
public void setJavaName(String javaName)(Code)
Set name to use in Java sources



setName
public void setName(String newName)(Code)
Set the name of the Table



setPackage
public void setPackage(String v)(Code)
Set the value of package.
Parameters:
  v - Value to assign to package.



setSkipSql
public void setSkipSql(boolean v)(Code)
Set whether this table should have its creation sql generated.
Parameters:
  v - Value to assign to skipSql.



toString
public String toString()(Code)
Returns a XML representation of this table. XML representation of this table



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.