[seam-commits] Seam SVN: r13295 - modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Jun 24 00:25:24 EDT 2010
Author: shane.bryzak at jboss.com
Date: 2010-06-24 00:25:24 -0400 (Thu, 24 Jun 2010)
New Revision: 13295
Added:
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectRelationship.java
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectRelationshipType.java
Log:
added relationship entities
Added: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectRelationship.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectRelationship.java (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectRelationship.java 2010-06-24 04:25:24 UTC (rev 13295)
@@ -0,0 +1,82 @@
+package org.jboss.seam.security.examples.idmconsole.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+
+import org.jboss.seam.security.annotations.management.IdentityProperty;
+import org.jboss.seam.security.annotations.management.PropertyType;
+
+/**
+ * Contains relationships between identities
+ *
+ * @author Shane Bryzak
+ */
+ at Entity
+public class IdentityObjectRelationship implements Serializable
+{
+ private static final long serialVersionUID = -5254503795105571898L;
+
+ private Long id;
+ private String name;
+ private IdentityObjectRelationshipType type;
+ private IdentityObject from;
+ private IdentityObject to;
+
+ @Id @GeneratedValue
+ 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;
+ }
+
+ @ManyToOne @IdentityProperty(PropertyType.TYPE)
+ public IdentityObjectRelationshipType getType()
+ {
+ return type;
+ }
+
+ public void setType(IdentityObjectRelationshipType type)
+ {
+ this.type = type;
+ }
+
+ @ManyToOne @IdentityProperty(PropertyType.RELATIONSHIP_FROM)
+ public IdentityObject getFrom()
+ {
+ return from;
+ }
+
+ public void setFrom(IdentityObject from)
+ {
+ this.from = from;
+ }
+
+ @ManyToOne @IdentityProperty(PropertyType.RELATIONSHIP_TO)
+ public IdentityObject getTo()
+ {
+ return to;
+ }
+
+ public void setTo(IdentityObject to)
+ {
+ this.to = to;
+ }
+}
Added: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectRelationshipType.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectRelationshipType.java (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectRelationshipType.java 2010-06-24 04:25:24 UTC (rev 13295)
@@ -0,0 +1,46 @@
+package org.jboss.seam.security.examples.idmconsole.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+import org.jboss.seam.security.annotations.management.IdentityProperty;
+import org.jboss.seam.security.annotations.management.PropertyType;
+
+/**
+ * Lookup table containing relationship types
+ *
+ * @author Shane Bryzak
+ */
+ at Entity
+public class IdentityObjectRelationshipType implements Serializable
+{
+ private static final long serialVersionUID = -67640567413388470L;
+
+ private Long id;
+ private String name;
+
+ @Id @GeneratedValue
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ @IdentityProperty(PropertyType.NAME)
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
More information about the seam-commits
mailing list