Package org.objectweb.jorm.api

Examples of org.objectweb.jorm.api.PBinding


    public String getProjectName() {
        return pcm.getProjectName();
    }

    public PBinding createPBinding() throws PException {
        PBinding pb = pcm.createPBinding();
        pb.init(this);
        return pb;
       
    }
View Full Code Here


  //IMPLEMENTATION OF THE StorageManager INTERFACE //
  //-----------------------------------------------//

    public Object export(ConnectionHolder context, Object obj) throws PersistenceException {
        PBinding pb = (PBinding) obj;
        try {
            boolean flushed = false;
            if (pb.getStatus() == PBinding.LIFECYCLE_DELTOWRITE) {
                pb.write(context, (PAccessor)
                        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);
                    }
                }
            }
            return oid;
        } catch (PException e) {
View Full Code Here

            throw new PersistenceException(e);
        }
    }

    public Object export(ConnectionHolder context, Object obj, Object hints) throws PersistenceException {
    PBinding pb = (PBinding) obj;
        try {
            boolean flushed = false;
            if (pb.getStatus() == PBinding.LIFECYCLE_DELTOWRITE) {
                pb.write(context, (PAccessor)
                        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);
                    }
                }
            }
            return oid;
        } catch (PException e) {
View Full Code Here

TOP

Related Classes of org.objectweb.jorm.api.PBinding

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.