Package com.vaadin.data.util.sqlcontainer

Examples of com.vaadin.data.util.sqlcontainer.ColumnProperty$NotNullableException


        }
        return result;
    }

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


    }

    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

    }

    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;
            }
            if (cp.isPersistent()) {
                columnToValueMap.put(cp.getPropertyId(), cp.getValue());
            }
        }
        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;
            }

            if (cp.isRowIdentifier()) {
                Object value;
                if (cp.isPrimaryKey()) {
                    // If the value of a primary key has changed, its old value
                    // should be used to identify the row (#9145)
                    value = cp.getOldValue();
                } else {
                    value = cp.getValue();
                }
                rowIdentifiers.put(cp.getPropertyId(), value);
            }
        }
        return rowIdentifiers;
    }
View Full Code Here

    }

    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;
            }
            if (cp.isPersistent()) {
                columnToValueMap.put(cp.getPropertyId(), cp.getValue());
            }
        }
        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;
            }

            if (cp.isRowIdentifier()) {
                Object value;
                if (cp.isPrimaryKey()) {
                    // If the value of a primary key has changed, its old value
                    // should be used to identify the row (#9145)
                    value = cp.getOldValue();
                } else {
                    value = cp.getValue();
                }
                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

    }

    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

TOP

Related Classes of com.vaadin.data.util.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.