pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.util.entity
Class AbstractBasicEntity

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AbstractAggregation, AbstractNamedEntity, AbstractQuestion, AbstractRegexVersionedCounter, AbstractResolution, AbstractTypedAnswer, AbstractValue, Address, ChangeEmailRequest, ChangePasswordRequest, CommandBuilder, CommandMatcher, ContentLocalizationMap, CountryHitCounter, Customer, DispatchData, DispatchType, Node, Order, OrderContents, OrderDetails, OrderMetaData, OrderPosition, Page, Parameter, PaymentData, PaymentMethod, PIRecord, PIRecordCountAggregationHitCounter, PreliminaryUser, Price, Price, Questionnaire, Selection, ShopSettings, StatisticsServer, Survey, TaxRate, TotalPrice, TotalPrice.Quota

@MappedSuperclass
public abstract class AbstractBasicEntity
extends java.lang.Object
implements java.io.Serializable

The most basic default implementation for entities used in pulse, containing a generated id and #equals(Object), #hashCode() and #compareTo(AbstractBasicEntity) methods.

Version:
$Revision: 1408 $
Author:
Christian Schatt, Daniel Dietz, Thomas Weber
See Also:
Serialized Form

Constructor Summary
AbstractBasicEntity()
           
 
Method Summary
 int compareTo(AbstractBasicEntity object)
          Compares this AbstractBasicEntity to the parameter object, and either returns an int as the result of the comparison, or throws a ClassCastException.
 boolean equals(java.lang.Object object)
          Checks if this AbstractBasicEntity is equal to the parameter object.
protected  java.lang.String getFullQualifiedClassNameJAXB()
          Deprecated. 
 java.lang.Long getId()
          Returns the unique, generated Id of this AbstractBasicEntity .
 int hashCode()
          Returns a hashCode for this AbstractBasicEntity.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBasicEntity

public AbstractBasicEntity()
Method Detail

getId

public final java.lang.Long getId()
Returns the unique, generated Id of this AbstractBasicEntity .

Returns:
the Id of this AbstractBasicEntity

getFullQualifiedClassNameJAXB

@Deprecated
protected final java.lang.String getFullQualifiedClassNameJAXB()
Deprecated. 

For JAXB only.

The FQN for evaluation in XSL:

 return getClass().getCanonicalName();
 

Returns:
the FQN

compareTo

public final int compareTo(AbstractBasicEntity object)
Compares this AbstractBasicEntity to the parameter object, and either returns an int as the result of the comparison, or throws a ClassCastException.

Parameters:
object - the AbstractBasicEntity to be compared to this AbstractBasicEntity
Returns:
-1, 0, or 1 as this AbstractBasicEntity is less than, equal to, or greater than the parameter object

equals

public boolean equals(java.lang.Object object)
Checks if this AbstractBasicEntity is equal to the parameter object.

Overrides:
equals in class java.lang.Object
Parameters:
object - the Object to be checked for equality with this AbstractBasicEntity
Returns:
true if the parameter object is not null and equals this AbstractBasicEntity, else false

hashCode

public int hashCode()
Returns a hashCode for this AbstractBasicEntity.

Overrides:
hashCode in class java.lang.Object
Returns:
a hashCode for this AbstractBasicEntity
See Also:
hashCode()