Package org.apache.cayenne.reflect

Examples of org.apache.cayenne.reflect.ClassDescriptor.createObject()


            }

            // create and register a hollow object
            ClassDescriptor descriptor = getEntityResolver().getClassDescriptor(
                    id.getEntityName());
            Persistent localObject = (Persistent) descriptor.createObject();

            localObject.setObjectContext(this);
            localObject.setObjectId(id);

            getGraphManager().registerNode(id, localObject);
View Full Code Here


        synchronized (graphManager) {
            T object = (T) graphManager.getNode(id);

            // merge into an existing object
            if (object == null) {
                object = (T) descriptor.createObject();
                object.setObjectContext(context);
                object.setObjectId(id);

                if (peerState == PersistenceState.HOLLOW) {
                    object.setPersistenceState(PersistenceState.HOLLOW);
View Full Code Here

        ClassDescriptor descriptor = getEntityResolver().getClassDescriptor(
                id.getEntityName());

        Persistent object;
        synchronized (graphManager) {
            object = (Persistent) descriptor.createObject();

            object.setPersistenceState(PersistenceState.HOLLOW);
            object.setObjectContext(this);
            object.setObjectId(id);
View Full Code Here

                    + persistentClass);
        }

        ClassDescriptor descriptor = getEntityResolver().getClassDescriptor(
                entity.getName());
        T object = (T) descriptor.createObject();
        descriptor.injectValueHolders(object);
        registerNewObject((Persistent) object, entity.getName(), descriptor);
        return object;
    }
View Full Code Here

            // 'objectFromAnotherContext' is a valid ID either in the parent context or in
            // the DB. This essentially defers possible FaultFailureExceptions.

            ClassDescriptor descriptor = getEntityResolver().getClassDescriptor(
                    id.getEntityName());
            Persistent persistent = (Persistent) descriptor.createObject();

            persistent.setObjectContext(this);
            persistent.setObjectId(id);
            persistent.setPersistenceState(PersistenceState.HOLLOW);
View Full Code Here

                // hierarchy
                // this context is.

                Persistent localObject;

                localObject = (Persistent) descriptor.createObject();

                localObject.setObjectContext(this);
                localObject.setObjectId(id);

                getGraphManager().registerNode(id, localObject);
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.