Package org.bedework.synch.db
Class DbItem<T>
- java.lang.Object
-
- org.bedework.synch.db.DbItem<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
Serializable,Comparable<T>
- Direct Known Subclasses:
IpAddrInfo,SubscriptionImpl
public class DbItem<T> extends Object implements Comparable<T>, Serializable
Simple base class for database entities- Author:
- Mike Douglass
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DbItem()null constructor for hibernate
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()Make visibleintcompareTo(T o)booleanequals(Object o)LonggetId()IntegergetSeq()Get the entity seqinthashCode()voidsetId(Long val)voidsetSeq(Integer val)Set the seq for this entityprotected org.bedework.util.misc.ToStringtoStringSegment(org.bedework.util.misc.ToString ts)Add our stuff to the StringBuilderbooleanunsaved()
-
-
-
Method Detail
-
setId
public void setId(Long val)
- Parameters:
val-
-
getId
public Long getId()
- Returns:
- Long id
-
unsaved
public boolean unsaved()
- Returns:
- true if this entity is not saved.
-
setSeq
public void setSeq(Integer val)
Set the seq for this entity- Parameters:
val- int seq
-
getSeq
public Integer getSeq()
Get the entity seq- Returns:
- int the entity seq
-
toStringSegment
protected org.bedework.util.misc.ToString toStringSegment(org.bedework.util.misc.ToString ts)
Add our stuff to the StringBuilder- Parameters:
ts- ToString builder for result
-
clone
public Object clone()
Make visible
-
compareTo
public int compareTo(T o)
- Specified by:
compareToin interfaceComparable<T>
-
-