Package org.openengsb.core.edbi.jdbc.sql

Examples of org.openengsb.core.edbi.jdbc.sql.PrimaryKeyConstraint


            String idProperty = Introspector.getOpenEngSBModelIdProperty(index.getModelClass());

            for (IndexField<?> field : index.getFields()) {
                if (field.getName().equals(idProperty)) {
                    table.addElement(new PrimaryKeyConstraint(field.getMappedName()));
                    break;
                }
            }
        }
View Full Code Here


        table = new Table("TEST",
            new Column("ID", new DataType("IDENTITY")),
            new Column("NAME", new DataType("VARCHAR")),
            new Column("AGE", new DataType("INT")));

        table.addElement(new PrimaryKeyConstraint("ID"));

        jdbc.execute("CREATE TABLE `TEST` (ID IDENTITY PRIMARY KEY, NAME VARCHAR, AGE INT)");
    }
View Full Code Here

        @Override
        protected void onAfterCreate(Table table, JdbcIndex<?> index) {
            super.onAfterCreate(table, index);

            table.addElement(new PrimaryKeyConstraint("REV_ID"));

            index.setHistoryTableName(table.getName());
        }
View Full Code Here

TOP

Related Classes of org.openengsb.core.edbi.jdbc.sql.PrimaryKeyConstraint

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.