root/trunk/cdmlib/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/ICdmBase.java

Revision 7558, 1.6 kB (checked in by k.luther, 3 years ago)

modifier "abstract" removed in interfaces

  • Property svn:keywords set to Id
Line 
1/**
2* Copyright (C) 2009 EDIT
3* European Distributed Institute of Taxonomy
4* http://www.e-taxonomy.eu
5*
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.
8*/ 
9
10package eu.etaxonomy.cdm.model.common;
11
12import java.util.UUID;
13
14import javax.validation.GroupSequence;
15import javax.validation.groups.Default;
16
17import org.joda.time.DateTime;
18
19import eu.etaxonomy.cdm.validation.Level2;
20import eu.etaxonomy.cdm.validation.Level3;
21
22@GroupSequence({Default.class, Level2.class, Level3.class})
23public interface ICdmBase {
24
25        /**
26         * Returns local unique identifier for the concrete subclass
27         * @return
28         */
29        public int getId();
30
31        /**
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.
35         * @param id
36         */
37        public void setId(int id);
38
39        public UUID getUuid();
40
41        public void setUuid(UUID uuid);
42
43        public DateTime getCreated();
44
45        /**
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}
50         *
51         * @param created
52         */
53        public void setCreated(DateTime created);
54
55        public User getCreatedBy();
56
57        public void setCreatedBy(User createdBy);
58
59}
Note: See TracBrowser for help on using the browser.