stefan      2004/07/02 09:24:50

  Modified:    proposals/jcrri/src/org/apache/slide/jcr/core/nodetype
                        ChildNodeDef.java ItemDef.java PropDef.java
  Log:
  jcrri
  
  Revision  Changes    Path
  1.6       +19 -2     
jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/nodetype/ChildNodeDef.java
  
  Index: ChildNodeDef.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/nodetype/ChildNodeDef.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ChildNodeDef.java 30 Jun 2004 14:39:24 -0000      1.5
  +++ ChildNodeDef.java 2 Jul 2004 16:24:50 -0000       1.6
  @@ -25,6 +25,8 @@
   
   import org.apache.slide.jcr.core.QName;
   
  +import java.util.Arrays;
  +
   /**
    * A <code>ChildNodeDef</code> ...
    *
  @@ -41,6 +43,21 @@
        * Default constructor.
        */
       public ChildNodeDef() {
  +    }
  +
  +    public boolean equals(Object obj) {
  +     if (this == obj) {
  +         return true;
  +     }
  +     if (obj instanceof ChildNodeDef) {
  +         ChildNodeDef other = (ChildNodeDef) obj;
  +         return super.equals(obj) &&
  +                 Arrays.equals(requiredPrimaryTypes, requiredPrimaryTypes) &&
  +                 (defaultPrimaryType == other.defaultPrimaryType ||
  +                 (defaultPrimaryType != null && 
defaultPrimaryType.equals(other.defaultPrimaryType))) &&
  +                 allowSameNameSibs == other.allowSameNameSibs;
  +     }
  +     return false;
       }
   
       /**
  
  
  
  1.5       +20 -2     
jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/nodetype/ItemDef.java
  
  Index: ItemDef.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/nodetype/ItemDef.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ItemDef.java      30 Jun 2004 14:39:24 -0000      1.4
  +++ ItemDef.java      2 Jul 2004 16:24:50 -0000       1.5
  @@ -50,6 +50,24 @@
        return super.clone();
       }
   
  +    public boolean equals(Object obj) {
  +     if (this == obj) {
  +         return true;
  +     }
  +     if (obj instanceof ItemDef) {
  +         ItemDef other = (ItemDef) obj;
  +         return (declaringNodeType == other.declaringNodeType ||
  +                 (declaringNodeType != null && 
declaringNodeType.equals(other.declaringNodeType))) &&
  +                 (name == other.name || (name != null && name.equals(other.name))) 
&&
  +                 autoCreate == other.autoCreate &&
  +                 onParentVersion == other.onParentVersion &&
  +                 writeProtected == other.writeProtected &&
  +                 mandatory == other.mandatory &&
  +                 primaryItem == other.primaryItem;
  +     }
  +     return false;
  +    }
  +
       public void setDeclaringNodeType(QName declaringNodeType) {
        this.declaringNodeType = declaringNodeType;
       }
  
  
  
  1.6       +19 -2     
jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/nodetype/PropDef.java
  
  Index: PropDef.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/nodetype/PropDef.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PropDef.java      30 Jun 2004 14:39:24 -0000      1.5
  +++ PropDef.java      2 Jul 2004 16:24:50 -0000       1.6
  @@ -46,6 +46,23 @@
       public PropDef() {
       }
   
  +    public boolean equals(Object obj) {
  +     if (this == obj) {
  +         return true;
  +     }
  +     if (obj instanceof PropDef) {
  +         PropDef other = (PropDef) obj;
  +         return super.equals(obj) &&
  +                 requiredType == other.requiredType &&
  +                 (valueConstraint == other.valueConstraint ||
  +                 (valueConstraint != null && 
valueConstraint.equals(other.valueConstraint))) &&
  +                 (defaultValue == other.defaultValue ||
  +                 (defaultValue != null && defaultValue.equals(other.defaultValue))) 
&&
  +                 multiple == other.multiple;
  +     }
  +     return false;
  +    }
  +
       /**
        * @param requiredType
        */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to