FileDocCategorySizeDatePackage
DistributedFieldUpdate.javaAPI DocJBoss 4.2.12581Fri Jul 13 21:02:32 BST 2007org.jboss.aspects.versioned

DistributedFieldUpdate

public class DistributedFieldUpdate extends Object implements Serializable

Fields Summary
private static final long
serialVersionUID
protected Object
val
protected long
version
protected int
index
Constructors Summary
public DistributedFieldUpdate()


     
public DistributedFieldUpdate(Object val, long version, int index)

      setValue(val);
      this.version = version;
      this.index = index;
   
Methods Summary
public booleanequals(java.lang.Object obj)

      DistributedFieldUpdate update = (DistributedFieldUpdate)obj;
      return update.index == this.index;
   
public intgetFieldIndex()

 return index; 
public java.lang.ObjectgetNonDereferencedValue()

      return val;
   
public java.lang.ObjectgetValue()

 
      if (val instanceof VersionReference)
      {
         return ((VersionReference)val).get();
      }
      return val; 
   
public longgetVersionId()

 return version; 
public inthashCode()

      return index;
   
public voidsetValue(java.lang.Object newVal)

 
      if (newVal instanceof InstanceAdvised)
      {
         InstanceAdvised advised = (InstanceAdvised)newVal;
         GUID guid = VersionManager.getGUID(advised);
         if (guid != null)
         {
            // we are versioned
            val = new VersionReference(guid, advised);
            return;
         }
         
      }
      val = newVal; 
   
public voidsetVersionId(long newId)

 version = newId;