Package org.jboss.dna.common.jdbc.model.api

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


    }

    public void testAddColumn() {
        String COLUMN_NAME = "My column";
        // create column
        IndexColumn column = new DefaultModelFactory().createIndexColumn();
        // 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


    }

    public void testDeleteColumn() {
        String COLUMN_NAME = "My column";
        // create column
        IndexColumn column = new DefaultModelFactory().createIndexColumn();
        // 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

    }

    public void testFindColumnByName() {
        String COLUMN_NAME = "My column";
        // create column
        IndexColumn column = new DefaultModelFactory().createIndexColumn();
        // 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

                    throw new DatabaseMetaDataMethodException(errMessage, "populateIndexes");

                }

                // create index column
                IndexColumn indexColumn = factory.createIndexColumn();

                // check if we found the original table column
                if (tableColumn != null) {
                    // mark original table column as part of index
                    tableColumn.setIndexColumn(Boolean.TRUE);
                    // clone properties from original table column to the index column
                    PropertyUtils.copyProperties(indexColumn, tableColumn);
                } else { // recovery if table column is not found but we still want to create index column
                    // set name at least
                    indexColumn.setName(indexColumnName);
                }
                // modify ordinal position that correspond to the position in index
                indexColumn.setOrdinalPosition(ordinalPosition);
                // sort sequence type
                indexColumn.setSortSequenceType(getSortSequenceType(ascOrDesc));

                // add index column to the index
                index.addColumn(indexColumn);
            }
View Full Code Here

TOP

Related Classes of org.jboss.dna.common.jdbc.model.api.IndexColumn

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.