Package org.castor.ddlgen

Examples of org.castor.ddlgen.DDLGenConfiguration


     * {@inheritDoc}
     */
    protected void setUp() throws Exception {
        super.setUp();
       
        DDLGenConfiguration conf = new DDLGenConfiguration();
        conf.addProperties("org/castor/ddlgen/test/config/ddlgen.properties");
        conf.addProperties("org/castor/ddlgen/test/config/mysql.properties");
        setGenerator(new MysqlGenerator(conf));

        KeyGeneratorRegistry keyGenRegistry = new KeyGeneratorRegistry(conf);
        getGenerator().setKeyGenRegistry(keyGenRegistry);
       
View Full Code Here


     * {@inheritDoc}
     */
    protected void setUp() throws Exception {
        super.setUp();
       
        DDLGenConfiguration conf = new DDLGenConfiguration();
        conf.addProperties("org/castor/ddlgen/test/config/ddlgen.properties");
        conf.addProperties("org/castor/ddlgen/test/config/mssql.properties");
        setGenerator(new MssqlGenerator(conf));

        KeyGeneratorRegistry keyGenRegistry = new KeyGeneratorRegistry(conf);
        getGenerator().setKeyGenRegistry(keyGenRegistry);
       
View Full Code Here

     * {@inheritDoc}
     */
    protected void setUp() throws Exception {
        super.setUp();
       
        DDLGenConfiguration conf = new DDLGenConfiguration();
        conf.addProperties("org/castor/ddlgen/test/config/ddlgen.properties");
        conf.addProperties("org/castor/ddlgen/test/config/oracle.properties");
        setGenerator(new OracleGenerator(conf));

        KeyGeneratorRegistry keyGenRegistry = new KeyGeneratorRegistry(conf);
        getGenerator().setKeyGenRegistry(keyGenRegistry);
       
View Full Code Here

     */
    public final void testSingleTable() {
        try {
            loadData("single_table.xml");

            DDLGenConfiguration conf = _generator.getConfiguration();
            Object[] params = new Object[] {
                    conf.getStringValue(PARAM_PREFIX + "integer" + PARAM_PRECISION, ""),
                    conf.getStringValue(PARAM_PREFIX + "char" + PARAM_LENGTH, "") };
           
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            DDLWriter writer = new DDLWriter(out, conf);
           
            _generator.generateCreate(writer);
View Full Code Here

     */
    public final void testIgnoredTable() {
        try {
            loadData("ignored_table.xml");

            DDLGenConfiguration conf = _generator.getConfiguration();
            Object[] params = new Object[] {
                    conf.getInteger(PARAM_PREFIX + "integer" + PARAM_PRECISION),
                    conf.getInteger(PARAM_PREFIX + "char" + PARAM_LENGTH) };

            ByteArrayOutputStream out = new ByteArrayOutputStream();
            DDLWriter writer = new DDLWriter(out, conf);
           
            _generator.generateCreate(writer);
View Full Code Here

     */
    public final void testNoTable() {
        try {
            loadData("no_table.xml");

            DDLGenConfiguration conf = _generator.getConfiguration();
            Object[] params = new Object[] {
                    conf.getInteger(PARAM_PREFIX + "integer" + PARAM_PRECISION),
                    conf.getInteger(PARAM_PREFIX + "char" + PARAM_LENGTH) };

            ByteArrayOutputStream out = new ByteArrayOutputStream();
            DDLWriter writer = new DDLWriter(out, conf);
           
            _generator.generateCreate(writer);
View Full Code Here

     */
    public final void testClassId() {
        try {
            loadData("class_id.xml");

            DDLGenConfiguration conf = _generator.getConfiguration();
            Object[] params = new Object[] {
                    conf.getInteger(PARAM_PREFIX + "integer" + PARAM_PRECISION),
                    conf.getInteger(PARAM_PREFIX + "char" + PARAM_LENGTH) };

            ByteArrayOutputStream out = new ByteArrayOutputStream();
            DDLWriter writer = new DDLWriter(out, conf);
           
            _generator.generateCreate(writer);
View Full Code Here

     */
    public final void testClassMultipleId() {
        try {
            loadData("class_multiple_id.xml");

            DDLGenConfiguration conf = _generator.getConfiguration();
            Object[] params = new Object[] {
                    conf.getInteger(PARAM_PREFIX + "integer" + PARAM_PRECISION),
                    conf.getInteger(PARAM_PREFIX + "char" + PARAM_LENGTH) };
           
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            DDLWriter writer = new DDLWriter(out, conf);
           
            _generator.generateCreate(writer);
View Full Code Here

     */
    public final void testFieldId() {
        try {
            loadData("field_id.xml");

            DDLGenConfiguration conf = _generator.getConfiguration();
            Object[] params = new Object[] {
                    conf.getInteger(PARAM_PREFIX + "integer" + PARAM_PRECISION),
                    conf.getInteger(PARAM_PREFIX + "char" + PARAM_LENGTH) };
           
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            DDLWriter writer = new DDLWriter(out, conf);
           
            _generator.generateCreate(writer);
View Full Code Here

     */
    public final void testFieldMultipleId() {
        try {
            loadData("field_multiple_id.xml");

            DDLGenConfiguration conf = _generator.getConfiguration();
            Object[] params = new Object[] {
                    conf.getInteger(PARAM_PREFIX + "integer" + PARAM_PRECISION),
                    conf.getInteger(PARAM_PREFIX + "char" + PARAM_LENGTH) };
           
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            DDLWriter writer = new DDLWriter(out, conf);
           
            _generator.generateCreate(writer);
View Full Code Here

TOP

Related Classes of org.castor.ddlgen.DDLGenConfiguration

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.