Project

General

Profile

Download (1.19 KB) Statistics
| Branch: | Tag: | Revision:
1
package eu.etaxonomy.cdm.model.common;
2

    
3
import java.util.UUID;
4

    
5
import org.joda.time.DateTime;
6

    
7
import eu.etaxonomy.cdm.model.agent.Person;
8

    
9
public interface ICdmBase {
10

    
11
	/**
12
	 * Returns local unique identifier for the concrete subclass
13
	 * @return
14
	 */
15
	public abstract int getId();
16

    
17
	/**
18
	 * Assigns a unique local ID to this object. 
19
	 * Because of the EJB3 @Id and @GeneratedValue annotation this id will be
20
	 * set automatically by the persistence framework when object is saved.
21
	 * @param id
22
	 */
23
	public abstract void setId(int id);
24

    
25
	public abstract UUID getUuid();
26

    
27
	public abstract void setUuid(UUID uuid);
28

    
29
	public abstract DateTime getCreated();
30

    
31
	/**
32
	 * Sets the timestamp this object was created. 
33
	 * Most databases cannot store milliseconds, so they are removed by this method.
34
	 * Caution: We are planning to replace the Calendar class with a different datetime representation which is more suitable for hibernate
35
	 * see {@link http://dev.e-taxonomy.eu/trac/ticket/247 TRAC ticket} 
36
	 * 
37
	 * @param created
38
	 */
39
	public abstract void setCreated(DateTime created);
40

    
41
	public abstract User getCreatedBy();
42

    
43
	public abstract void setCreatedBy(User createdBy);
44

    
45
}
(14-14/58)