Package javax.jdo.spi

Examples of javax.jdo.spi.PersistenceCapable$ObjectIdFieldManager


            if (oid == null)
            {               
                oid = new Identity(instance,broker);
            }
            broker.removeFromCache(instance);
            PersistenceCapable pc = (PersistenceCapable) broker.getObjectByIdentity(oid);

            JDOClass jdoClass = Helper.getJDOClass(pc.getClass());
            if (fieldNums == null)
            {
                fieldNums = jdoClass.getManagedFieldNumbers();
            }
View Full Code Here


     */
    public synchronized Object createObjectId(
        StateManagerInternal sm,
        PersistenceManagerInternal pm)
    {
        PersistenceCapable obj = sm.getObject();
        Identity oid = new Identity(obj, connector.getBroker());
        return oid;
    }
View Full Code Here

   
    public ObjectAdapter lazilyLoaded(Object pojo) {
        if(!(pojo instanceof PersistenceCapable)) {
            return null;
        }
        final PersistenceCapable persistenceCapable = (PersistenceCapable) pojo;
        return frameworkSynchronizer.lazilyLoaded(persistenceCapable, CalledFrom.OS_LAZILYLOADED);
    }
View Full Code Here

    @Override
    public void postLoad(final InstanceLifecycleEvent event) {
        withLogging(Phase.POST, event, new RunnableAbstract(event){
            @Override
            protected void doRun() {
                final PersistenceCapable pojo = Utils.persistenceCapableFor(event);
                synchronizer.postLoadProcessingFor(pojo, CalledFrom.EVENT_LOAD);
            }});
    }
View Full Code Here

    @Override
    public void postStore(InstanceLifecycleEvent event) {
        withLogging(Phase.POST, event, new RunnableAbstract(event){
            @Override
            protected void doRun() {
                final PersistenceCapable pojo = Utils.persistenceCapableFor(event);
                synchronizer.postStoreProcessingFor(pojo, CalledFrom.EVENT_STORE);

            }});
    }
View Full Code Here

    @Override
    public void preDirty(InstanceLifecycleEvent event) {
        withLogging(Phase.PRE, event, new RunnableAbstract(event){
            @Override
            protected void doRun() {
                final PersistenceCapable pojo = Utils.persistenceCapableFor(event);
                synchronizer.preDirtyProcessingFor(pojo, CalledFrom.EVENT_PREDIRTY);
            }});
    }
View Full Code Here

    public void preDelete(InstanceLifecycleEvent event) {

        withLogging(Phase.PRE, event, new RunnableAbstract(event){
            @Override
            protected void doRun() {
                final PersistenceCapable pojo = Utils.persistenceCapableFor(event);
                synchronizer.preDeleteProcessingFor(pojo, CalledFrom.EVENT_PREDELETE);
            }
        });
    }
View Full Code Here

    @Override
    public void postDelete(InstanceLifecycleEvent event) {
        withLogging(Phase.POST, event, new RunnableAbstract(event){
            @Override
            protected void doRun() {
                final PersistenceCapable pojo = Utils.persistenceCapableFor(event);
                synchronizer.postDeleteProcessingFor(pojo, CalledFrom.EVENT_POSTDELETE);
            }
        });
    }
View Full Code Here

            return events.get(code);
        }
    }

    private String logString(Phase phase, LoggingLocation location, InstanceLifecycleEvent event) {
        final PersistenceCapable pojo = Utils.persistenceCapableFor(event);
        final AdapterManager adapterManager = getAdapterManager();
        final ObjectAdapter adapter = adapterManager.getAdapterFor(pojo);
        return phase + " " + location.prefix + " " + LifecycleEventType.lookup(event.getEventType()) + ": oid=" + (adapter !=null? adapter.getOid(): "(null)") + " ,pojo " + pojo;
    }
View Full Code Here

    private class RunnableEnsureFrameworksInAgreement extends RunnableAbstract {
        RunnableEnsureFrameworksInAgreement(InstanceLifecycleEvent event) {
            super(event);
        }
        protected void doRun() {
            final PersistenceCapable pojo = Utils.persistenceCapableFor(event);
            synchronizer.ensureRootObject(pojo);
            synchronizer.ensureFrameworksInAgreement(pojo);
        }
View Full Code Here

TOP

Related Classes of javax.jdo.spi.PersistenceCapable$ObjectIdFieldManager

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.