JPA mapping updates
[utils] / security / impl / src / main / java / org / wamblee / security / authorization / AbstractAuthorizationService.java
index d8c1e527ca6f2a7cf8acad7a0122808e970a83fc..6cdb4ca24f162f1375294f48b215486654bae97f 100644 (file)
@@ -27,7 +27,7 @@ import javax.persistence.NamedQuery;
 import javax.persistence.Table;
 import javax.persistence.Version;
 
-import org.wamblee.usermgt.UserAccessor;
+import org.wamblee.security.authentication.UserAccessor;
 
 /**
  * Service to determine if access to a certain resource is allowed.
@@ -50,17 +50,31 @@ public abstract class AbstractAuthorizationService implements AuthorizationServi
     
     @Id
     @GeneratedValue(strategy = GenerationType.AUTO)
-    private Long primaryKey;
+    private Long id;
 
     @Version
     private int version;
     
+    /**
+     * Name for this instance of the authorization service.
+     */
+    private String name; 
+    
     public AbstractAuthorizationService() { 
         // Empty. 
     }
     
+    public AbstractAuthorizationService(String aName) { 
+        name = aName; 
+    }
+    
     public AbstractAuthorizationService(AbstractAuthorizationService aSvc) { 
-        primaryKey = aSvc.primaryKey;
+        id = aSvc.id;
         version = aSvc.version;
+        name = aSvc.name;
+    }
+    
+    public String getName() {
+        return name;
     }
 }