Java Doc for MappingDefaults.java in  » Database-ORM » openjpa » org » apache » openjpa » jdbc » meta » 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 » openjpa » org.apache.openjpa.jdbc.meta 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.openjpa.jdbc.meta.MappingDefaults

All known Subclasses:   org.apache.openjpa.jdbc.meta.NoneMappingDefaults,  org.apache.openjpa.jdbc.meta.MappingDefaultsImpl,
MappingDefaults
public interface MappingDefaults (Code)
Generates default names for tables, columns, indexes, constraints, etc.
author:
   Abe White




Method Summary
public  booleandefaultMissingInfo()
     Whether to fill in missing mapping information at runtime with the default values supplied by this plugin.
public  ObjectgetDiscriminatorValue(Discriminator disc, boolean adapt)
     Return the default discriminator value for the given instance.
public  ForeignKeygetForeignKey(ValueMapping vm, String name, Table local, Table foreign, boolean inverse)
     Return a default foreign key for the join from this value to its related type, or null for a logical foreign key only.
public  IndexgetIndex(ValueMapping vm, String name, Table table, Column[] cols)
     Return a default index for the value, or null if the value columns should not be indexed by default.
public  IndexgetIndex(Version vers, Table table, Column[] cols)
     Return a default index for the version, or null if the version columns should not be indexed by default.
public  IndexgetIndex(Discriminator disc, Table table, Column[] cols)
     Return a default index for the discriminator, or null if the discriminator columns should not be indexed by default.
public  ForeignKeygetJoinForeignKey(ClassMapping cls, Table local, Table foreign)
     Return a default foreign key for the join from this class' table to its superclass' table, or null for a logical foreign key only.
public  ForeignKeygetJoinForeignKey(FieldMapping fm, Table local, Table foreign)
     Return a default foreign key for the join from this field's table to its defining class' table, or null for a logical foreign key only.
public  IndexgetJoinIndex(FieldMapping fm, Table table, Column[] cols)
     Return a default index for the join, or null if the join columns should not be indexed by default.
public  UniquegetJoinUnique(FieldMapping fm, Table table, Column[] cols)
     Return a default constraint for the join, or null if the join columns should not be constrained by default.
public  StringgetPrimaryKeyName(ClassMapping cm, Table table)
     Return the name of the primary key for the table of the given class, or null for database default.
public  ObjectgetStrategy(ClassMapping cls, boolean adapt)
     Default mapping strategy when there is no explicit strategy and no hierarchy strategy given.
public  ObjectgetStrategy(Version vers, boolean adapt)
     Default version mapping strategy when there is no explicit strategy.
public  ObjectgetStrategy(Discriminator disc, boolean adapt)
     Default discriminator mapping strategy when there is no explicit strategy.
public  ObjectgetStrategy(ValueMapping vm, Class type, boolean adapt)
     Custom handler or strategy for the given field, or null if none has been registered.
public  StringgetTableName(ClassMapping cls, Schema defaultSchema)
     Return the default table name for the given class.
public  StringgetTableName(FieldMapping fm, Schema defaultSchema)
     Return the default secondary table name for the given field.
public  UniquegetUnique(ValueMapping vm, String name, Table table, Column[] cols)
     Return a default constraint for the value, or null if the value columns should not be constrained by default.
public  voidinstallPrimaryKey(FieldMapping fm, Table table)
     If desired, install a primary key on the given secondary table.
public  voidpopulateColumns(Version vers, Table table, Column[] cols)
     Fill in default information for the given version columns.
public  voidpopulateColumns(Discriminator disc, Table table, Column[] cols)
     Fill in default information for the given discriminator columns.
public  voidpopulateColumns(ValueMapping vm, String name, Table table, Column[] cols)
     Fill in default information for the given value columns.
public  voidpopulateDataStoreIdColumns(ClassMapping cls, Table table, Column[] cols)
     Fill in default information for the given datastore identity columns.
public  voidpopulateForeignKeyColumn(ValueMapping vm, String name, Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols)
     Fill in default information for the given column used to join a value to its related type.
public  voidpopulateJoinColumn(ClassMapping cm, Table local, Table foreign, Column col, Object target, int pos, int cols)
     Fill in default information for the given column used to join a class to its superclass table.
public  voidpopulateJoinColumn(FieldMapping fm, Table local, Table foreign, Column col, Object target, int pos, int cols)
     Fill in default information for the given column used to join a field to its defining class' table.
public  booleanpopulateNullIndicatorColumns(ValueMapping vm, String name, Table table, Column[] cols)
     Fill in default information for the given null indicator columns.
public  booleanpopulateOrderColumns(FieldMapping fm, Table table, Column[] cols)
     Fill in default information for the given order columns.
public  booleanuseClassCriteria()
     The default for whether relations use the related object's expected class as part of the join criteria.



Method Detail
defaultMissingInfo
public boolean defaultMissingInfo()(Code)
Whether to fill in missing mapping information at runtime with the default values supplied by this plugin. A value of false means that all mapping information must be present at runtime.



getDiscriminatorValue
public Object getDiscriminatorValue(Discriminator disc, boolean adapt)(Code)
Return the default discriminator value for the given instance.



getForeignKey
public ForeignKey getForeignKey(ValueMapping vm, String name, Table local, Table foreign, boolean inverse)(Code)
Return a default foreign key for the join from this value to its related type, or null for a logical foreign key only. Do not add columns to the key or add the key to the table; only fill in its information such as name, delete action, etc.
Parameters:
  name - base name for value, as decided by mapping
Parameters:
  inverse - whether this is an inverse key



getIndex
public Index getIndex(ValueMapping vm, String name, Table table, Column[] cols)(Code)
Return a default index for the value, or null if the value columns should not be indexed by default. Do not add columns to the index or add the index to the table; only fill in its information such as name, uniqueness, etc.
Parameters:
  name - base name for value, as decided by mapping



getIndex
public Index getIndex(Version vers, Table table, Column[] cols)(Code)
Return a default index for the version, or null if the version columns should not be indexed by default. Do not add columns to the index or add the index to the table; only fill in its information such as name, uniqueness, etc.



getIndex
public Index getIndex(Discriminator disc, Table table, Column[] cols)(Code)
Return a default index for the discriminator, or null if the discriminator columns should not be indexed by default. Do not add columns to the index or add the index to the table; only fill in its information such as name, uniqueness, etc.



getJoinForeignKey
public ForeignKey getJoinForeignKey(ClassMapping cls, Table local, Table foreign)(Code)
Return a default foreign key for the join from this class' table to its superclass' table, or null for a logical foreign key only. Do not add columns to the key or add the key to the table; only fill in its information such as name, delete action, etc.



getJoinForeignKey
public ForeignKey getJoinForeignKey(FieldMapping fm, Table local, Table foreign)(Code)
Return a default foreign key for the join from this field's table to its defining class' table, or null for a logical foreign key only. Do not add columns to the key or add the key to the table; only fill in its information such as name, delete action, etc.



getJoinIndex
public Index getJoinIndex(FieldMapping fm, Table table, Column[] cols)(Code)
Return a default index for the join, or null if the join columns should not be indexed by default. Do not add columns to the index or add the index to the table; only fill in its information such as name, uniqueness, etc.



getJoinUnique
public Unique getJoinUnique(FieldMapping fm, Table table, Column[] cols)(Code)
Return a default constraint for the join, or null if the join columns should not be constrained by default. Do not add columns to the constraint or add the constraint to the table; only fill in its information such as name, deferrability, etc.



getPrimaryKeyName
public String getPrimaryKeyName(ClassMapping cm, Table table)(Code)
Return the name of the primary key for the table of the given class, or null for database default.



getStrategy
public Object getStrategy(ClassMapping cls, boolean adapt)(Code)
Default mapping strategy when there is no explicit strategy and no hierarchy strategy given.
Parameters:
  cls - the class; will not be mapped, but superclass and rawMappingInfo will be available
Parameters:
  adapt - whether we can adapt the mapping or schema the strategy alias or a strategy instance, or null



getStrategy
public Object getStrategy(Version vers, boolean adapt)(Code)
Default version mapping strategy when there is no explicit strategy.
Parameters:
  vers - the version; will not be mapped, but rawMappingInfo will be available
Parameters:
  adapt - whether we can adapt the mapping or schema the strategy alias or a strategy instance, or null



getStrategy
public Object getStrategy(Discriminator disc, boolean adapt)(Code)
Default discriminator mapping strategy when there is no explicit strategy.
Parameters:
  disc - the discriminator; will not be mapped, but rawMappingInfo will be available
Parameters:
  adapt - whether we can adapt the mapping or schema the strategy alias or a strategy instance, or null



getStrategy
public Object getStrategy(ValueMapping vm, Class type, boolean adapt)(Code)
Custom handler or strategy for the given field, or null if none has been registered.
Parameters:
  vm - the value mapping; will not be mapped, but rawMappingInfo will be available
Parameters:
  type - the value type
Parameters:
  adapt - whether we can adapt the mapping or schema the handler/strategy alias or instance, or null



getTableName
public String getTableName(ClassMapping cls, Schema defaultSchema)(Code)
Return the default table name for the given class. This method is only called for classes mapped to their own table.



getTableName
public String getTableName(FieldMapping fm, Schema defaultSchema)(Code)
Return the default secondary table name for the given field. This method is only called for fields whose strategy requires a secondary table.



getUnique
public Unique getUnique(ValueMapping vm, String name, Table table, Column[] cols)(Code)
Return a default constraint for the value, or null if the value columns should not be constrained by default. Do not add columns to the constraint or add the constraint to the table; only fill in its information such as name, deferrability, etc.
Parameters:
  name - base name for value, as decided by mapping



installPrimaryKey
public void installPrimaryKey(FieldMapping fm, Table table)(Code)
If desired, install a primary key on the given secondary table.



populateColumns
public void populateColumns(Version vers, Table table, Column[] cols)(Code)
Fill in default information for the given version columns. The columns' name and Java type will already be populated with generic defaults that may be replaced.



populateColumns
public void populateColumns(Discriminator disc, Table table, Column[] cols)(Code)
Fill in default information for the given discriminator columns. The columns' name and Java type will already be populated with generic defaults that may be replaced.



populateColumns
public void populateColumns(ValueMapping vm, String name, Table table, Column[] cols)(Code)
Fill in default information for the given value columns. The columns' name and Java type will already be populated with generic defaults that may be replaced.
Parameters:
  name - base name for value, as decided by mapping



populateDataStoreIdColumns
public void populateDataStoreIdColumns(ClassMapping cls, Table table, Column[] cols)(Code)
Fill in default information for the given datastore identity columns. The columns' name and Java type will already be populated with generic defaults that may be replaced.



populateForeignKeyColumn
public void populateForeignKeyColumn(ValueMapping vm, String name, Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols)(Code)
Fill in default information for the given column used to join a value to its related type. The column will be a clone of the target column, or have its name and Java type set in the case of a constant target.
Parameters:
  name - base name for value, as decided by mapping
Parameters:
  target - the target of this column in the join; may beanother column or a constant value
Parameters:
  inverse - whether this is an inverse foreign key
Parameters:
  pos - the index of this column in the logical foreign key
Parameters:
  cols - the number of columns in the logical foreign key



populateJoinColumn
public void populateJoinColumn(ClassMapping cm, Table local, Table foreign, Column col, Object target, int pos, int cols)(Code)
Fill in default information for the given column used to join a class to its superclass table. The column will be a clone of the target column, or have its name and Java type set in the case of a constant target.
Parameters:
  target - the target of this column in the join; may beanother column or a constant value
Parameters:
  pos - the index of this column in the logical foreign key
Parameters:
  cols - the number of columns in the logical foreign key



populateJoinColumn
public void populateJoinColumn(FieldMapping fm, Table local, Table foreign, Column col, Object target, int pos, int cols)(Code)
Fill in default information for the given column used to join a field to its defining class' table. The column will be a clone of the target column, or have its name and Java type set in the case of a constant target.
Parameters:
  target - the target of this column in the join; may beanother column or a constant value
Parameters:
  pos - the index of this column in the logical foreign key
Parameters:
  cols - the number of columns in the logical foreign key



populateNullIndicatorColumns
public boolean populateNullIndicatorColumns(ValueMapping vm, String name, Table table, Column[] cols)(Code)
Fill in default information for the given null indicator columns. The columns' name and Java type will already be populated with generic defaults that may be replaced.
Parameters:
  name - base name for value, as decided by mapping false if the given value should not have null indicatorcolumns by default; fill in default information evenwhen returning false in case the user forces an indicator



populateOrderColumns
public boolean populateOrderColumns(FieldMapping fm, Table table, Column[] cols)(Code)
Fill in default information for the given order columns. The columns' name and Java type will already be populated with generic defaults that may be replaced. false if the given field should not have order columnsby default; fill in default information even when returningfalse in case the user forces ordering



useClassCriteria
public boolean useClassCriteria()(Code)
The default for whether relations use the related object's expected class as part of the join criteria.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.