Package org.modeshape.jcr.query.validate.Schemata

Examples of org.modeshape.jcr.query.validate.Schemata.Column


        this.name = name;
        // Define the columns ...
        List<Column> columnList = new ArrayList<Column>();
        Map<String, Column> columnMap = new HashMap<String, Column>();
        for (Column column : columns) {
            Column old = columnMap.put(column.getName(), column);
            if (old != null) {
                columnList.set(columnList.indexOf(old), column);
            } else {
                columnList.add(column);
            }
View Full Code Here


        List<Column> newColumns = new LinkedList<Column>(this.getColumns());
        List<Column> selectStarColumns = new LinkedList<Column>(this.selectStarColumns);
        Map<String, Column> selectStarColumnMap = new HashMap<String, Column>(this.selectStarColumnsByName);
        Map<String, Column> columnMap = new HashMap<String, Column>(columnsByName);
        for (Column column : columns) {
            Column newColumn = new ImmutableColumn(column.getName(), column.getPropertyTypeName(), column.getRequiredType(),
                                                   column.isFullTextSearchable(), column.isOrderable(), column.getMinimum(),
                                                   column.getMaximum(), column.getOperators());
            newColumns.add(newColumn);
            Column existing = columnMap.put(newColumn.getName(), newColumn);
            if (existing != null) {
                newColumns.remove(existing);
                if (selectStarColumnMap.containsKey(existing.getName())) {
                    // The old column was in the SELECT * list, so the new one should be, too...
                    selectStarColumnMap.put(newColumn.getName(), newColumn);
                    selectStarColumns.add(newColumn);
                }
            }
View Full Code Here

        return !extraColumns ? this : new ImmutableTable(name, columnsByName, columns, keys, false, selectStarColumnsByName,
                                                         selectStarColumns);
    }

    public ImmutableTable withColumnNotInSelectStar( String name ) {
        Column column = columnsByName.get(name);
        if (column == null) return this;
        if (!getSelectAllColumnsByName().containsKey(name)) {
            return this; // already not in select *
        }
        List<Column> selectStarColumns = new LinkedList<Column>(this.selectStarColumns);
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.query.validate.Schemata.Column

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.