Package org.apache.cayenne

Examples of org.apache.cayenne.CayenneRuntimeException


                    List result = response.firstList();
                    if (result != null && !result.isEmpty()) {

                        if (result.size() > 1) {
                            throw new CayenneRuntimeException(
                                    "More than 1 row found for ObjectId "
                                            + oidQuery.getObjectId()
                                            + ". Fetch matched "
                                            + result.size()
                                            + " rows.");
View Full Code Here


        }

        QueryEngine node = domain.lookupDataNode(map);

        if (node == null) {
            throw new CayenneRuntimeException("No DataNode exists for DataMap " + map);
        }

        return node;
    }
View Full Code Here

            fullResponse.addResultList(dataRows);
        }
    }

    public void nextDataRows(Query q, ResultIterator it) {
        throw new CayenneRuntimeException("Invalid attempt to fetch a cursor.");
    }
View Full Code Here

            }
        }
    }

    public void nextQueryException(Query query, Exception ex) {
        throw new CayenneRuntimeException("Query exception.", Util.unwindException(ex));
    }
View Full Code Here

    public void nextQueryException(Query query, Exception ex) {
        throw new CayenneRuntimeException("Query exception.", Util.unwindException(ex));
    }

    public void nextGlobalException(Exception e) {
        throw new CayenneRuntimeException("Global exception.", Util.unwindException(e));
    }
View Full Code Here

    public void setParent(QueryEngine parent) {
        if (parent == null || parent instanceof DataChannel) {
            setChannel((DataChannel) parent);
        }
        else {
            throw new CayenneRuntimeException(
                    "Only parents that implement DataChannel are supported.");
        }
    }
View Full Code Here

            // to avoid unneeded fault triggering
            if (targetObject instanceof Fault) {
                DataRow storedSnapshot = getObjectStore().getSnapshot(
                        object.getObjectId());
                if (storedSnapshot == null) {
                    throw new CayenneRuntimeException(
                            "No matching objects found for ObjectId "
                                    + object.getObjectId()
                                    + ". Object may have been deleted externally.");
                }
View Full Code Here

        Iterator it = objects.iterator();
        while (it.hasNext()) {
            DataObject object = (DataObject) it.next();

            if (object == null) {
                throw new CayenneRuntimeException("Null object");
            }

            localObjects.add(localObject(object.getObjectId(), null));
        }
View Full Code Here

            boolean refresh,
            boolean resolveInheritanceHierarchy) {
        ObjEntity entity = this.getEntityResolver().lookupObjEntity(objectClass);

        if (entity == null) {
            throw new CayenneRuntimeException("Unmapped Java class: " + objectClass);
        }

        return objectsFromDataRows(entity, dataRows, refresh, resolveInheritanceHierarchy);
    }
View Full Code Here

        DataObject dataObject;
        try {
            dataObject = (DataObject) descriptor.createObject();
        }
        catch (Exception ex) {
            throw new CayenneRuntimeException("Error instantiating object.", ex);
        }

        // this will initialize to-many lists
        descriptor.injectValueHolders(dataObject);
View Full Code Here

TOP

Related Classes of org.apache.cayenne.CayenneRuntimeException

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.