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

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


     */
    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


  }

  if (elementType == null || elementType.isAssignableFrom(obj.getClass()))
  {
    // Mark the field as dirty
    StateManager stateManager = this.makeDirty();

    Object o = super.elementAt(index);
    super.setElementAt(obj, index);

    if (added.remove(o) == false)
View Full Code Here

    public synchronized void removeElementAt(int index) {

  throwUnsupportedOption();

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

  Object obj = super.elementAt(index);
        super.removeElementAt(index);
  if (added.remove(obj) == false)
    removed.add(obj);
View Full Code Here

        }

        if (elementType == null || elementType.isAssignableFrom(obj.getClass()))
        {
    // Mark the field as dirty
    StateManager stateManager = this.makeDirty();

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

        }

        if (elementType == null || elementType.isAssignableFrom(obj.getClass()))
        {
    // Mark the field as dirty
    StateManager stateManager = this.makeDirty();

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

 
        // Because java.util.Vector.removeElement(Object) calls internally removeElementAt(int)
        // which is not supported, we cannot rely on jdk. We need to process remove here.

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

        int i = super.indexOf(obj);
        if (i > -1) {
                super.removeElementAt(i);
View Full Code Here

     *
     * @see java.util.Vector
     */
    public synchronized void removeAllElements() {
  // Mark the field as dirty
  StateManager stateManager = this.makeDirty();

  for (Iterator iter = super.iterator(); iter.hasNext();) {
    Object o = iter.next();
    if (added.remove(o) == false)
      removed.add(o);
View Full Code Here

                return this.remove(index);
        }
        if (elementType == null || elementType.isAssignableFrom(element.getClass()))
        {
    // Mark the field as dirty
    StateManager stateManager = this.makeDirty();

    Object o = super.set(index, element);

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

        }

  if (elementType == null || elementType.isAssignableFrom(o.getClass()))
        {
    // Mark the field as dirty
    StateManager stateManager = this.makeDirty();

                if (removed.remove(o) == false)
      added.add(o);

          boolean modified = super.add(o);
View Full Code Here

    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

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.