Package org.objectweb.speedo.mim.api

Examples of org.objectweb.speedo.mim.api.PersistentObjectItf


  public boolean isFlushed(State state) {
    return ((StateItf) state).hasBeenFlush();
  }

  public void makeUnbound(CacheEntry ce) {
    PersistentObjectItf sp = (PersistentObjectItf) ce;
    sp.speedoIsActive(false);
    try {
            sp.init(null);
        } catch (PException e) {
            logger.log(BasicLevel.WARN, "Error during the unbinding: ", e);
        }
  }
View Full Code Here


        }
  }

  public void makeBound(CacheEntry ce, Object oid) {
    PName pname = (PName) oid;
    PersistentObjectItf sp = (PersistentObjectItf) ce;
    try {
            sp.bind(pname);
        } catch (PException e) {
            logger.log(BasicLevel.WARN, "Error during the binding: ", e);
        }
  }
View Full Code Here

   * @param id is the PName of the PersistentObjectItf
   * @param obj is the PersistentObjectItf instance added into the cache
   * @return the PersistentObjectItf instance
   */
  public FixableCacheEntry create(Object id, Object obj) {
    PersistentObjectItf sp =  (PersistentObjectItf) obj;
    PName pn = (PName) id;
    activePO(sp, pn);
    if (sp.getPName() == null || sp.getPName().isNull()) {
      try {
        pn.resolve(null);
        sp.bind(pn);
      } catch (PException e) {
        throw personality.newRuntimeException(
            "Impossible to bind the po to its persistent name: ", e);
      }
    }
View Full Code Here

    }
    if (!isAbstract() && clone == null){
      try {
        //instanciate the PersistentObjectItf clone
        clone = newSpeedoPOInstance(sp.getClass());
        PersistentObjectItf spClone = (PersistentObjectItf)clone;
        spClone.speedoSetEncodedPName(pm.getEncodedPName(sp));
        spClone.setCeAge(0);
        spClone.speedoIsActive(false);
        //instanciate the clone of the fields
        StateItf fieldsClone = sp.speedoCreateState();
        spClone.speedoSetReferenceState(fieldsClone);
        fieldsClone.setSpeedoPO(spClone);
        //put the association between the po and its clone into the map
        if(map != null)
          map.put(sp, clone);
        synchronized(fgHints){
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.mim.api.PersistentObjectItf

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.