01: /*
02: * JOSSO: Java Open Single Sign-On
03: *
04: * Copyright 2004-2008, Atricore, Inc.
05: *
06: * This is free software; you can redistribute it and/or modify it
07: * under the terms of the GNU Lesser General Public License as
08: * published by the Free Software Foundation; either version 2.1 of
09: * the License, or (at your option) any later version.
10: *
11: * This software 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 GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this software; if not, write to the Free
18: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
20: *
21: * author Kurt T Stam
22: */
23: package org.josso.seam.console;
24:
25: import static javax.persistence.GenerationType.IDENTITY;
26: import javax.persistence.*;
27:
28: import org.hibernate.validator.NotNull;
29:
30: /**
31: * Property generated by hbm2java
32: */
33: @Entity
34: @Table(name="JOSSO_USER_PROPERTY",catalog="PUBLIC")
35: public class Property implements java.io.Serializable {
36:
37: private static final long serialVersionUID = 1L;
38:
39: private Integer id;
40: private Username username;
41: private String name;
42: private String value;
43:
44: public Property() {
45: }
46:
47: public Property(Username username, String name) {
48: this .username = username;
49: this .name = name;
50: }
51:
52: public Property(Username username, String name, String value) {
53: this .username = username;
54: this .name = name;
55: this .value = value;
56: }
57:
58: @Id
59: @GeneratedValue(strategy=GenerationType.TABLE)
60: @Column(name="id",unique=true,nullable=false)
61: public Integer getId() {
62: return this .id;
63: }
64:
65: public void setId(Integer id) {
66: this .id = id;
67: }
68:
69: @ManyToOne(fetch=FetchType.LAZY)
70: @JoinColumn(name="Login",nullable=false)
71: @NotNull
72: public Username getUsername() {
73: return this .username;
74: }
75:
76: public void setUsername(Username username) {
77: this .username = username;
78: }
79:
80: @Column(name="Name",nullable=false)
81: @NotNull
82: public String getName() {
83: return this .name;
84: }
85:
86: public void setName(String name) {
87: this .name = name;
88: }
89:
90: @Column(name="Value")
91: public String getValue() {
92: return this .value;
93: }
94:
95: public void setValue(String value) {
96: this.value = value;
97: }
98:
99: }
|