2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.model
.common
;
13 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
14 import eu
.etaxonomy
.cdm
.model
.view
.View
;
15 import org
.apache
.log4j
.Logger
;
16 import eu
.etaxonomy
.cdm
.model
.Description
;
18 import javax
.persistence
.*;
23 * @created 08-Nov-2007 13:07:01
26 public abstract class VersionableEntity
extends CdmBase
{
27 public VersionableEntity() {
29 this.uuid
= UUID
.randomUUID().toString();
30 this.created
= Calendar
.getInstance();
33 static Logger logger
= Logger
.getLogger(VersionableEntity
.class);
34 //the globally unique identifier
36 private Calendar created
;
37 private Person createdBy
;
38 //time of last update for this object
39 private Calendar updated
;
40 private Person updatedBy
;
41 private VersionableEntity nextVersion
;
42 private VersionableEntity previousVersion
;
45 public VersionableEntity
getNextVersion(){
46 return this.nextVersion
;
48 public void setNextVersion(VersionableEntity nextVersion
){
49 this.nextVersion
= nextVersion
;
53 public VersionableEntity
getPreviousVersion(){
54 return this.previousVersion
;
56 public void setPreviousVersion(VersionableEntity previousVersion
){
57 this.previousVersion
= previousVersion
;
62 public Person
getUpdatedBy(){
63 return this.updatedBy
;
68 * @param updatedBy updatedBy
70 public void setUpdatedBy(Person updatedBy
){
71 this.updatedBy
= updatedBy
;
75 public Person
getCreatedBy(){
76 return this.createdBy
;
81 * @param createdBy createdBy
83 public void setCreatedBy(Person createdBy
){
84 this.createdBy
= createdBy
;
87 public String
getUuid(){
94 public void setUuid(String uuid
){
98 @Temporal(TemporalType
.TIMESTAMP
)
99 public Calendar
getCreated(){
104 * @param created created
106 public void setCreated(Calendar created
){
107 this.created
= created
;
110 @Temporal(TemporalType
.TIMESTAMP
)
111 public Calendar
getUpdated(){
117 * @param updated updated
119 public void setUpdated(Calendar updated
){
120 this.updated
= updated
;
127 public Calendar
getValidFrom(){
135 public Calendar
getValidTo(){