add equals implementation to the two abstract types

git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization@171 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/AbstractComplexType.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/AbstractComplexType.java
index 5cd3798..2e41d79 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/AbstractComplexType.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/AbstractComplexType.java
@@ -1,17 +1,24 @@
 package edu.uci.ics.asterix.om.types;
 
+import edu.uci.ics.asterix.om.base.IAObject;
+
 public abstract class AbstractComplexType implements IAType {
 
-    private static final long serialVersionUID = 1L;
-    protected String typeName;
+	private static final long serialVersionUID = 1L;
+	protected String typeName;
 
-    public AbstractComplexType(String typeName) {
-        this.typeName = typeName;
-    }
+	public AbstractComplexType(String typeName) {
+		this.typeName = typeName;
+	}
 
-    @Override
-    public String getTypeName() {
-        return typeName;
-    }
+	@Override
+	public String getTypeName() {
+		return typeName;
+	}
+
+	@Override
+	public boolean equals(Object object) {
+		return this.deepEqual((IAObject) object);
+	}
 
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/BuiltinType.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/BuiltinType.java
index d289b01..3af6e6f 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/BuiltinType.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/types/BuiltinType.java
@@ -521,6 +521,11 @@
     }
 
     @Override
+    public boolean equals(Object object) {
+        return this.deepEqual((IAObject) object);
+    }
+
+    @Override
     public int hash() {
         return getType().getTypeTag().serialize();
     }