|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.deltava.beans.DatabaseBean
public abstract class DatabaseBean
A common abstract class for beans stored in the database with a numeric primary key.
| Constructor Summary | |
|---|---|
DatabaseBean()
|
|
| Method Summary | |
|---|---|
Object |
cacheKey()
Returns the cache key for use in Form/DAO caches. |
int |
compareTo(Object o)
Compares two database beans by comparing their IDs. |
boolean |
equals(Object o)
Tests for equality by comparing the class and database ID. |
String |
getHexID()
Returns the database ID of this bean, formatted to a hexadecimal string. |
int |
getID()
Return the database ID of this bean. |
int |
hashCode()
Returns the hash code of the database ID. |
void |
setID(int id)
Update the database row ID of this bean. |
static void |
validateID(int oldID,
int newID)
Validates a database ID. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DatabaseBean()
| Method Detail |
|---|
public int getID()
public String getHexID()
public void setID(int id)
id - The primary key of the entry in the database that corresponds to this object.
IllegalArgumentException - if the database ID is negative
IllegalStateException - if we are attempting to change the database IDvalidateID(int, int)
public static void validateID(int oldID,
int newID)
throws IllegalArgumentException,
IllegalStateException
oldID - the old database IDnewID - the new database ID
IllegalArgumentException - if the database ID is negative
IllegalStateException - if we are attempting to change the database IDpublic boolean equals(Object o)
equals in class Objecto - the object to compare with
public int compareTo(Object o)
compareTo in interface Comparable<Object>Comparable.compareTo(Object)public Object cacheKey()
cacheKey in interface Cacheablepublic int hashCode()
hashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||