Java Doc for HibernateDialect.java in  » Database-Client » squirrel-sql-2.6.5a » net » sourceforge » squirrel_sql » fw » dialects » 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 Client » squirrel sql 2.6.5a » net.sourceforge.squirrel_sql.fw.dialects 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.sourceforge.squirrel_sql.fw.dialects.HibernateDialect

All known Subclasses:   net.sourceforge.squirrel_sql.fw.dialects.IngresDialect,  net.sourceforge.squirrel_sql.fw.dialects.MySQLDialect,  net.sourceforge.squirrel_sql.fw.dialects.MAXDBDialect,  net.sourceforge.squirrel_sql.fw.dialects.TimesTenDialect,  net.sourceforge.squirrel_sql.fw.dialects.PostgreSQLDialect,  net.sourceforge.squirrel_sql.fw.dialects.InterbaseDialect,  net.sourceforge.squirrel_sql.fw.dialects.SQLServerDialect,  net.sourceforge.squirrel_sql.fw.dialects.AxionDialect,  net.sourceforge.squirrel_sql.fw.dialects.DaffodilDialect,  net.sourceforge.squirrel_sql.fw.dialects.InformixDialect,  net.sourceforge.squirrel_sql.fw.dialects.HADBDialect,  net.sourceforge.squirrel_sql.fw.dialects.SybaseDialect,  net.sourceforge.squirrel_sql.fw.dialects.McKoiDialect,  net.sourceforge.squirrel_sql.fw.dialects.PointbaseDialect,  net.sourceforge.squirrel_sql.fw.dialects.FirebirdDialect,  net.sourceforge.squirrel_sql.fw.dialects.ProgressDialect,  net.sourceforge.squirrel_sql.fw.dialects.DB2Dialect,  net.sourceforge.squirrel_sql.fw.dialects.HSQLDialect,  net.sourceforge.squirrel_sql.fw.dialects.H2Dialect,  net.sourceforge.squirrel_sql.fw.dialects.Oracle9iDialect,  net.sourceforge.squirrel_sql.fw.dialects.DerbyDialect,  net.sourceforge.squirrel_sql.fw.dialects.FrontBaseDialect,
HibernateDialect
public interface HibernateDialect (Code)
An interface for methods implemented by database dialects for the purpose of handling standard and non-standard SQL and database types.




Method Summary
 booleancanPasteTo(IDatabaseObjectInfo info)
     Returns a boolean indicating whether or not the specified database object can be pasted into for this database dialect.
 StringgetAddColumnString()
     Returns the SQL fragment for adding a column in an alter table statment.
 String[]getAddPrimaryKeySQL(String pkName, TableColumnInfo[] colInfos, ITableInfo ti)
     Returns the SQL that forms the command to add a primary key to the specified table composed of the given column names.
 String[]getColumnAddSQL(TableColumnInfo info)
     Returns the SQL statement to use to add a column to the specified table using the information about the new column specified by info.
public  StringgetColumnCommentAlterSQL(TableColumnInfo info)
     Returns the SQL statement to use to add a comment to the specified column of the specified table.
 StringgetColumnDefaultAlterSQL(TableColumnInfo info)
     Returns the SQL command to change the specified column's default value
Parameters:
  info - the column to modify and it's default value.
 StringgetColumnDropSQL(String tableName, String columnName)
     Returns the SQL that forms the command to drop the specified colum in the specified table.
 intgetColumnLength(int columnSize, int dataType)
     Some jdbc drivers are hopelessly broken with regard to reporting the COLUMN_SIZE.
 StringgetColumnNameAlterSQL(TableColumnInfo from, TableColumnInfo to)
     Returns the SQL that is used to change the column name.
 StringgetColumnNullableAlterSQL(TableColumnInfo info)
    
 List<String>getColumnTypeAlterSQL(TableColumnInfo from, TableColumnInfo to)
     Returns the SQL that is used to change the column type.
 List<String>getCreateTableSQL(List<ITableInfo> tables, ISQLDatabaseMetaData md, CreateScriptPreferences prefs, boolean isJdbcOdbc)
     Returns the SQL command to create the specified table.
Parameters:
  tables - the tables to get create statements for
Parameters:
  md - the metadata from the ISession
Parameters:
  prefs - preferences about how the resultant SQL commands should be formed.
Parameters:
  isJdbcOdbc - whether or not the connection is via JDBC-ODBC bridge.
 StringgetDisplayName()
     The string which identifies this dialect in the dialect chooser.
 StringgetDropForeignKeySQL(String fkName, String tableName)
     Returns the SQL command to drop the specified table's foreign key constraint.
 StringgetDropPrimaryKeySQL(String pkName, String tableName)
     Returns the SQL command to drop the specified table's primary key.
 StringgetLengthFunction(int dataType)
     Returns the name of the function that measures the length of a character string.
Parameters:
  dataType - the java.sql.Types data type.
 StringgetMaxFunction()
     Returns the name of the aggregate function that determines the max value of an expression.
 intgetMaxPrecision(int dataType)
     Returns the maximum precision allowed by the database for number type fields that specify the length of the number to the left of the decimal point in digits.
 intgetMaxScale(int dataType)
     Returns the maximum scale allowed by the database for number type fields that specify the length of the number to the right of the decimal point in digits.
 StringgetNullColumnString()
     Returns the string that should be appended to a column declaration when nulls are allowed in the column.
 intgetPrecisionDigits(int columnSize, int dataType)
     Returns the number of digits of precision is represented by the specifed columnSize for the specified dataType.
 List<String>getTableDropSQL(ITableInfo iTableInfo, boolean cascadeConstraints, boolean isMaterializedView)
     Returns the SQL that forms the command to drop the specified table.
 StringgetTypeName(int code, int length, int precision, int scale)
     Get the name of the database type associated with the given java.sql.Types typecode.
 booleansupportsAlterColumnDefault()
     Returns a boolean value indicating whether or not this database dialect supports changing a column's default value.
 booleansupportsAlterColumnNull()
     Returns a boolean value indicating whether or not this database dialect supports changing a column from null to not-null and vice versa.
 booleansupportsAlterColumnType()
     Returns a boolean value indicating whether or not this dialect supports modifying a columns type.
 booleansupportsColumnComment()
     Returns a boolean value indicating whether or not this dialect supports adding comments to columns.
 booleansupportsDropColumn()
     Returns a boolean value indicating whether or not this database dialect supports dropping columns from tables.
 booleansupportsProduct(String databaseProductName, String databaseProductVersion)
     Returns boolean value indicating whether or not this dialect supports the specified database product/version.
 booleansupportsRenameColumn()
     Returns a boolean value indicating whether or not this database dialect supports renaming columns.
 booleansupportsSchemasInTableDefinition()
     Returns a boolean value indicating whether or not this database dialect supports table creation statements where the table name is prefixed by the schema.



Method Detail
canPasteTo
boolean canPasteTo(IDatabaseObjectInfo info)(Code)
Returns a boolean indicating whether or not the specified database object can be pasted into for this database dialect. Some databases support the notion of schemas where tables live, and in those cases pasting to a database object in the object tree is not really appropriate. However, other databases don't support schemas (like Axion, Firebird)
Parameters:
  info -



getAddColumnString
String getAddColumnString()(Code)
Returns the SQL fragment for adding a column in an alter table statment.



getAddPrimaryKeySQL
String[] getAddPrimaryKeySQL(String pkName, TableColumnInfo[] colInfos, ITableInfo ti)(Code)
Returns the SQL that forms the command to add a primary key to the specified table composed of the given column names.
Parameters:
  pkName - the name of the constraint
Parameters:
  ti - TODO
Parameters:
  columnNames - the columns that form the key



getColumnAddSQL
String[] getColumnAddSQL(TableColumnInfo info) throws HibernateException, UnsupportedOperationException(Code)
Returns the SQL statement to use to add a column to the specified table using the information about the new column specified by info.
Parameters:
  info - information about the new column such as type, name, etc.
throws:
  UnsupportedOperationException - if the database doesn't support adding columns after a table has already been created.
throws:
  HibernateException - if the type in the specified info isn't supported by this dialect.



getColumnCommentAlterSQL
public String getColumnCommentAlterSQL(TableColumnInfo info) throws UnsupportedOperationException(Code)
Returns the SQL statement to use to add a comment to the specified column of the specified table.
Parameters:
  info - information about the column such as type, name, etc.
throws:
  UnsupportedOperationException - if the database doesn't support annotating columns with a comment.



getColumnDefaultAlterSQL
String getColumnDefaultAlterSQL(TableColumnInfo info)(Code)
Returns the SQL command to change the specified column's default value
Parameters:
  info - the column to modify and it's default value. SQL to make the change



getColumnDropSQL
String getColumnDropSQL(String tableName, String columnName) throws UnsupportedOperationException(Code)
Returns the SQL that forms the command to drop the specified colum in the specified table.
Parameters:
  tableName - the name of the table that has the column
Parameters:
  columnName - the name of the column to drop.



getColumnLength
int getColumnLength(int columnSize, int dataType)(Code)
Some jdbc drivers are hopelessly broken with regard to reporting the COLUMN_SIZE. For example, MaxDB has a "long byte" data type which can store up to 2G of data, yet the driver reports that the column size is "8" - real helpful. So for drivers that have this problem, return the "proper" maximum column length for the specified dataType. If the driver doesn't have this problem, just return the columnSize.
Parameters:
  columnSize - the size of the column as reported by the jdbc driver
Parameters:
  dataType - the type of the column. the specified columnSize if the jdbc driver isn't broken; otherwise, the maximum column size for the specified dataType ifthe driver is broken.



getColumnNameAlterSQL
String getColumnNameAlterSQL(TableColumnInfo from, TableColumnInfo to)(Code)
Returns the SQL that is used to change the column name.
Parameters:
  from - the TableColumnInfo as it is
Parameters:
  to - the TableColumnInfo as it wants to be the SQL to make the change



getColumnNullableAlterSQL
String getColumnNullableAlterSQL(TableColumnInfo info)(Code)
Returns the SQL used to alter the nullability of the specified column
Parameters:
  info - the column to modify the SQL to execute



getColumnTypeAlterSQL
List<String> getColumnTypeAlterSQL(TableColumnInfo from, TableColumnInfo to) throws UnsupportedOperationException(Code)
Returns the SQL that is used to change the column type.
Parameters:
  from - the TableColumnInfo as it is
Parameters:
  to - the TableColumnInfo as it wants to be the SQL to make the change



getCreateTableSQL
List<String> getCreateTableSQL(List<ITableInfo> tables, ISQLDatabaseMetaData md, CreateScriptPreferences prefs, boolean isJdbcOdbc) throws SQLException(Code)
Returns the SQL command to create the specified table.
Parameters:
  tables - the tables to get create statements for
Parameters:
  md - the metadata from the ISession
Parameters:
  prefs - preferences about how the resultant SQL commands should be formed.
Parameters:
  isJdbcOdbc - whether or not the connection is via JDBC-ODBC bridge. the SQL that is used to create the specified table



getDisplayName
String getDisplayName()(Code)
The string which identifies this dialect in the dialect chooser. a descriptive name that tells the user what database this dialectis design to work with.



getDropForeignKeySQL
String getDropForeignKeySQL(String fkName, String tableName)(Code)
Returns the SQL command to drop the specified table's foreign key constraint.
Parameters:
  fkName - the name of the foreign key that should be dropped
Parameters:
  tableName - the name of the table whose foreign key should be dropped



getDropPrimaryKeySQL
String getDropPrimaryKeySQL(String pkName, String tableName)(Code)
Returns the SQL command to drop the specified table's primary key.
Parameters:
  pkName - the name of the primary key that should be dropped
Parameters:
  tableName - the name of the table whose primary key should be dropped



getLengthFunction
String getLengthFunction(int dataType)(Code)
Returns the name of the function that measures the length of a character string.
Parameters:
  dataType - the java.sql.Types data type. Some databases have different length functions for different data types. the name of the function to be applied to a column to determinethe length of that column in a particular record.



getMaxFunction
String getMaxFunction()(Code)
Returns the name of the aggregate function that determines the max value of an expression. the name of the function to be applied to a set to determine the element with the highest numeric value.



getMaxPrecision
int getMaxPrecision(int dataType)(Code)
Returns the maximum precision allowed by the database for number type fields that specify the length of the number to the left of the decimal point in digits. If the HibernateDialect implementation doesn't ever use $p in any call to registerColumnType(), then this maximum precsision will not be used.
Parameters:
  dataType - the java.sql.Types data type. the maximum number that can be used in a column declaration for precision for the specified type.



getMaxScale
int getMaxScale(int dataType)(Code)
Returns the maximum scale allowed by the database for number type fields that specify the length of the number to the right of the decimal point in digits. If the HibernateDialect implementation doesn't ever use $s in any call to registerColumnType(), then this maximum scale will not be used.
Parameters:
  dataType - the java.sql.Types data type. the maximum number that can be used in a column declaration for scale for the specified type.



getNullColumnString
String getNullColumnString()(Code)
Returns the string that should be appended to a column declaration when nulls are allowed in the column. the "nulls are allowed in this column" string for a table declaration



getPrecisionDigits
int getPrecisionDigits(int columnSize, int dataType)(Code)
Returns the number of digits of precision is represented by the specifed columnSize for the specified dataType. Some DBs represent precision as the total number of digits on the right or left of the decimal. That is what we want. Others (like PostgreSQL) give the number of bytes of storage a column can use - less than useful, since the SQL-92 says "number of digits" and this is what most other DBs use.
Parameters:
  columnSize - the size of the column as reported by the driver.
Parameters:
  dataType - the java.sql.Types data type. a number indicating the total number of digits (includes bothsides of the decimal point) the column can represent.



getTableDropSQL
List<String> getTableDropSQL(ITableInfo iTableInfo, boolean cascadeConstraints, boolean isMaterializedView)(Code)
Returns the SQL that forms the command to drop the specified table. If cascade contraints is supported by the dialect and cascadeConstraints is true, then a drop statement with cascade constraints clause will be formed.
Parameters:
  iTableInfo - the table to drop
Parameters:
  cascadeConstraints - whether or not to drop any FKs that may reference the specified table.
Parameters:
  isMaterializedView - TODO the drop SQL command.



getTypeName
String getTypeName(int code, int length, int precision, int scale) throws HibernateException(Code)
Get the name of the database type associated with the given java.sql.Types typecode.
Parameters:
  code - java.sql.Types typecode
Parameters:
  length - the length or precision of the column
Parameters:
  precision - the precision of the column
Parameters:
  scale - the scale of the column the database type name
throws:
  HibernateException -



supportsAlterColumnDefault
boolean supportsAlterColumnDefault()(Code)
Returns a boolean value indicating whether or not this database dialect supports changing a column's default value. true if the database supports modifying column defaults; false otherwise



supportsAlterColumnNull
boolean supportsAlterColumnNull()(Code)
Returns a boolean value indicating whether or not this database dialect supports changing a column from null to not-null and vice versa. true if the database supports dropping columns; false otherwise.



supportsAlterColumnType
boolean supportsAlterColumnType()(Code)
Returns a boolean value indicating whether or not this dialect supports modifying a columns type. true if supported; false otherwise



supportsColumnComment
boolean supportsColumnComment()(Code)
Returns a boolean value indicating whether or not this dialect supports adding comments to columns. true if column comments are supported; false otherwise.



supportsDropColumn
boolean supportsDropColumn()(Code)
Returns a boolean value indicating whether or not this database dialect supports dropping columns from tables. true if the database supports dropping columns; false otherwise.



supportsProduct
boolean supportsProduct(String databaseProductName, String databaseProductVersion)(Code)
Returns boolean value indicating whether or not this dialect supports the specified database product/version.
Parameters:
  databaseProductName - the name of the database as reported by DatabaseMetaData.getDatabaseProductName()
Parameters:
  databaseProductVersion - the version of the database as reported byDatabaseMetaData.getDatabaseProductVersion() true if this dialect can be used for the specified product nameand version; false otherwise.



supportsRenameColumn
boolean supportsRenameColumn()(Code)
Returns a boolean value indicating whether or not this database dialect supports renaming columns. true if the database supports changing the name of columns; false otherwise.



supportsSchemasInTableDefinition
boolean supportsSchemasInTableDefinition()(Code)
Returns a boolean value indicating whether or not this database dialect supports table creation statements where the table name is prefixed by the schema.



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