Package org.castor.ddlgen

Examples of org.castor.ddlgen.Configuration


    /**
     * {@inheritDoc}
     */
    public void generateHeader(final DDLWriter writer) {
        Configuration conf = getConfiguration();
       
        writer.println("/* ");
        writer.println(new Date());
        writer.println("Castor DDL Generator from mapping for Microsoft SQL Server");
        writer.println(conf.getStringValue(DDLGenConfiguration.HEADER_COMMENT_KEY, ""));
        writer.println("*/");
    }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public void toCreateDDL(final DDLWriter writer) throws GeneratorException {
        Configuration conf = getConfiguration();
        String engine = conf.getStringValue(DDLGenConfiguration.STORAGE_ENGINE_KEY, null);
        String delimiter = DDLGenConfiguration.DEFAULT_STATEMENT_DELIMITER;
       
        writer.println();
        writer.println();
        writer.println("CREATE TABLE {0} (", new Object[] {getName()});
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void toCreateDDL(final DDLWriter writer) {
        Configuration conf = getConfiguration();
       
        if (conf.getBoolValue(DDLGenConfiguration.GENERATE_DDL_FOR_SCHEMA_KEY, true)) {
            String schema = conf.getStringValue(DDLGenConfiguration.SCHEMA_NAME_KEY, "");
            if ((schema != null) && !"".equals(schema)) {
                writer.println("USE {0};", new Object[] {schema});
            }
        }
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void generateHeader(final DDLWriter writer) {
        Configuration conf = getConfiguration();
       
        writer.println("/* ");
        writer.println(new Date());
        writer.println("Castor DDL Generator from mapping for Sybase");
        writer.println(conf.getStringValue(DDLGenConfiguration.HEADER_COMMENT_KEY, ""));
        writer.println("*/");
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void generateHeader(final DDLWriter writer) {
        Configuration conf = getConfiguration();
       
        writer.println("# {0}", new Object[] {new Date()});
        writer.println("# Castor DDL Generator from mapping for MySQL");
        writer.println();
        writer.println(conf.getStringValue(DDLGenConfiguration.HEADER_COMMENT_KEY, ""));
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void toCreateDDL(final DDLWriter writer) {
        Configuration conf = getConfiguration();
        String del = conf.getStringValue(DDLGenConfiguration.FOREIGN_KEY_ON_DELETE_KEY, null);
        String upd = conf.getStringValue(DDLGenConfiguration.FOREIGN_KEY_ON_UPDATE_KEY, null);
        String delimiter = DDLGenConfiguration.DEFAULT_STATEMENT_DELIMITER;
       
        writer.println();
        writer.println();
        writer.println("ALTER TABLE {0}", new Object[] {getTable().getName()});
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void generateHeader(final DDLWriter writer) {
        Configuration conf = getConfiguration();
       
        writer.println("-- {0}", new Object[] {new Date()});
        writer.println("-- Castor DDL Generator from mapping for PostgreSQL");
        writer.println(conf.getStringValue(DDLGenConfiguration.HEADER_COMMENT_KEY, ""));
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void generateHeader(final DDLWriter writer) {
        Configuration conf = getConfiguration();
       
        writer.println("/* ");
        writer.println(new Date());
        writer.println("Castor DDL Generator from mapping for HSQL");
        writer.println(conf.getStringValue(DDLGenConfiguration.HEADER_COMMENT_KEY, ""));
        writer.println("*/");
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void generateHeader(final DDLWriter writer) {
        Configuration conf = getConfiguration();
       
        writer.println("/* ");
        writer.println(new Date());
        writer.println("Castor DDL Generator from mapping for SapDB");
        writer.println(conf.getStringValue(DDLGenConfiguration.HEADER_COMMENT_KEY, ""));
        writer.println("*/");
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void generateHeader(final DDLWriter writer) {
        Configuration conf = getConfiguration();
       
        writer.println("/* ");
        writer.println(new Date());
        writer.println("Castor DDL Generator from mapping for PointBase");
        writer.println(conf.getStringValue(DDLGenConfiguration.HEADER_COMMENT_KEY, ""));
        writer.println("*/");
    }
View Full Code Here

TOP

Related Classes of org.castor.ddlgen.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.