org.surfnet.oaaas.model
Class AbstractEntity
java.lang.Object
org.surfnet.oaaas.model.AbstractEntity
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AccessToken, AuthorizationRequest, Client, ResourceServer
@Entity
@AbstractEntityValid
public abstract class AbstractEntity
- extends Object
- implements Serializable
Abstract class that serves as root for Model object (e.g. that are stored in
the repository)
- See Also:
- Serialized Form
AbstractEntity
public AbstractEntity()
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object other)
- Overrides:
equals in class Object
getId
public Long getId()
- Returns:
- the id
setId
public void setId(Long id)
- Parameters:
id - the id to set
toString
public String toString()
- Overrides:
toString in class Object
validate
public boolean validate(javax.validation.ConstraintValidatorContext context)
- Template method that validates the state of an
AbstractEntity. Can
be used prior to saving/ updating the AbstractEntity
- Parameters:
context - the ConstraintValidatorContext
violation
protected void violation(javax.validation.ConstraintValidatorContext context,
String message)
- Convenience method for adding a ConstraintViolation to the given context.
- Parameters:
context - the ConstraintValidatorContextmessage - the message to attach to the violation
updateTimeStamps
public void updateTimeStamps()
getCreationDate
public Date getCreationDate()
getModificationDate
public Date getModificationDate()
Copyright © 2012-2013 SURFnet bv, The Netherlands. All Rights Reserved.