Examples of PropertyException


Examples of org.apache.cayenne.reflect.PropertyException

    public Object readPropertyDirectly(Object object) throws PropertyException {
        try {
            return toDataObject(object).readPropertyDirectly(getName());
        }
        catch (Throwable th) {
            throw new PropertyException(
                    "Error reading DataObject property: " + getName(),
                    this,
                    object,
                    th);
        }
View Full Code Here

Examples of org.apache.cayenne.reflect.PropertyException

            throws PropertyException {
        try {
            toDataObject(object).writePropertyDirectly(getName(), newValue);
        }
        catch (Throwable th) {
            throw new PropertyException(
                    "Error writing DataObject property: " + getName(),
                    this,
                    object,
                    th);
        }
View Full Code Here

Examples of org.apache.cayenne.reflect.PropertyException

    protected final DataObject toDataObject(Object object) throws PropertyException {
        try {
            return (DataObject) object;
        }
        catch (ClassCastException e) {
            throw new PropertyException("Object is not a DataObject: '"
                    + object.getClass().getName()
                    + "'", this, object, e);
        }
    }
View Full Code Here

Examples of org.apache.cayenne.reflect.PropertyException

            DataObject dataObject = (DataObject) object;
            return dataObject.readPropertyDirectly(propertyName);
        }
        catch (ClassCastException e) {
            throw new PropertyException("Object is not a DataObject: '"
                    + object.getClass().getName()
                    + "'", this, object, e);
        }
        catch (Throwable th) {
            throw new PropertyException("Error reading DataObject property: "
                    + propertyName, this, object, th);
        }

        // TODO - see TODO in 'setValue'
    }
View Full Code Here

Examples of org.apache.cayenne.reflect.PropertyException

        try {
            ((DataObject) object).writePropertyDirectly(propertyName, newValue);
        }
        catch (ClassCastException e) {
            throw new PropertyException("Object is not a DataObject: '"
                    + object.getClass().getName()
                    + "'", this, object, e);
        }
        catch (Throwable th) {
            throw new PropertyException("Error reading DataObject property: "
                    + propertyName, this, object, th);
        }

        // TODO, Andrus, 1/22/2006 - check for the right type? DataObject never did it
        // itself... Doing a check (and a conversion) may be an easy way to fix CAY-399
View Full Code Here

Examples of org.apache.cayenne.reflect.PropertyException

                    getName(),
                    toDataObject(target),
                    setReverse);
        }
        catch (Throwable th) {
            throw new PropertyException("Error setting to-one DataObject property: "
                    + getName(), this, source, th);
        }
    }
View Full Code Here

Examples of org.apache.cayenne.reflect.PropertyException

                    getName(),
                    toDataObject(target),
                    setReverse);
        }
        catch (Throwable th) {
            throw new PropertyException("Error setting to-many DataObject property: "
                    + getName(), this, source, th);
        }
    }
View Full Code Here

Examples of org.apache.cayenne.reflect.PropertyException

                    getName(),
                    toDataObject(target),
                    setReverse);
        }
        catch (Throwable th) {
            throw new PropertyException("Error unsetting to-many DataObject property: "
                    + getName(), this, source, th);
        }
    }
View Full Code Here

Examples of org.apache.cayenne.reflect.PropertyException

     * implements Persistent interface.
     */
    protected ValueHolder createValueHolder(Object object) throws PropertyException {
        if (!(object instanceof Persistent)) {

            throw new PropertyException(
                    "ValueHolders for non-persistent objects are not supported.",
                    this,
                    object);
        }

View Full Code Here

Examples of org.apache.cayenne.reflect.PropertyException

    @Override
    protected ValueHolder createCollectionValueHolder(Object object)
            throws PropertyException {
        if (!(object instanceof Persistent)) {

            throw new PropertyException(
                    "ValueHolders for non-persistent objects are not supported.",
                    this,
                    object);
        }
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.