/******************************************************************************* * Copyright 2014 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal * Chancellery Austria - ICT staff unit, and Graz University of Technology. * * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by * the European Commission - subsequent versions of the EUPL (the "Licence"); * You may not use this work except in compliance with the Licence. * You may obtain a copy of the Licence at: * http://www.osor.eu/eupl/ * * Unless required by applicable law or agreed to in writing, software * distributed under the Licence is distributed on an "AS IS" basis, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Licence for the specific language governing permissions and * limitations under the Licence. * * This product combines work with different licenses. See the "NOTICE" text * file for details on the various modules and licenses. * The "NOTICE" text file is part of the distribution. Any derivative works * that you distribute must include a readable copy of the "NOTICE" text file. *******************************************************************************/ package at.gv.egovernment.moa.id.commons.db.dao.session; import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import org.hibernate.annotations.DynamicUpdate; @Entity @DynamicUpdate(value=true) @Table(name = "oasessionstore") public class OASessionStore implements Serializable{ private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "idOASession", unique=true, nullable=false) private long idOASession; @Column(name = "oaurlprefix", unique=false, nullable=false) private String oaurlprefix; @Column(name = "assertionSessionID", unique=false, nullable=true) private String assertionSessionID; @Column(name = "userNameID", unique=false, nullable=true) private String userNameID; @Column(name = "userNameIDFormat", unique=false, nullable=true) private String userNameIDFormat; @Column(name = "protocolType", unique=false, nullable=true) private String protocolType; @Column(name = "authURL", unique=false, nullable=false) private String authURL; @Column(name = "attributequeryused", unique=false, nullable=false) private boolean attributeQueryUsed = false; @Column(name = "created", updatable=false, nullable=false) // @Temporal(TemporalType.TIMESTAMP) private Date created; // @PrePersist // protected void created() { // this.created = new Date(); // } @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name = "moasession") private AuthenticatedSessionStore moasession; public long getIdOASession() { return idOASession; } public void setIdOASession(long idOASession) { this.idOASession = idOASession; } public String getOaurlprefix() { return oaurlprefix; } public void setOaurlprefix(String oaurlprefix) { this.oaurlprefix = oaurlprefix; } public AuthenticatedSessionStore getMoasession() { return moasession; } public void setMoasession(AuthenticatedSessionStore moasession) { this.moasession = moasession; } public Date getCreated() { return created; } public void setCreated(Date created) { this.created = created; } /** * @return the assertionSessionID */ public String getAssertionSessionID() { return assertionSessionID; } /** * @param assertionSessionID the assertionSessionID to set */ public void setAssertionSessionID(String assertionSessionID) { this.assertionSessionID = assertionSessionID; } /** * @return the userNameID */ public String getUserNameID() { return userNameID; } /** * @param userNameID the userNameID to set */ public void setUserNameID(String userNameID) { this.userNameID = userNameID; } /** * @return the protocolType */ public String getProtocolType() { return protocolType; } /** * @param protocolType the protocolType to set */ public void setProtocolType(String protocolType) { this.protocolType = protocolType; } /** * @return the attributeQueryUsed */ public boolean isAttributeQueryUsed() { return attributeQueryUsed; } /** * @param attributeQueryUsed the attributeQueryUsed to set */ public void setAttributeQueryUsed(boolean attributeQueryUsed) { this.attributeQueryUsed = attributeQueryUsed; } /** * @return the userNameIDFormat */ public String getUserNameIDFormat() { return userNameIDFormat; } /** * @param userNameIDFormat the userNameIDFormat to set */ public void setUserNameIDFormat(String userNameIDFormat) { this.userNameIDFormat = userNameIDFormat; } /** * @return the authURL */ public String getAuthURL() { return authURL; } /** * @param authURL the authURL to set */ public void setAuthURL(String authURL) { this.authURL = authURL; } }