Examples of PrimaryKeyColumn


Examples of org.geotools.jdbc.PrimaryKeyColumn

            run("CREATE MULTISET TABLE \"ft3_geometry_idx\""
                    + " (id INTEGER NOT NULL, cellid INTEGER NOT NULL) PRIMARY INDEX (id)");
//                    + " (id INTEGER NOT NULL, cellid INTEGER NOT NULL)");
            run("CREATE HASH INDEX ft3_geometry_idx_idx (cellid) ON ft3_geometry_idx ORDER BY (cellid);");
            TeradataDialect d = new TeradataDialect(null);
            PrimaryKeyColumn col = new AutoGeneratedPrimaryKeyColumn("id", null);
            d.installTriggers(getDataSource().getConnection(),"ft3","geometry","ft3_geometry_idx",Arrays.asList(col));
           
            runSafe("DELETE FROM sysspatial.tessellation WHERE f_table_name = 'ft3'");
            run("INSERT INTO sysspatial.tessellation VALUES ("
                    + "'geotools',"
View Full Code Here

Examples of org.jboss.dna.common.jdbc.model.api.PrimaryKeyColumn

    }

    public void testAddColumn() {
        String COLUMN_NAME = "My column";
        // create column
        PrimaryKeyColumn column = new DefaultModelFactory().createPrimaryKeyColumn();
        // set name
        column.setName(COLUMN_NAME);
        // add column
        bean.addColumn(column);
        // check
        assertFalse("Column set should not be empty", bean.getColumns().isEmpty());
    }
View Full Code Here

Examples of org.jboss.dna.common.jdbc.model.api.PrimaryKeyColumn

    }

    public void testDeleteColumn() {
        String COLUMN_NAME = "My column";
        // create column
        PrimaryKeyColumn column = new DefaultModelFactory().createPrimaryKeyColumn();
        // set name
        column.setName(COLUMN_NAME);
        // add column
        bean.addColumn(column);
        // check
        assertFalse("Column set should not be empty", bean.getColumns().isEmpty());
View Full Code Here

Examples of org.jboss.dna.common.jdbc.model.api.PrimaryKeyColumn

    }

    public void testFindColumnByName() {
        String COLUMN_NAME = "My column";
        // create column
        PrimaryKeyColumn column = new DefaultModelFactory().createPrimaryKeyColumn();
        // set name
        column.setName(COLUMN_NAME);
        // add column
        bean.addColumn(column);

        // check
        assertSame("Unable to find column", column, bean.findColumnByName(COLUMN_NAME));
View Full Code Here

Examples of org.jboss.dna.common.jdbc.model.api.PrimaryKeyColumn

            if (failOnError && (tableColumn == null)) {
                throw new DatabaseMetaDataMethodException(errMessage, "populatePrimaryKey");
            }

            // create PK column
            PrimaryKeyColumn pkColumn = factory.createPrimaryKeyColumn();
            // check if we found the original table column
            if (tableColumn != null) {
                // mark original table column as part of PK
                tableColumn.setPrimaryKeyColumn(Boolean.TRUE);
                // clone properties from original table column to the pkcolumn
                PropertyUtils.copyProperties(pkColumn, tableColumn);
            } else { // recovery if table column is not found but we still want to create pk column
                // set name at least
                pkColumn.setName(columnName);
            }
            // modify ordinal position that correspond to the position in PK
            pkColumn.setOrdinalPosition(ordinalPosition);

            // add PK column to the primary key
            pk.addColumn(pkColumn);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.