Package org.apache.openjpa.jdbc.schema

Examples of org.apache.openjpa.jdbc.schema.Schema


                schemaName = Schemas.getNewTableSchema(_conf);
            if (schemaName == null)
                schemaName = schemas[i].getName();

            // create table in this group
            Schema schema = group.getSchema(schemaName);
            if (schema == null)
                schema = group.addSchema(schemaName);
           
            Table copy = schema.importTable(_pkColumn.getTable());
            // importTable() does not import unique constraints
            Unique[] uniques = _pkColumn.getTable().getUniques();
            for (Unique u : uniques) {
              copy.importUnique(u);
            }
View Full Code Here


       
        if (schemaName.length() == 0)
            schemaName = Schemas.getNewTableSchema(_conf);

        SchemaGroup group = new SchemaGroup();
        Schema schema = group.addSchema(schemaName);

        Table table = schema.addTable(tableName);
        _pkColumn = addPrimaryKeyColumn(table);
        PrimaryKey pk = table.addPrimaryKey();
        pk.addColumn(_pkColumn);

        DBDictionary dict = _conf.getDBDictionaryInstance();
View Full Code Here

            if (schemaName.length() == 0)
                schemaName = Schemas.getNewTableSchema(_conf);
        }

        // create table in this group
        Schema schema = group.getSchema(schemaName);
        if (schema == null)
            schema = group.addSchema(schemaName);
        schema.importSequence(_seq);
    }
View Full Code Here

                schemaName = Schemas.getNewTableSchema(_conf);
        }

        // build the sequence in one of the designated schemas
        SchemaGroup group = new SchemaGroup();
        Schema schema = group.addSchema(schemaName);

        _seq = schema.addSequence(seqName);
        _seq.setInitialValue(_initial);
        _seq.setIncrement(_increment);
        _seq.setAllocate(_allocate);
    }
View Full Code Here

                schemaName = Schemas.getNewTableSchema(_conf);
            if (schemaName == null)
                schemaName = schemas[i].getName();

            // create table in this group
            Schema schema = group.getSchema(schemaName);
            if (schema == null)
                schema = group.addSchema(schemaName);
           
            schema.importTable(_pkColumn.getTable());
            // we need to reset the table name in the column with the
            // fully qualified name for matching the table name from the
            // Column.
            _pkColumn.resetTableName(schemaName + "."
                    + _pkColumn.getTableName());
View Full Code Here

        String schemaName = Strings.getPackageName(_table);
        if (schemaName.length() == 0)
            schemaName = Schemas.getNewTableSchema(_conf);

        SchemaGroup group = new SchemaGroup();
        Schema schema = group.addSchema(schemaName);

        Table table = schema.addTable(tableName);
        _pkColumn = addPrimaryKeyColumn(table);
        PrimaryKey pk = table.addPrimaryKey();
        pk.addColumn(_pkColumn);

        DBDictionary dict = _conf.getDBDictionaryInstance();
View Full Code Here

TOP

Related Classes of org.apache.openjpa.jdbc.schema.Schema

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.