/*
 * Copyright 2012 Denis Neuling 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License. 
 */
package com.cloudcontrolled.api.model;

import java.util.UUID;

/**
 * Superclass of each wrapped response model.
 * 
 * @author Denis Neuling (denisneuling@gmail.com)
 * 
 */
public abstract class AbstractModel {

	protected UUID uuid = UUID.randomUUID();

	public UUID getUuid() {
		return uuid;
	}

//	@Override
//	public int hashCode() {
//		final int prime = 31;
//		int result = 1;
//		result = prime * result + ((uuid == null) ? 0 : uuid.hashCode());
//		return result;
//	}
//
//	@Override
//	public boolean equals(Object obj) {
//		if (this == obj)
//			return true;
//		if (obj == null)
//			return false;
//		if (getClass() != obj.getClass())
//			return false;
//		AbstractModel other = (AbstractModel) obj;
//		if (uuid == null) {
//			if (other.uuid != null)
//				return false;
//		} else if (!uuid.equals(other.uuid))
//			return false;
//		return true;
//	}
}

@@ -894,18 +894,16 @@
 id;%0A%09%7D%0A%0A
-//
 %09@Overri
@@ -897,34 +897,32 @@
 %0A%09%7D%0A%0A%09@Override%0A
-//
 %09public int hash
@@ -930,18 +930,16 @@
 ode() %7B%0A
-//
 %09%09final 
@@ -954,18 +954,16 @@
 e = 31;%0A
-//
 %09%09int re
@@ -972,18 +972,16 @@
 lt = 1;%0A
-//
 %09%09result
@@ -1040,18 +1040,16 @@
 ode());%0A
-//
 %09%09return
@@ -1061,18 +1061,12 @@
 lt;%0A
-//
 %09%7D%0A
-//%0A//
+%0A
 %09@Ov
@@ -1072,18 +1072,16 @@
 verride%0A
-//
 %09public 
@@ -1109,18 +1109,16 @@
  obj) %7B%0A
-//
 %09%09if (th
@@ -1128,18 +1128,16 @@
 == obj)%0A
-//
 %09%09%09retur
@@ -1144,18 +1144,16 @@
 n true;%0A
-//
 %09%09if (ob
@@ -1163,18 +1163,16 @@
 = null)%0A
-//
 %09%09%09retur
@@ -1180,18 +1180,16 @@
  false;%0A
-//
 %09%09if (ge
@@ -1216,18 +1216,16 @@
 lass())%0A
-//
 %09%09%09retur
@@ -1233,18 +1233,16 @@
  false;%0A
-//
 %09%09Abstra
@@ -1278,18 +1278,16 @@
 l) obj;%0A
-//
 %09%09if (uu
@@ -1300,18 +1300,16 @@
 null) %7B%0A
-//
 %09%09%09if (o
@@ -1327,18 +1327,16 @@
 = null)%0A
-//
 %09%09%09%09retu
@@ -1345,18 +1345,16 @@
  false;%0A
-//
 %09%09%7D else
@@ -1384,18 +1384,16 @@
 .uuid))%0A
-//
 %09%09%09retur
@@ -1401,18 +1401,16 @@
  false;%0A
-//
 %09%09return
@@ -1416,15 +1416,13 @@
 n true;%0A
-//
 %09%7D%0A%7D%0A

Extend and fix issue #3 https://github.com/denisneuling/cctrl.jar/issues/3