Author: bdaw
Date: 2008-09-11 16:49:20 -0400 (Thu, 11 Sep 2008)
New Revision: 79
Added:
trunk/identity-impl/src/main/java/org/jboss/identity/impl/model/JPAIdentityObjectAttribute.java
Log:
oups... forgot to commit one class
Added:
trunk/identity-impl/src/main/java/org/jboss/identity/impl/model/JPAIdentityObjectAttribute.java
===================================================================
---
trunk/identity-impl/src/main/java/org/jboss/identity/impl/model/JPAIdentityObjectAttribute.java
(rev 0)
+++
trunk/identity-impl/src/main/java/org/jboss/identity/impl/model/JPAIdentityObjectAttribute.java 2008-09-11
20:49:20 UTC (rev 79)
@@ -0,0 +1,101 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This 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 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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 this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.jboss.identity.impl.model;
+
+import org.hibernate.annotations.CollectionOfElements;
+
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import javax.persistence.OneToMany;
+import javax.persistence.Id;
+import javax.persistence.GeneratedValue;
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
+ * @version : 0.1 $
+ */
+@Entity
+@Table(name = "identity_obj_attrs")
+public class JPAIdentityObjectAttribute
+{
+ @Id
+ @GeneratedValue
+ private Long id;
+
+ private String name;
+
+ @CollectionOfElements
+ private Set<String> values = new HashSet<String>();
+
+ public JPAIdentityObjectAttribute()
+ {
+ }
+
+ public JPAIdentityObjectAttribute(String name)
+ {
+ this.name = name;
+ }
+
+ public JPAIdentityObjectAttribute(String name, Set<String> values)
+ {
+ this.name = name;
+ this.values = values;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Set<String> getValues()
+ {
+ return values;
+ }
+
+ public void setValues(Set<String> values)
+ {
+ this.values = values;
+ }
+
+ public void addValue(String val)
+ {
+ getValues().add(val);
+ }
+}