Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Extending/Fixing DatabaseDefinitionImpl
Extending/Fixing DatabaseDefinitionImpl [message #582179] Wed, 06 September 2006 22:50
Charles Eutsler is currently offline Charles EutslerFriend
Messages: 19
Registered: July 2009
Junior Member
I am having trouble generating the DDL for a Table that contains a column
whose PredefinedDataType's PrimitiveType is PrimitiveType.TIME where the
PredefinedDataType supports precision. Basically, I want to generate a
column whose type is "TIME(3)".

The problem comes down to the getPredefinedDataTypeFormattedName method in
org.eclipse.datatools.connectivity.sqm.internal.core.definit ion.DatabaseDefinitionImpl.
That method does not take into account cases where a PrivitiveType.TIME
supports precision. It simply returns predefinedDataType.getName() as the
type's formatted name. It seems to me that it should check if the type
supports precision and, if it does, include the precision in parentheses
(just as is done for TIMESTAMP).

As far as I can tell, I am unable to extend the DatabaseDefinitionImpl
class to work around this problem. The DatabaseDefinitionRegistryImpl
creates instances of the DatabaseDefinitionImpl for each of the plug-ins
that extend the databaseDefinition extension point. That class doesn't
seem to give me the opportunity to provide a class that implements the
DatabaseDefinition interface that provides for my special needs.

A second problem along this line is that I will be wanting to generate
columns whose type is "TIME(n) WITH TIME ZONE". (Also "TIMESTAMP(n) WITH
TIME ZONE".) It seems to me that this would be accomplished if the TIME
and TIMESTAMP cases in the getPredefinedDataTypeFormattedName method would
check to see if the type supports a display name and, if so, inserts the
precision into the display name using the MessageFormat.format method in
the way as is done for the BINARY and INTERVAL types.

Are these problems that should be addressed in the DatabaseDefinitionImpl
class or is there some way that I can provide a class that extends
DatabaseDefinitionImpl (or otherwise implements DatabaseDefinition) so
that I can provide my own support for these types?

Thanks.

--Charles Eutsler
Previous Topic:ODA BIRT interaction
Next Topic:Connection Profile vs. Driver Definitions
Goto Forum:
  


Current Time: Fri Apr 26 05:41:31 GMT 2024

Powered by FUDForum. Page generated in 0.02789 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top