com.googlecode.jdbw
Interface DatabaseServerType

All Known Implementing Classes:
AbstractDatabaseType, H2ServerTypes.FileBased, H2ServerTypes.H2ServerType, H2ServerTypes.InMemory, H2ServerTypes.Network, MySQLServerType, PostgresqlServerType, SybaseASEServerType

public interface DatabaseServerType

This interface represents a type (MySQL, PostgreSQL, etc...) of database, with methods used for helping you adapt to this particular server's dialect of SQL

Author:
Martin Berglund
See Also:
DatabaseServerTypes

Method Summary
 AutoExecutor createAutoExecutor(DataSource dataSource)
          Creates an AutoExecutor for this server type
 SQLExecutor createExecutor(Connection connection)
          Creates an SQLExecutor for this server type
 MetaDataResolver createMetaDataResolver(DataSource dataSource)
          Creates a MetaDataResolver for this server type
 String getName()
           
 SQLDialect getSQLDialect()
           
 boolean isConnectionError(SQLException e)
          Check an SQLException with this server type if it is considered a connection error
 

Method Detail

getName

String getName()
Returns:
Name of the database server type

getSQLDialect

SQLDialect getSQLDialect()
Returns:
SQLDialect for the server type

createAutoExecutor

AutoExecutor createAutoExecutor(DataSource dataSource)
Creates an AutoExecutor for this server type

Parameters:
dataSource - DataSource that is backing the auto executor
Returns:
AutoExecutor-implementation for this server type

createExecutor

SQLExecutor createExecutor(Connection connection)
Creates an SQLExecutor for this server type

Parameters:
connection - Connection to be used by the SQLExecutor
Returns:
SQLExecutor-implementation for this server type

createMetaDataResolver

MetaDataResolver createMetaDataResolver(DataSource dataSource)
Creates a MetaDataResolver for this server type

Parameters:
dataSource - DataSource to be used by this MetaDataResolver
Returns:
MetaDataResolver-implementation for this server type

isConnectionError

boolean isConnectionError(SQLException e)
Check an SQLException with this server type if it is considered a connection error

Parameters:
e - SQLException to check
Returns:
true if the SQLException is caused by connection problems, false otherwise


Copyright © 2012. All Rights Reserved.