← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5207: getByUid method

 

------------------------------------------------------------
revno: 5207
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-11-23 19:37:43 +0100
message:
  getByUid method
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/attribute/DefaultAttributeService.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeService.java	2011-11-23 18:30:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeService.java	2011-11-23 18:37:43 +0000
@@ -32,7 +32,7 @@
 /**
  * @author mortenoh
  */
-interface AttributeService
+public interface AttributeService
 {
     String ID = AttributeService.class.getName();
 
@@ -48,6 +48,8 @@
 
     Attribute getAttribute( int id );
 
+    Attribute getAttribute( String uid );
+
     Attribute getAttributeByName( String name );
 
     Set<Attribute> getAllAttributes();

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeStore.java	2011-11-23 18:30:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/attribute/AttributeStore.java	2011-11-23 18:37:43 +0000
@@ -34,7 +34,7 @@
 /**
  * @author mortenoh
  */
-interface AttributeStore
+public interface AttributeStore
     extends GenericNameableObjectStore<Attribute>
 {
     String ID = AttributeStore.class.getName();

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/attribute/DefaultAttributeService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/attribute/DefaultAttributeService.java	2011-11-14 16:02:32 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/attribute/DefaultAttributeService.java	2011-11-23 18:37:43 +0000
@@ -92,6 +92,12 @@
     }
 
     @Override
+    public Attribute getAttribute( String uid )
+    {
+        return attributeStore.getByUid( uid );
+    }
+    
+    @Override
     public Attribute getAttributeByName( String name )
     {
         return attributeStore.getByName( name );