/** * This file is part of Faktotum. * * * Faktotum is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version. * * Faktotum is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with Faktotum. * * If not, see <http://www.gnu.org/licenses/>. */ package de.romankreisel.faktotum.datamodel; import java.util.Date; import javax.persistence.Entity; import javax.persistence.ManyToOne; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * @author Roman Kreisel <mail@romankreisel.de> A persisted session will be * created, if the user selects "remember me" when logging in. * * It will store a unique and random id into a cookie at the client * computer, which will be checked when the user returns. */ @Entity(name = "Session") public class SessionEntity extends FaktotumEntity { @ManyToOne private BundesbruderEntity bundesbruder; private String key; @Temporal(TemporalType.TIMESTAMP) private Date lastLogin; /** * @return the bundesbruder */ public BundesbruderEntity getBundesbruder() { return this.bundesbruder; } /** * @return the key */ public String getKey() { return this.key; } /** * @return the lastLogin */ public Date getLastLogin() { return this.lastLogin; } /** * @param bundesbruder * the bundesbruder to set */ public void setBundesbruder(BundesbruderEntity bundesbruder) { this.bundesbruder = bundesbruder; } /** * @param key * the key to set */ public void setKey(String key) { this.key = key; } /** * @param lastLogin * the lastLogin to set */ public void setLastLogin(Date lastLogin) { this.lastLogin = lastLogin; } }