001    /**
002     * 
003     */
004    package de.jw.cloud42.core.domain;
005    
006    import javax.persistence.GeneratedValue;
007    import javax.persistence.GenerationType;
008    import javax.persistence.Id;
009    import javax.persistence.MappedSuperclass;
010    
011    /**
012     * Base class for all entities that have a auto generated id.
013     * 
014     * @author fbitzer
015     *
016     */
017    @MappedSuperclass
018    public class AutoIdObject {
019            
020            private int id;
021            
022            /**
023             * @return the id
024             */
025            @Id
026            @GeneratedValue(strategy=GenerationType.AUTO)
027            public int getId() {
028                    return id;
029            }
030    
031            /**
032             * @param id the id to set
033             */
034            public void setId(int id) {
035                    this.id = id;
036            }
037    
038    
039    }