Package org.objectweb.perseus.persistence.api

Examples of org.objectweb.perseus.persistence.api.State


        try {
            if (!(pn.getPNameManager() instanceof PBinder)) {
                pn = pnc.decodeAbstract(pn, tx.getConnectionHolder());               
            }
            if (validate) {
                State s = tx.lookup(pn);
                if (s != null && s != VirtualState.instance) {
                    return s.getCacheEntry();
                } else {
                    //Fetch an instance (new or from the cache)
                    CacheEntry ce = tpm.getObjectById(tx, pn);
                    //clear the state
                    tpm.refresh(tx, ce);
View Full Code Here


     * Plus version update.
     * @param state the state which must be attached to the transaction
     * @param mode the action that stared the binding: either read or write intention
     */
    public State bind(State state, Object oid, byte mode) {
        State old = super.bind(state, oid, mode);
        if(! (state instanceof VirtualState)){
            if (mode == BasicWorkingSet.WRITE_INTENTION) {
                StateItf sa = (StateItf) state;
                sa.speedoChangeVersion();
            }
View Full Code Here

                        context.getWorkingSet().lookup(pb.getPName()));
                flushed = true;
            }
            Object oid = pb.export(context);
            if (!flushed) {
                State s = context.getWorkingSet().lookup(oid);
                if (s != null) {
                    PBinding oldObj = (PBinding) s.getCacheEntry().getCeObject();
                    if (oldObj != obj) {
                        oldObj.write(context, (PAccessor) s);
                    }
                }
            }
View Full Code Here

                        context.getWorkingSet().lookup(pb.getPName()));
                flushed = true;
            }
            Object oid = pb.export(context, hints);
            if (!flushed) {
                State s = context.getWorkingSet().lookup(oid);
                if (s != null) {
                    PBinding oldObj = (PBinding) s.getCacheEntry().getCeObject();
                    if (oldObj != obj) {
                        oldObj.write(context, (PAccessor) s);
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.objectweb.perseus.persistence.api.State

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.