tudresden.ocl.sql
Class SchemaGenerator
java.lang.Object
tudresden.ocl.sql.SchemaGenerator
- All Implemented Interfaces:
- SQLDirector
- public class SchemaGenerator
- extends Object
- implements SQLDirector
Implementation of SQLDirector
uses the data provided by an Implementation of the ORMapping
interface to generate SQL-scripts for creating database tables
according to the SQL DDL provided
The actual SQL code depends on the SQLBuilder that must be provided to the SchemaGenerator.
- Version:
- 2.0 (reimplemented a non-startable version, using new features of Tables)
- Author:
- Andrea Kling
- See Also:
SQLBuilder
,
Table
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mapping
private ORMapping mapping
builder
private SQLBuilder builder
SchemaGenerator
public SchemaGenerator(ORMapping mapping,
SQLBuilder builder)
- Parameters:
mapping
- the object relational mapping informationbuilder
- an SQLBuilder providing information on the SQL DDL
for construction of SQL scripts
setBuilder
public void setBuilder(SQLBuilder builder)
- Specified by:
setBuilder
in interface SQLDirector
- Parameters:
builder
- an SQLBuilder providing information on the SQL DDL
for construction of SQL scripts
construct
public void construct()
- initiates the construction of the SQL script
- Specified by:
construct
in interface SQLDirector
getCode
public String getCode()
- returns the SQL script
- Specified by:
getCode
in interface SQLDirector
- Returns:
- the resulting SQL code from the construction process
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.