|
SRJRCFrames v0.1.296 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.schwarzrot.data.access.jdbc.JDBCModelCreator
public class JDBCModelCreator
class to ease database model creation. It may either be used to create
build-scripts for certain database, or create the model directly via JDBC. It
uses DbUtil
implementations to hide the database implementation
specific stuff, so it should work with other databases too.
Playing together with XMLExporter
and XMLImporter
it is a
powerful weapon to port database schema.
Constructor Summary | |
---|---|
JDBCModelCreator(Connection conn)
|
|
JDBCModelCreator(Connection conn,
boolean removeBeforeCreation)
|
|
JDBCModelCreator(Connection conn,
ProgressTracker tracker)
|
|
JDBCModelCreator(Connection conn,
ProgressTracker tracker,
boolean removeBeforeCreation)
|
Method Summary | |
---|---|
void |
create(DatabaseModel dbInfo)
creates a database model directly via JDBC |
protected void |
createIndices(TableDefinition ti)
|
protected void |
createTables(SchemaDefinition schemInfo)
|
void |
generate(DatabaseModel dbInfo,
File target)
creates build-script usable for certain database. |
protected void |
generateAccessRights(TableDefinition ti,
Writer out,
String defaultUser)
|
protected void |
generateDBCreation(DatabaseModel dbInfo,
Writer out)
|
protected void |
generateIndexCreation(TableDefinition ti,
Writer out)
|
protected void |
generateSchemaCreation(DatabaseModel dbInfo,
Writer out)
|
protected void |
generateTableCreation(SchemaDefinition schemInfo,
Writer out)
|
protected void |
grantRights(TableDefinition ti,
String defaultUser)
|
void |
remove(DatabaseModel dbInfo)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JDBCModelCreator(Connection conn)
public JDBCModelCreator(Connection conn, boolean removeBeforeCreation)
public JDBCModelCreator(Connection conn, ProgressTracker tracker)
public JDBCModelCreator(Connection conn, ProgressTracker tracker, boolean removeBeforeCreation)
Method Detail |
---|
public void create(DatabaseModel dbInfo)
dbInfo
- the model definitionpublic void generate(DatabaseModel dbInfo, File target) throws IOException
dbInfo
- the model definitiontarget
- the name of the script file
IOException
- - just let the exception from underlying layers pass to
applicationpublic void remove(DatabaseModel dbInfo)
protected void createIndices(TableDefinition ti)
protected void createTables(SchemaDefinition schemInfo)
protected void generateAccessRights(TableDefinition ti, Writer out, String defaultUser) throws IOException
IOException
protected void generateDBCreation(DatabaseModel dbInfo, Writer out) throws IOException
IOException
protected void generateIndexCreation(TableDefinition ti, Writer out) throws IOException
IOException
protected void generateSchemaCreation(DatabaseModel dbInfo, Writer out) throws IOException
IOException
protected void generateTableCreation(SchemaDefinition schemInfo, Writer out) throws IOException
IOException
protected void grantRights(TableDefinition ti, String defaultUser)
|
SRJRCFrames v0.1.296 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |