org.onebusaway.container.model
Class IdentityBean<T extends Serializable>
java.lang.Object
org.onebusaway.container.model.IdentityBean<T>
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- Place, StopSequence, StopSequenceCollection, User
public abstract class IdentityBean<T extends Serializable>
- extends Object
- implements Serializable
Convenience base class for objects that have an id property and whose object
equality is determined by that identi Defines abstract methods for getting
and setting the objects id while also define equals(Object)
and
hashCode()
based on the id value. Additionally, defines a
CacheableKey
key strategy based on the object id when the object is
used in as an argument in a method annotated with Cacheable
.
- Author:
- bdferris
- See Also:
- Serialized Form
IdentityBean
public IdentityBean()
getId
public abstract T getId()
setId
public abstract void setId(T id)
equals
public boolean equals(Object obj)
Object
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2012 OneBusAway. All Rights Reserved.