View Javadoc

1   /*
2    * Copyright 2010 James Pether Sörling
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *   http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   *
16   *	$Id: UserImpl.java 3144 2010-05-18 11:29:22Z pether $
17   *  $HeadURL: https://cia.svn.sourceforge.net/svnroot/cia/trunk/model.user.impl/src/main/java/com/hack23/cia/model/user/impl/UserImpl.java $
18  */
19  package com.hack23.cia.model.user.impl;
20  
21  import javax.persistence.Entity;
22  import javax.persistence.Id;
23  import javax.persistence.Version;
24  
25  import com.hack23.cia.model.common.impl.AbstractModelObjectImpl;
26  import com.hack23.cia.model.user.api.User;
27  
28  /***
29   * The Class UserImpl.
30   */
31  @Entity
32  public class UserImpl extends AbstractModelObjectImpl implements User {
33  	
34  	/*** The Constant serialVersionUID. */
35  	private static final long serialVersionUID = 1L;
36  
37  	/*** The id. */
38  	@Id
39  	private Long id;
40  	
41  	/*** The version. */
42  	@Version
43  	private Long version;
44  
45  	/* (non-Javadoc)
46  	 * @see com.hack23.cia.model.common.impl.AbstractModelObjectImpl#getVersion()
47  	 */
48  	public Long getVersion() {
49  		return version;
50  	}
51  
52  	/***
53  	 * Sets the version.
54  	 * 
55  	 * @param version
56  	 *            the new version
57  	 */
58  	public void setVersion(Long version) {
59  		this.version = version;
60  	}
61  
62  	/* (non-Javadoc)
63  	 * @see com.hack23.cia.model.common.impl.AbstractModelObjectImpl#getId()
64  	 */
65  	public Long getId() {
66  		return id;
67  	}
68  
69  	/***
70  	 * Sets the id.
71  	 * 
72  	 * @param id
73  	 *            the new id
74  	 */
75  	public void setId(Long id) {
76  		this.id = id;
77  	}	
78  }