org.ow2.dragon.persistence.bo
Class BaseObject

java.lang.Object
  extended by org.ow2.dragon.persistence.bo.BaseObject
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Binding, BindingOperation, Endpoint, EnvironmentFederation, ExecutionEnvironmentManager, ManagedAgreement, MessageSpecification, Node, Party, Post, ProposedOperation, RoleOfParty, Service, ServiceDefinitionLanguageFile, ServiceInterface, SimpleFile, SpecifiedOperation, Standard, TechnicalService, VersionedSpecification

public abstract class BaseObject
extends java.lang.Object
implements java.io.Serializable

Base class for Model objects. Child objects should implement toString(), equals() and hashCode().

Author:
Matt Raible, Olivier Fabre
See Also:
Serialized Form

Constructor Summary
BaseObject()
           
 
Method Summary
abstract  boolean equals(java.lang.Object o)
          Compares object equality.
abstract  java.lang.String getId()
           
abstract  int hashCode()
          When you override equals, you should override hashCode.
abstract  void setId(java.lang.String id)
           
abstract  java.lang.String toString()
          Returns a multi-line String with key=value pairs.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseObject

public BaseObject()
Method Detail

getId

public abstract java.lang.String getId()

setId

public abstract void setId(java.lang.String id)

toString

public abstract java.lang.String toString()
Returns a multi-line String with key=value pairs.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this class.

equals

public abstract boolean equals(java.lang.Object o)
Compares object equality. When using Hibernate, the primary key should not be a part of this comparison.

Overrides:
equals in class java.lang.Object
Parameters:
o - object to compare to
Returns:
true/false based on equality tests

hashCode

public abstract int hashCode()
When you override equals, you should override hashCode. See "Why are equals() and hashCode() importation" for more information: http://www.hibernate.org/109.html

Overrides:
hashCode in class java.lang.Object
Returns:
hashCode


Copyright © 2008 eBMWebsourcing. All Rights Reserved.