org.enableit.db.darrt
Interface DDLGenerator

All Known Implementing Classes:
DeclarativeDDLGenerator

public interface DDLGenerator

Defines methods required to construct Data Definition Language.

Implementations deliver the DDL for a specific RDBMS.

Author:
default

Field Summary
static java.lang.String NO_DEFINITION_AVAILABLE
           
 
Method Summary
 java.util.List getCreate(java.lang.Object dataObject)
          Create a table that does not currently exist.
 java.lang.String getCreateIndex(org.enableit.db.beans.Index index)
          Creates DDL for an index.
 java.lang.String getFormattedDate(java.lang.String colName, java.lang.String format)
          Returns this RDBMS' implementation of formatted date (including time and datetime).
 java.lang.String getGenericDefault(java.lang.String dbmsDefault)
          Converts the DBMS specific default string into a generic (Darrt) one.
 java.util.List getModify(org.enableit.db.darrt.beans.DiffData diff)
          Returns the DDL to create the modification between the reference and targets.
 java.lang.String getName()
          Return the name of this DDLGenerator.
 java.lang.String getSubstring(java.lang.String colName, int from, int to)
          Returns this RDBMS' implementation of substring.
 

Field Detail

NO_DEFINITION_AVAILABLE

public static final java.lang.String NO_DEFINITION_AVAILABLE
See Also:
Constant Field Values
Method Detail

getCreate

public java.util.List getCreate(java.lang.Object dataObject)
Create a table that does not currently exist.

Parameters:
dataObject -

getCreateIndex

public java.lang.String getCreateIndex(org.enableit.db.beans.Index index)
Creates DDL for an index.

Parameters:
index - to create.

getModify

public java.util.List getModify(org.enableit.db.darrt.beans.DiffData diff)
Returns the DDL to create the modification between the reference and targets.

Parameters:
diff -
Returns:
List of DDL statements (Strings)

getName

public java.lang.String getName()
Return the name of this DDLGenerator.


getSubstring

public java.lang.String getSubstring(java.lang.String colName,
                                     int from,
                                     int to)
Returns this RDBMS' implementation of substring.


getFormattedDate

public java.lang.String getFormattedDate(java.lang.String colName,
                                         java.lang.String format)
Returns this RDBMS' implementation of formatted date (including time and datetime).


getGenericDefault

public java.lang.String getGenericDefault(java.lang.String dbmsDefault)
Converts the DBMS specific default string into a generic (Darrt) one.

Parameters:
dbmsDefault -
Returns:
RDBMS independent default defintion.


Copyright © 1999-2004 enableIT.org. All Rights Reserved.