planetj.database
Class PostgreSQLDBSystem

java.lang.Object
  extended byplanetj.database.DBSystem
      extended byplanetj.database.PostgreSQLDBSystem
All Implemented Interfaces:
java.util.EventListener, IDBObject, ITaskListener, IXMLObject, java.io.Serializable

public class PostgreSQLDBSystem
extends DBSystem

Insert the type's description here. Creation date: (11/29/2002 1:17:00 PM)

See Also:
Serialized Form

Field Summary
static java.lang.String DRIVER
           
 
Fields inherited from class planetj.database.DBSystem
LIBRARIES_NOT_SUPPORTED, LIBRARIES_REQUIRED, LIBRARIES_SUPPORTED, METADATA_CATALOG_NAME_FIELD, METADATA_COLUMN_NAME_FIELD, METADATA_COLUMN_NAME_OPERATION, METADATA_COLUMN_NAME_OPERATION_FOR_CATALOGS, METADATA_LIBRARY_NAME, METADATA_LIBRARY_NAME_FIELD, METADATA_SYSTEM_NAME_FIELD, METADATA_TABLE_NAME_FIELD, METADATA_TABLE_NAME_FOR_COLUMNS, METADATA_TABLE_NAME_FOR_LIBRARIES, METADATA_TABLE_NAME_FOR_TABLES, METADATA_TABLE_NAME_OPERATION, METADATA_TABLE_NAME_OPERATION_FOR_CATALOGS
 
Constructor Summary
PostgreSQLDBSystem()
           
 
Method Summary
 void correctOperation(Operation op)
          Corrects the operation to account for syntax differences of different DB systems.
protected  void correctTimeInterval(java.lang.String intervalType, CasedStringBuffer sb)
          PostgreSQL has a different syntax for time intervals.
 java.lang.String getColumnDataTypeName(FieldDescriptorRow oldFD)
          Gets the correct column data type name for the FD on this system.
 int getDataType(IParameter param)
          Gets the correct data type for the parameter for this DBSystem.
protected  void setURL(java.lang.String pURL)
          Sets the url of the system.
 
Methods inherited from class planetj.database.DBSystem
addSQLTypeName, correctDatabaseObject, correctOperationSQL, correctSQLLiteral, createLibrary, createSystem, createSystem, createSystem, createSystem, getAlias, getAllLibraries, getCache, getColumnIndicationCharacter, getColumnPrimaryKeyName, getDBLibraryName, getDefaultDateFormat, getDefaultLibraryName, getDefaultTimeFormat, getDefaultTimestampFormat, getFieldClassForSQLTypeName, getIPAddress, getLibraries, getLibrary, getLibrary, getLibrarySupportLevel, getLibraryTableSeparator, getMetaDataAlias, getMetadataColumns, getMetadataLibraries, getMetaDataSystem, getMetadataTables, getName, getProperties, getSQLTypeNames, getSupportedDataType, getSystem, getURL, getXMLData, handleConnectionEvent, isAS400, isBackgroundThreadsSupported, isDB2, isDefaultLibraryOmitted, isDelegateToPersonal, isHasAllLibraries, isMSAccess, isMySQL, isOracle, isSQLServer, removeLibrary, setAlias, setDelegateToPersonal, setMetaDataAlias, setProperties, setURLInternal, startRetrieveAllLibrariesTask, taskCompleted, taskFailed, taskStarted, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DRIVER

public static final java.lang.String DRIVER
See Also:
Constant Field Values
Constructor Detail

PostgreSQLDBSystem

public PostgreSQLDBSystem()
Method Detail

correctTimeInterval

protected void correctTimeInterval(java.lang.String intervalType,
                                   CasedStringBuffer sb)
PostgreSQL has a different syntax for time intervals. Instead of value - 1 month we have to use value - interval '1 month'


correctOperation

public void correctOperation(Operation op)
Corrects the operation to account for syntax differences of different DB systems. For example, in mySQL you cannot use the DECIMAL data type inside of a cast, instead the BINARY data type should be used

Overrides:
correctOperation in class DBSystem

getColumnDataTypeName

public java.lang.String getColumnDataTypeName(FieldDescriptorRow oldFD)
Gets the correct column data type name for the FD on this system. This method is invoked on a DBSystem when the SQL for creating a new table on that system is being generated from the FD's of another table. The two tables may be on different systems. A null return value indicates that the same data type name is used for the new & old tables. For some data types the column length may have to be included.

Overrides:
getColumnDataTypeName in class DBSystem
Parameters:
oldFD - The FD for the column of the existing table

getDataType

public int getDataType(IParameter param)
Gets the correct data type for the parameter for this DBSystem.

Overrides:
getDataType in class DBSystem

setURL

protected void setURL(java.lang.String pURL)
Sets the url of the system.

Overrides:
setURL in class DBSystem