|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.elca.el4j.services.persistence.generic.dto.AbstractIntOptimisticLockingDto
ch.elca.el4j.services.persistence.generic.dto.AbstractIntKeyIntOptimisticLockingDto
@MappedSuperclass public abstract class AbstractIntKeyIntOptimisticLockingDto
This class is an abstract dto which uses an integer as key value and also an integer for optimistic locking version controlling.
Constructor Summary | |
---|---|
AbstractIntKeyIntOptimisticLockingDto()
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
int |
getKey()
|
Object |
getKeyAsObject()
|
int |
hashCode()
|
boolean |
isKeyNew()
|
void |
resetNew()
Reset the key state to "new". |
void |
setKey(int key)
|
void |
setKey(Object keyObject)
Convenience method to set the key. |
void |
useGeneratedKey()
This method will be called when the primary key object is requested to generate a key object for himself. |
Methods inherited from class ch.elca.el4j.services.persistence.generic.dto.AbstractIntOptimisticLockingDto |
---|
getOptimisticLockingVersion, increaseOptimisticLockingVersion, setOptimisticLockingVersion |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ch.elca.el4j.services.persistence.generic.dto.OptimisticLockingObject |
---|
increaseOptimisticLockingVersion |
Constructor Detail |
---|
public AbstractIntKeyIntOptimisticLockingDto()
Method Detail |
---|
public int getKey()
public Object getKeyAsObject()
getKeyAsObject
in interface PrimaryKeyObject
null
if it does not
exist.public void setKey(int key)
key
- The key to set.public void setKey(Object keyObject)
Number
otherwise it will be rejected.
setKey
in interface PrimaryKeyObject
keyObject
- Is the key as object to set.public boolean isKeyNew()
isKeyNew
in interface PrimaryKeyObject
true
if the key has never be set by using
method setKey
.public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public void resetNew()
public void useGeneratedKey()
useGeneratedKey
in interface PrimaryKeyObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |