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

ColumnMap
public class ColumnMap implements java.io.Serializable(Code)
ColumnMap is used to model a column of a table in a database.

Note that this information should be set via the MapBuilder class and not changed by applications. The set methods are only public because this class needs them.
author:
   John D. McNally
author:
   Greg Monroe
version:
   $Id: ColumnMap.java 473821 2006-11-11 22:37:25Z tv $



Constructor Summary
public  ColumnMap(String name, TableMap containingTable)
     Constructor.

Method Summary
public  voidaddInheritanceMap(InheritanceMap map)
     Add an associated inheritance mapping.
public  StringgetColumnName()
     Get the name of a column.
public  StringgetDefault()
     A string representing the default value defined for this column.
public  StringgetDescription()
     Returns the column description info.
public  StringgetFullyQualifiedName()
     Get the table name + column name.
public  StringgetInheritance()
     Gets the inheritance type used.
public  InheritanceMapgetInheritanceMap(String key)
     Get the inheritance map with the specified key.
Parameters:
  key - the key of the inheritance map.
public  InheritanceMap[]getInheritanceMaps()
    
public  StringgetInputValidator()
     Returns the input validator class name.
public  StringgetJavaName()
     Gets the Java Name for this column as defined in XML or created by generator code.
public  StringgetJavaNamingMethod()
     Returns the Java naming method for this column.
public  StringgetJavaType()
     Returns the java type of this column.
public  intgetPosition()
     Returns the position (one based) of this column in the table.
public  StringgetRelatedColumnName()
     Get the column name that this column is related to.
public  StringgetRelatedName()
     Get the table.column that this column is related to.
public  StringgetRelatedTableName()
     Get the table name that this column is related to.
public  intgetScale()
     Gets the scale set for this column (if any) as set in the XML database definition.
public  intgetSize()
     The "precision" value from the XML size="<precision>[,<scale>]" attribute.
public  TableMapgetTable()
     Returns the map for the table this column belongs to.
public  StringgetTableName()
     Get the name of the table this column is in.
public  StringgetTorqueType()
     Get the name of the Torque type of this column.
public  ObjectgetType()
     Get the type of this column.
public  booleanisAutoIncrement()
     Returns whether this column is an autoincrement column.
public  booleanisForeignKey()
    
public  booleanisNotNull()
    
public  booleanisPk()
     Returns whether this column is a primary key.
public  booleanisPrimaryKey()
    
public  booleanisProtected()
     Returns whether getters and setters are generated with the access modifier "protected" rather than "public".
public  booleanisUseInheritance()
     Returns whether this column uses inheritance subclasses.
public  booleanisUsePrimitive()
     Returns whether this colum uses primitive values rather than objects.
protected  StringnormalizeName(String name)
     Makes sure that the column names don't include table prefixes.
public  voidsetAutoIncrement(boolean autoIncrement)
     Sets whether this column is an autoincrement column.
public  voidsetDefault(String defaultValue)
     Sets the default value for this column.
public  voidsetDescription(String description)
     Sets the description for this column.
public  voidsetForeignKey(String fullyQualifiedName)
     Set the foreign key for this column.
public  voidsetForeignKey(String tableName, String columnName)
     Set the foreign key for this column.
public  voidsetInheritance(String inheritanceType)
     Sets the inheritance type.
public  voidsetInputValidator(String inputValidator)
     Sets the input validator class name.
public  voidsetJavaName(String name)
     Sets the Java Name for this column.
public  voidsetJavaNamingMethod(String javaNamingMethod)
     Sets the java naming method for this column.
public  voidsetJavaType(String javaType)
     Sets the java type of this column.
public  voidsetNotNull(boolean nn)
     Set if this column may be null.
public  voidsetPk(boolean pk)
     Sets whether this column is a primary key.
public  voidsetPosition(int position)
     Sets the position (one based) of this column in the table.
public  voidsetPrimaryKey(boolean pk)
     Set if this column is a primary key or not.
public  voidsetProtected(boolean isProtected)
     Sets whether getters and setters should be generated with the access modifier "protected" rather than "public".
public  voidsetScale(int scale)
    
public  voidsetSize(int size)
     Set the size of this column.
public  voidsetTorqueType(String torqueType)
     Set the Torque type of this column.
public  voidsetType(Object type)
     Set the type of this column.
public  voidsetUseInheritance(boolean useInheritance)
     Sets whether this column uses inheritance subclasses.
public  voidsetUsePrimitive(boolean usePrimitive)
     Sets whether this colum uses primitive values rather than objects.


Constructor Detail
ColumnMap
public ColumnMap(String name, TableMap containingTable)(Code)
Constructor.
Parameters:
  name - The name of the column.
Parameters:
  containingTable - TableMap of the table this column is in.




Method Detail
addInheritanceMap
public void addInheritanceMap(InheritanceMap map)(Code)
Add an associated inheritance mapping.
Parameters:
  map - The inheritanceMap to associate with this column.



getColumnName
public String getColumnName()(Code)
Get the name of a column. A String with the column name.



getDefault
public String getDefault()(Code)
A string representing the default value defined for this column. The default value of this column, if any.



getDescription
public String getDescription()(Code)
Returns the column description info. the description, if any.



getFullyQualifiedName
public String getFullyQualifiedName()(Code)
Get the table name + column name. A String with the full column name.



getInheritance
public String getInheritance()(Code)
Gets the inheritance type used. the inheritance type used.



getInheritanceMap
public InheritanceMap getInheritanceMap(String key)(Code)
Get the inheritance map with the specified key.
Parameters:
  key - the key of the inheritance map. the inheritance map with the specified key, or null if noinheritance map with the specified key exists in this column.



getInheritanceMaps
public InheritanceMap[] getInheritanceMaps()(Code)
Get the inheritance information associated with this column, Returns an array of associated inheritanceMap.The array is in XML order.



getInputValidator
public String getInputValidator()(Code)
Returns the input validator class name. (This property is in the DTD, but currently not used by Torque?) Returns the inputValidator.



getJavaName
public String getJavaName()(Code)
Gets the Java Name for this column as defined in XML or created by generator code. the Java Name.



getJavaNamingMethod
public String getJavaNamingMethod()(Code)
Returns the Java naming method for this column. the javaNamingMethod for this column.



getJavaType
public String getJavaType()(Code)
Returns the java type of this column. the javaType.



getPosition
public int getPosition()(Code)
Returns the position (one based) of this column in the table. XML order is preserved. The position of this column, one-based.



getRelatedColumnName
public String getRelatedColumnName()(Code)
Get the column name that this column is related to. A String with the name for the related column.



getRelatedName
public String getRelatedName()(Code)
Get the table.column that this column is related to. A String with the full name for the related column.



getRelatedTableName
public String getRelatedTableName()(Code)
Get the table name that this column is related to. A String with the name for the related table.



getScale
public int getScale()(Code)
Gets the scale set for this column (if any) as set in the XML database definition. E.g., the value of the scale attribute or the scale portion of a size="P,S" attribute. (Note: size="P,S" format is being deprecated!). Returns the scale.



getSize
public int getSize()(Code)
The "precision" value from the XML size="<precision>[,<scale>]" attribute. Where [,<scale>] is optional. If the size attribute has not been set in the XML, it will return 0.

Note that the size="P,S" format should be replaced with size="P" scale="S". An int specifying the size.




getTable
public TableMap getTable()(Code)
Returns the map for the table this column belongs to. the table map for this column.



getTableName
public String getTableName()(Code)
Get the name of the table this column is in. A String with the table name.



getTorqueType
public String getTorqueType()(Code)
Get the name of the Torque type of this column. The name of the Torque type of this column.



getType
public Object getType()(Code)
Get the type of this column. Note that if usePrimitive is true, this may need to be converted. An Object specifying the type.



isAutoIncrement
public boolean isAutoIncrement()(Code)
Returns whether this column is an autoincrement column. true if this column is an autoIncrement column, false otherwise.



isForeignKey
public boolean isForeignKey()(Code)
Is this column a foreign key? True if column is a foreign key.



isNotNull
public boolean isNotNull()(Code)
Is null value allowed ? True if column may be null.



isPk
public boolean isPk()(Code)
Returns whether this column is a primary key. whether this column is a primary key.



isPrimaryKey
public boolean isPrimaryKey()(Code)
Is this column a primary key? True if column is a primary key.



isProtected
public boolean isProtected()(Code)
Returns whether getters and setters are generated with the access modifier "protected" rather than "public". whether the accessors should be protected rather than public.



isUseInheritance
public boolean isUseInheritance()(Code)
Returns whether this column uses inheritance subclasses. true if inheritance subclasses are used, false otherwise.



isUsePrimitive
public boolean isUsePrimitive()(Code)
Returns whether this colum uses primitive values rather than objects. true if this colum uses primitive values, false if it usesobjects.



normalizeName
protected String normalizeName(String name)(Code)
Makes sure that the column names don't include table prefixes. E.g., SCARAB_PROJECT.PROJECT_ID should be PROJECT_ID.
Parameters:
  name - The name to check The corrected name if needed or the same name if not.



setAutoIncrement
public void setAutoIncrement(boolean autoIncrement)(Code)
Sets whether this column is an autoincrement column.
Parameters:
  autoIncrement - whether this colimn is an autoincrement column.



setDefault
public void setDefault(String defaultValue)(Code)
Sets the default value for this column.
Parameters:
  defaultValue - The defaultValue to set.



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



setForeignKey
public void setForeignKey(String fullyQualifiedName)(Code)
Set the foreign key for this column.
Parameters:
  fullyQualifiedName - The name of the table.column that isforeign.



setForeignKey
public void setForeignKey(String tableName, String columnName)(Code)
Set the foreign key for this column.
Parameters:
  tableName - The name of the table that is foreign.
Parameters:
  columnName - The name of the column that is foreign.



setInheritance
public void setInheritance(String inheritanceType)(Code)
Sets the inheritance type.
Parameters:
  inheritanceType - The inheritance type to set.



setInputValidator
public void setInputValidator(String inputValidator)(Code)
Sets the input validator class name.
Parameters:
  inputValidator - The inputValidator to set.



setJavaName
public void setJavaName(String name)(Code)
Sets the Java Name for this column.
Parameters:
  name - the Java Name.



setJavaNamingMethod
public void setJavaNamingMethod(String javaNamingMethod)(Code)
Sets the java naming method for this column.
Parameters:
  javaNamingMethod - The javaNamingMethod to set.



setJavaType
public void setJavaType(String javaType)(Code)
Sets the java type of this column.
Parameters:
  javaType - The javaType to set.



setNotNull
public void setNotNull(boolean nn)(Code)
Set if this column may be null.
Parameters:
  nn - True if column may be null.



setPk
public void setPk(boolean pk)(Code)
Sets whether this column is a primary key.
Parameters:
  pk - whether this column is a primary key.



setPosition
public void setPosition(int position)(Code)
Sets the position (one based) of this column in the table.
Parameters:
  position - The position to set.



setPrimaryKey
public void setPrimaryKey(boolean pk)(Code)
Set if this column is a primary key or not.
Parameters:
  pk - True if column is a primary key.



setProtected
public void setProtected(boolean isProtected)(Code)
Sets whether getters and setters should be generated with the access modifier "protected" rather than "public".
Parameters:
  isProtected - whether getters and setters for this columnare protected.



setScale
public void setScale(int scale)(Code)

Parameters:
  scale - The scale to set.



setSize
public void setSize(int size)(Code)
Set the size of this column.
Parameters:
  size - An int specifying the size.



setTorqueType
public void setTorqueType(String torqueType)(Code)
Set the Torque type of this column.
Parameters:
  torqueType - the Torque type of the column.



setType
public void setType(Object type)(Code)
Set the type of this column.
Parameters:
  type - An Object specifying the type.



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



setUsePrimitive
public void setUsePrimitive(boolean usePrimitive)(Code)
Sets whether this colum uses primitive values rather than objects.
Parameters:
  usePrimitive - whether primitive objects are usedrather than objects.



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.