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


java.lang.Object
   org.apache.torque.map.TableMap

TableMap
public class TableMap implements IDMethod,java.io.Serializable(Code)
TableMap is used to model a table in a database.
author:
   John D. McNally
author:
   Daniel Rall
author:
   Greg Monroe
version:
   $Id: TableMap.java 473821 2006-11-11 22:37:25Z tv $


Field Summary
final protected static  String[]VALID_ID_METHODS
     The list of valid ID generation methods.

Constructor Summary
public  TableMap()
     Required by proxy.
public  TableMap(String tableName, int numberOfColumns, DatabaseMap containingDB)
     Constructor.
public  TableMap(String tableName, DatabaseMap containingDB)
     Constructor.
public  TableMap(String tableName, String prefix, DatabaseMap containingDB)
     Constructor.

Method Summary
public  voidaddColumn(ColumnMap cmap)
     Add a pre-created column to this table.
public  voidaddColumn(String columnName, Object type)
     Add a column to this table of a certain type.
public  voidaddColumn(String columnName, Object type, int size, int scale)
     Add a column to this table of a certain type, size, and scale.
public  voidaddColumn(String columnName, Object type, int size)
     Add a column to this table of a certain type and size.
public  voidaddForeignKey(String columnName, Object type, String fkTable, String fkColumn)
     Add a foreign key column to the table.
public  voidaddForeignKey(String columnName, Object type, String fkTable, String fkColumn, int size)
     Add a foreign key column to the table.
public  voidaddForeignPrimaryKey(String columnName, Object type, String fkTable, String fkColumn)
     Add a foreign primary key column to the table.
public  voidaddForeignPrimaryKey(String columnName, Object type, String fkTable, String fkColumn, int size)
     Add a foreign primary key column to the table.
public  voidaddPrimaryKey(String columnName, Object type)
     Add a primary key column to this Table.
public  voidaddPrimaryKey(String columnName, Object type, int size)
     Add a primary key column to this Table.
public  booleancontainsColumn(ColumnMap column)
     Does this table contain the specified column?
Parameters:
  column - A ColumnMap.
public  booleancontainsColumn(String name)
     Does this table contain the specified column?
Parameters:
  name - A String with the name of the column.
public  booleancontainsObjectColumn()
     Returns true if this tableMap contains a column with object data.
public  ColumnMapgetColumn(String name)
     Get a ColumnMap for the named table.
Parameters:
  name - A String with the name of the table.
public  ColumnMap[]getColumns()
     Get a ColumnMap[] of the columns in this table.
public  DatabaseMapgetDatabaseMap()
     Get the DatabaseMap containing this TableMap.
public  DatabaseMapgetDbMap()
     Returns the database map for this table.
public  StringgetDescription()
     Returns the table description info.
public  IdGeneratorgetIdGenerator()
     Get the value of idGenerator.
public  StringgetJavaName()
     Get the Java name of the table as defined in XML.
public  ClassgetManagerClass()
     Returns the manager class for this table.
public  StringgetName()
     Get the name of the Table.
public  ClassgetOMClass()
     Returns the OM class for this table.
public  ClassgetPeerClass()
     Returns the Peer Class for this table.
public  StringgetPrefix()
     Get table prefix name.
public  StringgetPrimaryKeyMethod()
     Get the method used to generate primary keys for this table.
public  ObjectgetPrimaryKeyMethodInfo()
    
public  booleanisUseInheritance()
     Returns whether this table uses inheritance.
public  booleanisUseManager()
     Returns whether managers are used for this table.
final public  StringremoveUnderScores(String data)
     Removes the PREFIX, removes the underscores and makes first letter caps. SCARAB_FOO_BAR becomes FooBar.
Parameters:
  data - A String.
public  voidsetDescription(String description)
     Sets the table description.
public  voidsetJavaName(String value)
     Set the Java name of the table as defined by generator/XML.
public  voidsetManagerClass(Class managerClass)
     Sets the manager class for this table.
public  voidsetOMClass(Class omClass)
     Sets the OM root class for this table.
public  voidsetPeerClass(Class peerClass)
     Sets the Peer class for this table.
public  voidsetPrefix(String prefix)
     Set table prefix name.
public  voidsetPrimaryKeyMethod(String method)
     Sets the method used to generate a key for this table.
public  voidsetPrimaryKeyMethodInfo(Object pkInfo)
    
public  voidsetUseInheritance(boolean useInheritance)
     Sets whether this table uses inheritance.
public  voidsetUseManager(boolean useManager)
     Sets whether managers are used for this table.

Field Detail
VALID_ID_METHODS
final protected static String[] VALID_ID_METHODS(Code)
The list of valid ID generation methods.




Constructor Detail
TableMap
public TableMap()(Code)
Required by proxy. Not used.



TableMap
public TableMap(String tableName, int numberOfColumns, DatabaseMap containingDB)(Code)
Constructor.
Parameters:
  tableName - The name of the table.
Parameters:
  numberOfColumns - The number of columns in the table.
Parameters:
  containingDB - A DatabaseMap that this table belongs to.



TableMap
public TableMap(String tableName, DatabaseMap containingDB)(Code)
Constructor.
Parameters:
  tableName - The name of the table.
Parameters:
  containingDB - A DatabaseMap that this table belongs to.



TableMap
public TableMap(String tableName, String prefix, DatabaseMap containingDB)(Code)
Constructor.
Parameters:
  tableName - The name of the table.
Parameters:
  prefix - The prefix for the table name (ie: SCARAB forSCARAB_PROJECT).
Parameters:
  containingDB - A DatabaseMap that this table belongs to.




Method Detail
addColumn
public void addColumn(ColumnMap cmap)(Code)
Add a pre-created column to this table. It will replace any existing column.
Parameters:
  cmap - A ColumnMap.



addColumn
public void addColumn(String columnName, Object type)(Code)
Add a column to this table of a certain type.
Parameters:
  columnName - A String with the column name.
Parameters:
  type - An Object specifying the type.



addColumn
public void addColumn(String columnName, Object type, int size, int scale)(Code)
Add a column to this table of a certain type, size, and scale.
Parameters:
  columnName - A String with the column name.
Parameters:
  type - An Object specifying the type.
Parameters:
  size - An int specifying the size.
Parameters:
  scale - An int specifying the scale.



addColumn
public void addColumn(String columnName, Object type, int size)(Code)
Add a column to this table of a certain type and size.
Parameters:
  columnName - A String with the column name.
Parameters:
  type - An Object specifying the type.
Parameters:
  size - An int specifying the size.



addForeignKey
public void addForeignKey(String columnName, Object type, String fkTable, String fkColumn)(Code)
Add a foreign key column to the table.
Parameters:
  columnName - A String with the column name.
Parameters:
  type - An Object specifying the type.
Parameters:
  fkTable - A String with the foreign key table name.
Parameters:
  fkColumn - A String with the foreign key column name.



addForeignKey
public void addForeignKey(String columnName, Object type, String fkTable, String fkColumn, int size)(Code)
Add a foreign key column to the table.
Parameters:
  columnName - A String with the column name.
Parameters:
  type - An Object specifying the type.
Parameters:
  fkTable - A String with the foreign key table name.
Parameters:
  fkColumn - A String with the foreign key column name.
Parameters:
  size - An int specifying the size.



addForeignPrimaryKey
public void addForeignPrimaryKey(String columnName, Object type, String fkTable, String fkColumn)(Code)
Add a foreign primary key column to the table.
Parameters:
  columnName - A String with the column name.
Parameters:
  type - An Object specifying the type.
Parameters:
  fkTable - A String with the foreign key table name.
Parameters:
  fkColumn - A String with the foreign key column name.



addForeignPrimaryKey
public void addForeignPrimaryKey(String columnName, Object type, String fkTable, String fkColumn, int size)(Code)
Add a foreign primary key column to the table.
Parameters:
  columnName - A String with the column name.
Parameters:
  type - An Object specifying the type.
Parameters:
  fkTable - A String with the foreign key table name.
Parameters:
  fkColumn - A String with the foreign key column name.
Parameters:
  size - An int specifying the size.



addPrimaryKey
public void addPrimaryKey(String columnName, Object type)(Code)
Add a primary key column to this Table.
Parameters:
  columnName - A String with the column name.
Parameters:
  type - An Object specifying the type.



addPrimaryKey
public void addPrimaryKey(String columnName, Object type, int size)(Code)
Add a primary key column to this Table.
Parameters:
  columnName - A String with the column name.
Parameters:
  type - An Object specifying the type.
Parameters:
  size - An int specifying the size.



containsColumn
public boolean containsColumn(ColumnMap column)(Code)
Does this table contain the specified column?
Parameters:
  column - A ColumnMap. True if the table contains the column.



containsColumn
public boolean containsColumn(String name)(Code)
Does this table contain the specified column?
Parameters:
  name - A String with the name of the column. True if the table contains the column.



containsObjectColumn
public boolean containsObjectColumn()(Code)
Returns true if this tableMap contains a column with object data. If the type of the column is not a string, a number or a date, it is assumed that it is object data. True if map contains a column with object data.



getColumn
public ColumnMap getColumn(String name)(Code)
Get a ColumnMap for the named table.
Parameters:
  name - A String with the name of the table. A ColumnMap.



getColumns
public ColumnMap[] getColumns()(Code)
Get a ColumnMap[] of the columns in this table. A ColumnMap[].



getDatabaseMap
public DatabaseMap getDatabaseMap()(Code)
Get the DatabaseMap containing this TableMap. A DatabaseMap.



getDbMap
public DatabaseMap getDbMap()(Code)
Returns the database map for this table. the database map for this table.



getDescription
public String getDescription()(Code)
Returns the table description info. Returns the description.



getIdGenerator
public IdGenerator getIdGenerator()(Code)
Get the value of idGenerator. value of idGenerator.



getJavaName
public String getJavaName()(Code)
Get the Java name of the table as defined in XML. A String with the Java name of the table.



getManagerClass
public Class getManagerClass()(Code)
Returns the manager class for this table. the managerClass.



getName
public String getName()(Code)
Get the name of the Table. A String with the name of the table.



getOMClass
public Class getOMClass()(Code)
Returns the OM class for this table. the OM class.



getPeerClass
public Class getPeerClass()(Code)
Returns the Peer Class for this table. The peerClass for this table.



getPrefix
public String getPrefix()(Code)
Get table prefix name. A String with the prefix.



getPrimaryKeyMethod
public String getPrimaryKeyMethod()(Code)
Get the method used to generate primary keys for this table. A String with the method.



getPrimaryKeyMethodInfo
public Object getPrimaryKeyMethodInfo()(Code)
Get the information used to generate a primary key An Object.



isUseInheritance
public boolean isUseInheritance()(Code)
Returns whether this table uses inheritance. whether inheritance is used.



isUseManager
public boolean isUseManager()(Code)
Returns whether managers are used for this table. whether managers are used for this table.



removeUnderScores
final public String removeUnderScores(String data)(Code)
Removes the PREFIX, removes the underscores and makes first letter caps. SCARAB_FOO_BAR becomes FooBar.
Parameters:
  data - A String. A String with data processed.



setDescription
public void setDescription(String description)(Code)
Sets the table description.
Parameters:
  description - The description to set.



setJavaName
public void setJavaName(String value)(Code)
Set the Java name of the table as defined by generator/XML.
Parameters:
  value - A String with the Java name of the table.



setManagerClass
public void setManagerClass(Class managerClass)(Code)
Sets the manager class for this table.
Parameters:
  managerClass - the manager class for this table.



setOMClass
public void setOMClass(Class omClass)(Code)
Sets the OM root class for this table.
Parameters:
  omClass - The OM root class for this table.



setPeerClass
public void setPeerClass(Class peerClass)(Code)
Sets the Peer class for this table.
Parameters:
  peerClass - The peerClass to set.



setPrefix
public void setPrefix(String prefix)(Code)
Set table prefix name.
Parameters:
  prefix - The prefix for the table name (ie: SCARAB forSCARAB_PROJECT).



setPrimaryKeyMethod
public void setPrimaryKeyMethod(String method)(Code)
Sets the method used to generate a key for this table. Valid values are as specified in the org.apache.torque.adapter.IDMethod interface.
Parameters:
  method - The ID generation method type name.



setPrimaryKeyMethodInfo
public void setPrimaryKeyMethodInfo(Object pkInfo)(Code)
Sets the pk information needed to generate a key
Parameters:
  pkInfo - information needed to generate a key



setUseInheritance
public void setUseInheritance(boolean useInheritance)(Code)
Sets whether this table uses inheritance.
Parameters:
  useInheritance - whether this table uses inheritance.



setUseManager
public void setUseManager(boolean useManager)(Code)
Sets whether managers are used for this table.
Parameters:
  useManager - whether managers are used for 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.