Package com.vaadin.addon.sqlcontainer

Examples of com.vaadin.addon.sqlcontainer.ColumnProperty$NotNullableException


    }

    protected Map<String, Object> generateColumnToValueMap(RowItem item) {
        Map<String, Object> columnToValueMap = new HashMap<String, Object>();
        for (Object id : item.getItemPropertyIds()) {
            ColumnProperty cp = (ColumnProperty) item.getItemProperty(id);
            /* Prevent "rownum" usage as a column name if MSSQL or ORACLE */
            if ((this instanceof MSSQLGenerator || this instanceof OracleGenerator)
                    && cp.getPropertyId().equalsIgnoreCase("rownum")) {
                continue;
            }
            Object value = cp.getValue() == null ? null : cp.getValue();
            /* Only include properties whose read-only status can be altered */
            if (cp.isReadOnlyChangeAllowed() && !cp.isVersionColumn()) {
                columnToValueMap.put(cp.getPropertyId(), value);
            }
        }
        return columnToValueMap;
    }
View Full Code Here


    }

    protected Map<String, Object> generateRowIdentifiers(RowItem item) {
        Map<String, Object> rowIdentifiers = new HashMap<String, Object>();
        for (Object id : item.getItemPropertyIds()) {
            ColumnProperty cp = (ColumnProperty) item.getItemProperty(id);
            /* Prevent "rownum" usage as a column name if MSSQL or ORACLE */
            if ((this instanceof MSSQLGenerator || this instanceof OracleGenerator)
                    && cp.getPropertyId().equalsIgnoreCase("rownum")) {
                continue;
            }
            Object value = cp.getValue() == null ? null : cp.getValue();
            if (!cp.isReadOnlyChangeAllowed() || cp.isVersionColumn()) {
                rowIdentifiers.put(cp.getPropertyId(), value);
            }
        }
        return rowIdentifiers;
    }
View Full Code Here

        }
        return result;
    }

    private void setVersionColumnFlagInProperty(RowItem row) {
        ColumnProperty versionProperty = (ColumnProperty) row
                .getItemProperty(versionColumn);
        if (versionProperty != null) {
            versionProperty.setVersionColumn(true);
        }
    }
View Full Code Here

TOP

Related Classes of com.vaadin.addon.sqlcontainer.ColumnProperty$NotNullableException

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.