Source Code Cross Referenced 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 Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 1998 - 2005 Versant Corporation
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         * Versant Corporation - initial API and implementation
010:         */
011:        package com.versant.core.jdbc.sql;
012:
013:        /**
014:         * This is responsible for generating and validating names for different
015:         * JDBC entities (tables, columns, indexes and constraints). The SqlDriver
016:         * for each store creates and configures a name generator instance for the
017:         * store. This may be replaced by a user configured generator.
018:         *
019:         * @keep-all
020:         *
021:         */
022:        public interface JdbcNameGenerator {
023:
024:            /**
025:             * This is called immediately after the name generator has been constructed
026:             * to indicate which database is in use.
027:             * @param db Database type (mssql, sybase, oracle, informix et al.).
028:             */
029:            public void setDatabaseType(String db);
030:
031:            /**
032:             * Add a table name specified in jdo meta data.
033:             *
034:             * @exception IllegalArgumentException if the name is invalid
035:             *         (e.g. 'duplicate table name' or 'invalid character XXX in name'
036:             *         etc.)
037:             */
038:            public void addTableName(String name)
039:                    throws IllegalArgumentException;
040:
041:            /**
042:             * Remove all information about table.
043:             */
044:            public void removeTableName(String name);
045:
046:            /**
047:             * Generate a table name for a persistent class. The name generator must
048:             * 'add' it.
049:             *
050:             * @see #addTableName
051:             */
052:            public String generateClassTableName(String className);
053:
054:            /**
055:             * Generate a table name for a link table (normally used to hold the values
056:             * of a collection). The name generator must 'add' it.
057:             *
058:             * @param tableName The table on the 1 side of the the link
059:             * @param fieldName The field the link table is for
060:             * @param elementTableName The table on the n side of the link or null if
061:             *        none (e.g. a link table for a collection of String's)
062:             *
063:             * @see #addTableName
064:             */
065:            public String generateLinkTableName(String tableName,
066:                    String fieldName, String elementTableName);
067:
068:            /**
069:             * Add the primary key constaint name specified in jdo meta data.
070:             * @exception IllegalArgumentException if it is invalid
071:             */
072:            public void addPkConstraintName(String tableName,
073:                    String pkConstraintName) throws IllegalArgumentException;
074:
075:            /**
076:             * Generate a name for the primary key constaint for tableName. The name
077:             * generator must add it.
078:             *
079:             * @see #addPkConstraintName
080:             */
081:            public String generatePkConstraintName(String tableName);
082:
083:            /**
084:             * Add the referential integrity constaint name specified in jdo meta data.
085:             * @exception IllegalArgumentException if it is invalid
086:             */
087:            public void addRefConstraintName(String tableName,
088:                    String refConstraintName) throws IllegalArgumentException;
089:
090:            /**
091:             * Generate a name for a referential integrity constaint for tableName.
092:             * The name generator must add it.
093:             *
094:             * @param tableName The table with the constraint
095:             * @param refTableName The table being referenced
096:             * @param fkNames The names of the foreign keys in tableName
097:             * @param refPkNames The names of the primary key of refTableName
098:             *
099:             * @see #addRefConstraintName
100:             */
101:            public String generateRefConstraintName(String tableName,
102:                    String refTableName, String[] fkNames, String[] refPkNames);
103:
104:            /**
105:             * Add a column name. The tableName will have already been added.
106:             *
107:             * @exception IllegalArgumentException if the name is invalid
108:             *         (e.g. 'duplicate column name' or 'invalid character XXX in name'
109:             *         etc.)
110:             */
111:            public void addColumnName(String tableName, String columnName)
112:                    throws IllegalArgumentException;
113:
114:            /**
115:             * Does the table contain the column?
116:             */
117:            public boolean isColumnInTable(String tableName, String columnName);
118:
119:            /**
120:             * Generate and add a name for the primary key column for a PC class using
121:             * datastore identity.
122:             */
123:            public String generateDatastorePKName(String tableName);
124:
125:            /**
126:             * Generate and add the name for a classId column.
127:             * @see #addColumnName
128:             */
129:            public String generateClassIdColumnName(String tableName);
130:
131:            /**
132:             * Generate and add the name for a field column.
133:             */
134:            public String generateFieldColumnName(String tableName,
135:                    String fieldName, boolean primaryKey);
136:
137:            /**
138:             * Generate and add names for one or more columns for a field that is
139:             * a reference to another PC class. Some of the columns may already have
140:             * names.
141:             *
142:             * @param columnNames Store the column names here (some may already have
143:             *        names if specified in the .jdo meta data)
144:             * @param refTableName The table being referenced (null if not a JDBC class)
145:             * @param refPkNames The names of the primary key columns of refTableName
146:             * @param otherRefs Are there other field referencing the same class here?
147:             *
148:             * @exception IllegalArgumentException if any existing names are invalid
149:             */
150:            public void generateRefFieldColumnNames(String tableName,
151:                    String fieldName, String[] columnNames,
152:                    String refTableName, String[] refPkNames, boolean otherRefs)
153:                    throws IllegalArgumentException;
154:
155:            /**
156:             * Generate and add names for one or more columns for a field that is
157:             * a polymorphic reference to any other PC class. Some of the columns may
158:             * already have names.
159:             *
160:             * @param columnNames Store the column names here (some may already have
161:             *        names if specified in the .jdo meta data). The class-id column
162:             *        is at index 0.
163:             *
164:             * @exception IllegalArgumentException if any existing names are invalid
165:             */
166:            public void generatePolyRefFieldColumnNames(String tableName,
167:                    String fieldName, String[] columnNames)
168:                    throws IllegalArgumentException;
169:
170:            /**
171:             * Generate and add names for the column(s) in a link table that reference
172:             * the primary key of the main table. Some of the columns may already
173:             * have names which must be kept (no need to add them).
174:             *
175:             * @param tableName The link table
176:             * @param mainTablePkNames The names of the main table primary key
177:             * @param linkMainRefNames The corresponding column names in the link table
178:             */
179:            public void generateLinkTableMainRefNames(String tableName,
180:                    String[] mainTablePkNames, String[] linkMainRefNames);
181:
182:            /**
183:             * Generate and add the name for a the column in a link table that stores
184:             * the element sequence number.
185:             */
186:            public String generateLinkTableSequenceName(String tableName);
187:
188:            /**
189:             * Generate and add names for the column(s) in a link table that reference
190:             * the primary key of the value table. This is called for collections of
191:             * PC classes. Some of the columns may already have names which must be
192:             * kept (no need to add them).
193:             *
194:             * @param tableName The link table
195:             * @param valuePkNames The names of the value table primary key (may be
196:             *        null if the value class is not stored in JDBC)
197:             * @param valueClassName The name of the value class
198:             * @param linkValueRefNames The corresponding column names in the link table
199:             * @param key Is this a key in a link table for a map?
200:             */
201:            public void generateLinkTableValueRefNames(String tableName,
202:                    String[] valuePkNames, String valueClassName,
203:                    String[] linkValueRefNames, boolean key);
204:
205:            /**
206:             * Generate and add the name for a the column in a link table that stores
207:             * the value where the value is not a PC class (int, String etc).
208:             *
209:             * @param tableName The link table
210:             * @param valueCls The value class
211:             * @param key Is this a key in a link table for a map?
212:             */
213:            public String generateLinkTableValueName(String tableName,
214:                    Class valueCls, boolean key);
215:
216:            /**
217:             * Add an index name. The tableName will have already been added.
218:             * @exception IllegalArgumentException if it is invalid
219:             */
220:            public void addIndexName(String tableName, String indexName)
221:                    throws IllegalArgumentException;
222:
223:            /**
224:             * Generate and add an index name.
225:             * @see #addIndexName
226:             */
227:            public String generateIndexName(String tableName,
228:                    String[] columnNames);
229:
230:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.