dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20952
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9797: added method to idObject that will return true/false depending on name uniqueness
------------------------------------------------------------
revno: 9797
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-02-13 08:17:25 +0700
message:
added method to idObject that will return true/false depending on name uniqueness
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObject.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/datadictionary/DataDictionary.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/document/Document.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroupSet.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.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/common/BaseIdentifiableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java 2013-01-18 12:58:45 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java 2013-02-13 01:17:25 +0000
@@ -198,6 +198,12 @@
this.name = name;
}
+ @Override
+ public boolean haveUniqueNames()
+ {
+ return true;
+ }
+
@JsonProperty
@JsonView({ DetailedView.class, BasicView.class, ExportView.class })
@JacksonXmlProperty(isAttribute = true)
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObject.java 2013-02-13 00:45:31 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObject.java 2013-02-13 01:17:25 +0000
@@ -49,6 +49,8 @@
String getName();
+ boolean haveUniqueNames();
+
String getCode();
Date getCreated();
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datadictionary/DataDictionary.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datadictionary/DataDictionary.java 2012-05-25 21:10:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datadictionary/DataDictionary.java 2013-02-13 01:17:25 +0000
@@ -133,6 +133,12 @@
// Set and get methods
// -------------------------------------------------------------------------
+ @Override
+ public boolean haveUniqueNames()
+ {
+ return false;
+ }
+
@JsonProperty
@JsonView( { DetailedView.class, ExportView.class } )
@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2013-02-08 04:20:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2013-02-13 01:17:25 +0000
@@ -393,6 +393,12 @@
// Getters and setters
// -------------------------------------------------------------------------
+ @Override
+ public boolean haveUniqueNames()
+ {
+ return false;
+ }
+
@JsonProperty
@JsonSerialize( using = JacksonPeriodTypeSerializer.class )
@JsonDeserialize( using = JacksonPeriodTypeDeserializer.class )
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/document/Document.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/document/Document.java 2013-02-08 05:10:24 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/document/Document.java 2013-02-13 01:17:25 +0000
@@ -40,7 +40,7 @@
/**
* @author Lars Helge Overland
*/
-@JacksonXmlRootElement(localName = "document", namespace = Dxf2Namespace.NAMESPACE)
+@JacksonXmlRootElement( localName = "document", namespace = Dxf2Namespace.NAMESPACE )
public class Document
extends BaseIdentifiableObject
{
@@ -85,9 +85,15 @@
return name.equals( other.name );
}
+ @Override
+ public boolean haveUniqueNames()
+ {
+ return false;
+ }
+
@JsonProperty
- @JsonView({ DetailedView.class, ExportView.class })
- @JacksonXmlProperty(namespace = Dxf2Namespace.NAMESPACE)
+ @JsonView( { DetailedView.class, ExportView.class } )
+ @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
public String getUrl()
{
return url;
@@ -99,8 +105,8 @@
}
@JsonProperty
- @JsonView({ DetailedView.class, ExportView.class })
- @JacksonXmlProperty(namespace = Dxf2Namespace.NAMESPACE)
+ @JsonView( { DetailedView.class, ExportView.class } )
+ @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
public boolean isExternal()
{
return external;
@@ -112,8 +118,8 @@
}
@JsonProperty
- @JsonView({ DetailedView.class, ExportView.class })
- @JacksonXmlProperty(namespace = Dxf2Namespace.NAMESPACE)
+ @JsonView( { DetailedView.class, ExportView.class } )
+ @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
public String getContentType()
{
return contentType;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java 2013-02-07 10:25:34 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java 2013-02-13 01:17:25 +0000
@@ -183,6 +183,13 @@
// Getters and setters
// -------------------------------------------------------------------------
+
+ @Override
+ public boolean haveUniqueNames()
+ {
+ return false;
+ }
+
@JsonProperty
@JsonView( {DetailedView.class, ExportView.class} )
@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java 2013-02-07 10:25:34 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java 2013-02-13 01:17:25 +0000
@@ -157,6 +157,13 @@
// Getters and setters
// -------------------------------------------------------------------------
+
+ @Override
+ public boolean haveUniqueNames()
+ {
+ return false;
+ }
+
@JsonProperty( value = "indicators" )
@JsonSerialize( contentAs = BaseIdentifiableObject.class )
@JsonView( { DetailedView.class, ExportView.class } )
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroupSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroupSet.java 2013-02-07 10:25:34 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroupSet.java 2013-02-13 01:17:25 +0000
@@ -208,8 +208,15 @@
// Getters and setters
// -------------------------------------------------------------------------
+
+ @Override
+ public boolean haveUniqueNames()
+ {
+ return false;
+ }
+
@JsonProperty
- @JsonView( {DetailedView.class, ExportView.class} )
+ @JsonView( { DetailedView.class, ExportView.class } )
@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
public String getDescription()
{
@@ -222,7 +229,7 @@
}
@JsonProperty
- @JsonView( {DetailedView.class, ExportView.class} )
+ @JsonView( { DetailedView.class, ExportView.class } )
@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
public Boolean isCompulsory()
{
@@ -241,7 +248,7 @@
@JsonProperty( value = "indicatorGroups" )
@JsonSerialize( contentAs = BaseIdentifiableObject.class )
- @JsonView( {DetailedView.class, ExportView.class} )
+ @JsonView( { DetailedView.class, ExportView.class } )
@JacksonXmlElementWrapper( localName = "indicatorGroups", namespace = Dxf2Namespace.NAMESPACE )
@JacksonXmlProperty( localName = "indicatorGroup", namespace = Dxf2Namespace.NAMESPACE )
public List<IndicatorGroup> getMembers()
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2013-02-06 12:33:38 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2013-02-13 01:17:25 +0000
@@ -598,6 +598,13 @@
// Getters and setters
// -------------------------------------------------------------------------
+
+ @Override
+ public boolean haveUniqueNames()
+ {
+ return false;
+ }
+
public String getUuid()
{
return uuid;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java 2013-01-25 15:24:37 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java 2013-02-13 01:17:25 +0000
@@ -180,6 +180,12 @@
// Getters and setters
// -------------------------------------------------------------------------
+ @Override
+ public boolean haveUniqueNames()
+ {
+ return false;
+ }
+
@JsonProperty
@JsonView( {DetailedView.class, ExportView.class} )
@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2013-02-08 07:18:39 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2013-02-13 01:17:25 +0000
@@ -955,6 +955,12 @@
// Get- and set-methods for persisted properties
// -------------------------------------------------------------------------
+ @Override
+ public boolean haveUniqueNames()
+ {
+ return false;
+ }
+
@JsonProperty
@JsonView( {DetailedView.class, ExportView.class} )
@JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java 2013-02-06 03:00:40 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java 2013-02-13 01:17:25 +0000
@@ -150,6 +150,12 @@
// Getters and setters
// -------------------------------------------------------------------------
+ @Override
+ public boolean haveUniqueNames()
+ {
+ return false;
+ }
+
@JsonIgnore
public User getUser()
{