Package de.digitalcollections.model
Class UniqueObject
- java.lang.Object
-
- de.digitalcollections.model.UniqueObject
-
- Direct Known Subclasses:
Headword,Identifiable,Identifier,IdentifierType,License,Predicate,RenderingTemplate,User
public abstract class UniqueObject extends Object
An unique model object being identifiable and referencable by its universal unique UUID.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUniqueObject.UniqueObjectBuilder<C extends UniqueObject,B extends UniqueObject.UniqueObjectBuilder<C,B>>
-
Field Summary
Fields Modifier and Type Field Description protected LocalDateTimecreatedprotected LocalDateTimelastModifiedprotected UUIDuuid
-
Constructor Summary
Constructors Constructor Description UniqueObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)LocalDateTimegetCreated()LocalDateTimegetLastModified()UUIDgetUuid()inthashCode()protected voidinit()Use to initialize member variables, used by default constructor and buildervoidsetCreated(LocalDateTime created)voidsetLastModified(LocalDateTime lastModified)voidsetUuid(UUID uuid)
-
-
-
Field Detail
-
created
protected LocalDateTime created
-
lastModified
protected LocalDateTime lastModified
-
uuid
protected UUID uuid
-
-
Method Detail
-
getCreated
public LocalDateTime getCreated()
- Returns:
- the creation date of the object
-
getLastModified
public LocalDateTime getLastModified()
- Returns:
- the date of last modification of the object
-
getUuid
public UUID getUuid()
- Returns:
- the universal unique id of the object
-
init
protected void init()
Use to initialize member variables, used by default constructor and builder
-
setCreated
public void setCreated(LocalDateTime created)
- Parameters:
created- the creation date of the object
-
setLastModified
public void setLastModified(LocalDateTime lastModified)
- Parameters:
lastModified- the date of last modification of the object
-
setUuid
public void setUuid(UUID uuid)
- Parameters:
uuid- the universal unique id of the object
-
-