Package com.sun.jdo.spi.persistence.support.sqlstore

Examples of com.sun.jdo.spi.persistence.support.sqlstore.StateManager


    public synchronized Object remove(int index) {

  throwUnsupportedOption();

  // Mark the field as dirty
  StateManager stateManager = this.makeDirty();

        Object obj = super.remove(index);

        if (added.remove(obj) == false)
    removed.add(obj);
View Full Code Here


                                "sco.classcastexception", elementType.getName()), // NOI18N
         new ClassCastException(), errc.toArray());
  }

  // Mark the field as dirty
  StateManager stateManager = this.makeDirty();

        removed.removeAll(c);
  added.addAll(c);

  boolean modified = super.addAll(c);
View Full Code Here

     * @see java.util.Vector
     */  
    public synchronized boolean removeAll(Collection c) {
        boolean modified = false;
  // Mark the field as dirty
  StateManager stateManager = this.makeDirty();

        Iterator e = c.iterator();
        while (e.hasNext()) {
                Object o = e.next();
                if(super.contains(o)) {
View Full Code Here

                                "sco.classcastexception", elementType.getName()), // NOI18N
         new ClassCastException(), errc.toArray());
        }

  // Mark the field as dirty
  StateManager stateManager = this.makeDirty();

        removed.removeAll(c);
        added.addAll(c);

        boolean modified = super.addAll(index, c);
View Full Code Here

    public synchronized boolean retainAll(Collection c)  {
  boolean modified = false;
        java.util.Vector v = new java.util.Vector();

  // Mark the field as dirty
  StateManager stateManager = this.makeDirty();

        for (Iterator iter = super.iterator(); iter.hasNext();)
        {
                Object o = iter.next();
                if (!c.contains(o))
View Full Code Here

     */
    public StateManager makeDirty()
    {
  if (owner != null)
  {
                StateManager stateManager = owner.jdoGetStateManager();
                if (stateManager != null)
                {
                        stateManager.makeDirty(fieldName);
                }
                return stateManager;
  }
  return null;
View Full Code Here

     */
    public StateManager makeDirty()
    {
    if (owner != null)
    {
      StateManager stateManager = owner.jdoGetStateManager();

      if (stateManager != null)
      {
        PersistenceManager pm = (PersistenceManager) stateManager.getPersistenceManagerInternal();

        pm.acquireShareLock();
       
        try
        {
          synchronized (stateManager)
          {
            //
            // Need to recheck owner because it could be set to
            // null before we lock the stateManager.
            //
            if (owner != null)
            {
              stateManager.makeDirty(fieldName);
              return stateManager;
            }
          }
        }
        finally
View Full Code Here

     */
    public StateManager makeDirty()
    {
    if (owner != null)
    {
      StateManager stateManager = owner.jdoGetStateManager();
     
      if (stateManager != null)
      {
        PersistenceManager pm = (PersistenceManager) stateManager.getPersistenceManagerInternal();

        pm.acquireShareLock();
       
        try
        {
          synchronized (stateManager)
          { 
            //
            // Need to recheck owner because it could be set to
            // null before we lock the stateManager.
            //
            if (owner != null)
            {
              stateManager.makeDirty(fieldName);
              return stateManager;
            }
          }
        }
        finally
View Full Code Here

                                       new ClassCastException(), new Object[] {o});
        }

        if (owner != null)
        {
            StateManager stateManager = owner.jdoGetStateManager();

            if (stateManager != null)
            {
                PersistenceManager pm = (PersistenceManager) stateManager.getPersistenceManagerInternal();

                pm.acquireShareLock();

                boolean modified = false;

                try
                {
                    pm.acquireFieldUpdateLock();
                    try
                    {
                       // Mark the field as dirty
                       stateManager.makeDirty(fieldName);

                       modified = super.add(o);

                       if (modified)
                       {
                           if (removed.remove(o) == false)
                           {
                               added.add(o);
                           }
                           stateManager.applyUpdates(fieldName, this);
                       }
                       return modified;
                    }
                    finally
                    {
View Full Code Here

                            messages,
                            "jdo.versionconsistencycacheimpl.put.entering", // NOI18N
                            new Object[] {pcType, oid, sm}));
        }

        StateManager rc = null;
        VCCache oid2sm = null;
        synchronized (pcTypeMap) {
            oid2sm = (VCCache) pcTypeMap.get(pcType);
   
            if (null == oid2sm) {
View Full Code Here

TOP

Related Classes of com.sun.jdo.spi.persistence.support.sqlstore.StateManager

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.