@Entity @AbstractEntityValid public abstract class AbstractEntity extends Object implements Serializable
| Constructor and Description |
|---|
AbstractEntity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
Date |
getCreationDate() |
Long |
getId() |
Date |
getModificationDate() |
int |
hashCode() |
void |
setId(Long id) |
String |
toString() |
void |
updateTimeStamps() |
boolean |
validate(javax.validation.ConstraintValidatorContext context)
Template method that validates the state of an
AbstractEntity. |
protected void |
violation(javax.validation.ConstraintValidatorContext context,
String message)
Convenience method for adding a ConstraintViolation to the given context.
|
public Long getId()
public void setId(Long id)
id - the id to setpublic boolean validate(javax.validation.ConstraintValidatorContext context)
AbstractEntity. Can
be used prior to saving/ updating the AbstractEntitycontext - the ConstraintValidatorContextprotected void violation(javax.validation.ConstraintValidatorContext context,
String message)
context - the ConstraintValidatorContextmessage - the message to attach to the violationpublic void updateTimeStamps()
public Date getCreationDate()
public Date getModificationDate()
Copyright © 2012–2013 SURFnet bv, The Netherlands. All rights reserved.