Java Doc for JdbcNameGenerator.java in  » Testing » PolePosition-0.20 » com » versant » core » jdbc » sql » 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.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.versant.core.jdbc.sql.JdbcNameGenerator

All known Subclasses:   com.versant.core.jdbc.sql.DefaultJdbcNameGenerator,
JdbcNameGenerator
public interface JdbcNameGenerator (Code)
This is responsible for generating and validating names for different JDBC entities (tables, columns, indexes and constraints). The SqlDriver for each store creates and configures a name generator instance for the store. This may be replaced by a user configured generator.




Method Summary
public  voidaddColumnName(String tableName, String columnName)
     Add a column name.
public  voidaddIndexName(String tableName, String indexName)
     Add an index name.
public  voidaddPkConstraintName(String tableName, String pkConstraintName)
     Add the primary key constaint name specified in jdo meta data.
public  voidaddRefConstraintName(String tableName, String refConstraintName)
     Add the referential integrity constaint name specified in jdo meta data.
public  voidaddTableName(String name)
     Add a table name specified in jdo meta data.
exception:
  IllegalArgumentException - if the name is invalid(e.g.
public  StringgenerateClassIdColumnName(String tableName)
     Generate and add the name for a classId column.
public  StringgenerateClassTableName(String className)
     Generate a table name for a persistent class.
public  StringgenerateDatastorePKName(String tableName)
     Generate and add a name for the primary key column for a PC class using datastore identity.
public  StringgenerateFieldColumnName(String tableName, String fieldName, boolean primaryKey)
     Generate and add the name for a field column.
public  StringgenerateIndexName(String tableName, String[] columnNames)
     Generate and add an index name.
public  voidgenerateLinkTableMainRefNames(String tableName, String[] mainTablePkNames, String[] linkMainRefNames)
     Generate and add names for the column(s) in a link table that reference the primary key of the main table.
public  StringgenerateLinkTableName(String tableName, String fieldName, String elementTableName)
     Generate a table name for a link table (normally used to hold the values of a collection).
public  StringgenerateLinkTableSequenceName(String tableName)
     Generate and add the name for a the column in a link table that stores the element sequence number.
public  StringgenerateLinkTableValueName(String tableName, Class valueCls, boolean key)
     Generate and add the name for a the column in a link table that stores the value where the value is not a PC class (int, String etc).
public  voidgenerateLinkTableValueRefNames(String tableName, String[] valuePkNames, String valueClassName, String[] linkValueRefNames, boolean key)
     Generate and add names for the column(s) in a link table that reference the primary key of the value table.
public  StringgeneratePkConstraintName(String tableName)
     Generate a name for the primary key constaint for tableName.
public  voidgeneratePolyRefFieldColumnNames(String tableName, String fieldName, String[] columnNames)
     Generate and add names for one or more columns for a field that is a polymorphic reference to any other PC class.
public  StringgenerateRefConstraintName(String tableName, String refTableName, String[] fkNames, String[] refPkNames)
     Generate a name for a referential integrity constaint for tableName.
public  voidgenerateRefFieldColumnNames(String tableName, String fieldName, String[] columnNames, String refTableName, String[] refPkNames, boolean otherRefs)
     Generate and add names for one or more columns for a field that is a reference to another PC class.
public  booleanisColumnInTable(String tableName, String columnName)
    
public  voidremoveTableName(String name)
     Remove all information about table.
public  voidsetDatabaseType(String db)
     This is called immediately after the name generator has been constructed to indicate which database is in use.



Method Detail
addColumnName
public void addColumnName(String tableName, String columnName) throws IllegalArgumentException(Code)
Add a column name. The tableName will have already been added.
exception:
  IllegalArgumentException - if the name is invalid(e.g. 'duplicate column name' or 'invalid character XXX in name'etc.)



addIndexName
public void addIndexName(String tableName, String indexName) throws IllegalArgumentException(Code)
Add an index name. The tableName will have already been added.
exception:
  IllegalArgumentException - if it is invalid



addPkConstraintName
public void addPkConstraintName(String tableName, String pkConstraintName) throws IllegalArgumentException(Code)
Add the primary key constaint name specified in jdo meta data.
exception:
  IllegalArgumentException - if it is invalid



addRefConstraintName
public void addRefConstraintName(String tableName, String refConstraintName) throws IllegalArgumentException(Code)
Add the referential integrity constaint name specified in jdo meta data.
exception:
  IllegalArgumentException - if it is invalid



addTableName
public void addTableName(String name) throws IllegalArgumentException(Code)
Add a table name specified in jdo meta data.
exception:
  IllegalArgumentException - if the name is invalid(e.g. 'duplicate table name' or 'invalid character XXX in name'etc.)



generateClassIdColumnName
public String generateClassIdColumnName(String tableName)(Code)
Generate and add the name for a classId column.
See Also:   JdbcNameGenerator.addColumnName



generateClassTableName
public String generateClassTableName(String className)(Code)
Generate a table name for a persistent class. The name generator must 'add' it.
See Also:   JdbcNameGenerator.addTableName



generateDatastorePKName
public String generateDatastorePKName(String tableName)(Code)
Generate and add a name for the primary key column for a PC class using datastore identity.



generateFieldColumnName
public String generateFieldColumnName(String tableName, String fieldName, boolean primaryKey)(Code)
Generate and add the name for a field column.



generateIndexName
public String generateIndexName(String tableName, String[] columnNames)(Code)
Generate and add an index name.
See Also:   JdbcNameGenerator.addIndexName



generateLinkTableMainRefNames
public void generateLinkTableMainRefNames(String tableName, String[] mainTablePkNames, String[] linkMainRefNames)(Code)
Generate and add names for the column(s) in a link table that reference the primary key of the main table. Some of the columns may already have names which must be kept (no need to add them).
Parameters:
  tableName - The link table
Parameters:
  mainTablePkNames - The names of the main table primary key
Parameters:
  linkMainRefNames - The corresponding column names in the link table



generateLinkTableName
public String generateLinkTableName(String tableName, String fieldName, String elementTableName)(Code)
Generate a table name for a link table (normally used to hold the values of a collection). The name generator must 'add' it.
Parameters:
  tableName - The table on the 1 side of the the link
Parameters:
  fieldName - The field the link table is for
Parameters:
  elementTableName - The table on the n side of the link or null ifnone (e.g. a link table for a collection of String's)
See Also:   JdbcNameGenerator.addTableName



generateLinkTableSequenceName
public String generateLinkTableSequenceName(String tableName)(Code)
Generate and add the name for a the column in a link table that stores the element sequence number.



generateLinkTableValueName
public String generateLinkTableValueName(String tableName, Class valueCls, boolean key)(Code)
Generate and add the name for a the column in a link table that stores the value where the value is not a PC class (int, String etc).
Parameters:
  tableName - The link table
Parameters:
  valueCls - The value class
Parameters:
  key - Is this a key in a link table for a map?



generateLinkTableValueRefNames
public void generateLinkTableValueRefNames(String tableName, String[] valuePkNames, String valueClassName, String[] linkValueRefNames, boolean key)(Code)
Generate and add names for the column(s) in a link table that reference the primary key of the value table. This is called for collections of PC classes. Some of the columns may already have names which must be kept (no need to add them).
Parameters:
  tableName - The link table
Parameters:
  valuePkNames - The names of the value table primary key (may benull if the value class is not stored in JDBC)
Parameters:
  valueClassName - The name of the value class
Parameters:
  linkValueRefNames - The corresponding column names in the link table
Parameters:
  key - Is this a key in a link table for a map?



generatePkConstraintName
public String generatePkConstraintName(String tableName)(Code)
Generate a name for the primary key constaint for tableName. The name generator must add it.
See Also:   JdbcNameGenerator.addPkConstraintName



generatePolyRefFieldColumnNames
public void generatePolyRefFieldColumnNames(String tableName, String fieldName, String[] columnNames) throws IllegalArgumentException(Code)
Generate and add names for one or more columns for a field that is a polymorphic reference to any other PC class. Some of the columns may already have names.
Parameters:
  columnNames - Store the column names here (some may already havenames if specified in the .jdo meta data). The class-id columnis at index 0.
exception:
  IllegalArgumentException - if any existing names are invalid



generateRefConstraintName
public String generateRefConstraintName(String tableName, String refTableName, String[] fkNames, String[] refPkNames)(Code)
Generate a name for a referential integrity constaint for tableName. The name generator must add it.
Parameters:
  tableName - The table with the constraint
Parameters:
  refTableName - The table being referenced
Parameters:
  fkNames - The names of the foreign keys in tableName
Parameters:
  refPkNames - The names of the primary key of refTableName
See Also:   JdbcNameGenerator.addRefConstraintName



generateRefFieldColumnNames
public void generateRefFieldColumnNames(String tableName, String fieldName, String[] columnNames, String refTableName, String[] refPkNames, boolean otherRefs) throws IllegalArgumentException(Code)
Generate and add names for one or more columns for a field that is a reference to another PC class. Some of the columns may already have names.
Parameters:
  columnNames - Store the column names here (some may already havenames if specified in the .jdo meta data)
Parameters:
  refTableName - The table being referenced (null if not a JDBC class)
Parameters:
  refPkNames - The names of the primary key columns of refTableName
Parameters:
  otherRefs - Are there other field referencing the same class here?
exception:
  IllegalArgumentException - if any existing names are invalid



isColumnInTable
public boolean isColumnInTable(String tableName, String columnName)(Code)
Does the table contain the column?



removeTableName
public void removeTableName(String name)(Code)
Remove all information about table.



setDatabaseType
public void setDatabaseType(String db)(Code)
This is called immediately after the name generator has been constructed to indicate which database is in use.
Parameters:
  db - Database type (mssql, sybase, oracle, informix et al.).



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