2 * Copyright (C) 2009 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
;
12 import java
.util
.UUID
;
14 import javax
.validation
.GroupSequence
;
15 import javax
.validation
.groups
.Default
;
17 import org
.joda
.time
.DateTime
;
19 import eu
.etaxonomy
.cdm
.validation
.Level2
;
20 import eu
.etaxonomy
.cdm
.validation
.Level3
;
22 @GroupSequence({Default
.class, Level2
.class, Level3
.class})
23 public interface ICdmBase
{
26 * Returns local unique identifier for the concrete subclass
32 * Assigns a unique local ID to this object.
33 * Because of the EJB3 @Id and @GeneratedValue annotation this id will be
34 * set automatically by the persistence framework when object is saved.
37 public void setId(int id
);
39 public UUID
getUuid();
41 public void setUuid(UUID uuid
);
43 public DateTime
getCreated();
46 * Sets the timestamp this object was created.
47 * Most databases cannot store milliseconds, so they are removed by this method.
48 * Caution: We are planning to replace the Calendar class with a different datetime representation which is more suitable for hibernate
49 * see {@link http://dev.e-taxonomy.eu/trac/ticket/247 TRAC ticket}
53 public void setCreated(DateTime created
);
55 public User
getCreatedBy();
57 public void setCreatedBy(User createdBy
);