2 * Copyright 2010 Electronic Business Systems Ltd.
4 * This file is part of GSS.
6 * GSS is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GSS. If not, see <http://www.gnu.org/licenses/>.
19 package gr.ebs.gss.server.domain;
21 import java.util.Date;
23 import javax.persistence.CascadeType;
24 import javax.persistence.Entity;
25 import javax.persistence.FetchType;
26 import javax.persistence.GeneratedValue;
27 import javax.persistence.Id;
28 import javax.persistence.ManyToOne;
29 import javax.persistence.Table;
30 import javax.persistence.UniqueConstraint;
33 * The class that holds information about the login dates that user logins to the system.
37 @Table(name="userlogin", uniqueConstraints=@UniqueConstraint(columnNames={"user_id", "logindate"}))
38 public class UserLogin {
41 * The persistence ID of the object.
47 private Date loginDate;
50 * The user to whom the login date belongs to
61 * @param _id the id to set
63 public void setId(Long _id) {
79 * @param aUser the user to set
81 public void setUser(User aUser) {
90 public User getUser() {
95 * Modify the lastLoginDate.
97 * @param _lastLogin the lastLoginDate to set
99 public void setLoginDate(Date _lastLogin) {
100 this.loginDate = _lastLogin;
104 * Retrieve the lastLoginDate.
106 * @return the lastLoginDate
108 public Date getLoginDate() {