Package org.apache.cayenne.reflect

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


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

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

    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

            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

    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

            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

        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

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

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

TOP

Related Classes of org.apache.cayenne.reflect.PropertyException

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.