dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30850
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15689: Changed the DataElementDomain enum in uppercase.
------------------------------------------------------------
revno: 15689
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-06-16 13:13:31 +0800
message:
Changed the DataElementDomain enum in uppercase.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementDomain.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/minmax/MinMaxDataElementStoreTest.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/CsvObjectUtils.java
dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionServiceTest.java
dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionStoreTest.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementRowHandler.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/ProgramStageDataElementDeletionHandler.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java
dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/dataelement/DataElementController.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsAction.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/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2014-06-16 05:13:31 +0000
@@ -395,7 +395,7 @@
*/
public String getDomainTypeNullSafe()
{
- return domainType != null ? domainType.getValue() : DataElementDomain.aggregate.getValue();
+ return domainType != null ? domainType.getValue() : DataElementDomain.AGGREGATE.getValue();
}
/**
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementDomain.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementDomain.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementDomain.java 2014-06-16 05:13:31 +0000
@@ -34,7 +34,7 @@
*/
public enum DataElementDomain
{
- aggregate( "aggregate" ), tracker( "tracker" );
+ AGGREGATE( "aggregate" ), TRACKER( "tracker" );
private final String value;
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java 2014-06-16 05:13:31 +0000
@@ -178,7 +178,7 @@
{
String hql = "from DataElement d where d.dataSets.size = 0 and d.domainType =:domainType";
- return getQuery( hql ).setParameter( "domainType", DataElementDomain.aggregate ).setCacheable( true ).list();
+ return getQuery( hql ).setParameter( "domainType", DataElementDomain.AGGREGATE ).setCacheable( true ).list();
}
@SuppressWarnings("unchecked")
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java 2014-06-16 05:13:31 +0000
@@ -330,25 +330,25 @@
@Test
public void testGetDataElementsByDomainType()
{
- assertEquals( 0, dataElementStore.getDataElementsByDomainType( DataElementDomain.aggregate ).size() );
- assertEquals( 0, dataElementStore.getDataElementsByDomainType( DataElementDomain.tracker ).size() );
+ assertEquals( 0, dataElementStore.getDataElementsByDomainType( DataElementDomain.AGGREGATE ).size() );
+ assertEquals( 0, dataElementStore.getDataElementsByDomainType( DataElementDomain.TRACKER ).size() );
DataElement dataElementA = createDataElement( 'A' );
- dataElementA.setDomainType( DataElementDomain.aggregate);
+ dataElementA.setDomainType( DataElementDomain.AGGREGATE);
DataElement dataElementB = createDataElement( 'B' );
- dataElementB.setDomainType( DataElementDomain.tracker );
+ dataElementB.setDomainType( DataElementDomain.TRACKER );
DataElement dataElementC = createDataElement( 'C' );
- dataElementC.setDomainType( DataElementDomain.tracker );
+ dataElementC.setDomainType( DataElementDomain.TRACKER );
DataElement dataElementD = createDataElement( 'D' );
- dataElementD.setDomainType( DataElementDomain.tracker );
+ dataElementD.setDomainType( DataElementDomain.TRACKER );
dataElementStore.save( dataElementA );
dataElementStore.save( dataElementB );
dataElementStore.save( dataElementC );
dataElementStore.save( dataElementD );
- assertEquals( 1, dataElementStore.getDataElementsByDomainType( DataElementDomain.aggregate ).size() );
- assertEquals( 3, dataElementStore.getDataElementsByDomainType( DataElementDomain.tracker ).size() );
+ assertEquals( 1, dataElementStore.getDataElementsByDomainType( DataElementDomain.AGGREGATE ).size() );
+ assertEquals( 3, dataElementStore.getDataElementsByDomainType( DataElementDomain.TRACKER ).size() );
}
@Test
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/minmax/MinMaxDataElementStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/minmax/MinMaxDataElementStoreTest.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/minmax/MinMaxDataElementStoreTest.java 2014-06-16 05:13:31 +0000
@@ -82,28 +82,28 @@
dataElement1.setShortName( "DE1sname" );
dataElement1.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM );
dataElement1.setType( DataElement.VALUE_TYPE_INT );
- dataElement1.setDomainType( DataElementDomain.aggregate );
+ dataElement1.setDomainType( DataElementDomain.AGGREGATE );
DataElement dataElement2 = new DataElement();
dataElement2.setName( "DE2name" );
dataElement2.setShortName( "DE2sname" );
dataElement2.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM );
dataElement2.setType( DataElement.VALUE_TYPE_INT );
- dataElement2.setDomainType( DataElementDomain.aggregate );
+ dataElement2.setDomainType( DataElementDomain.AGGREGATE );
DataElement dataElement3 = new DataElement();
dataElement3.setName( "DE3name" );
dataElement3.setShortName( "DE3sname" );
dataElement3.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM );
dataElement3.setType( DataElement.VALUE_TYPE_INT );
- dataElement3.setDomainType( DataElementDomain.aggregate );
+ dataElement3.setDomainType( DataElementDomain.AGGREGATE );
DataElement dataElement4 = new DataElement();
dataElement4.setName( "DE4name" );
dataElement4.setShortName( "DE4sname" );
dataElement4.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM );
dataElement4.setType( DataElement.VALUE_TYPE_INT );
- dataElement4.setDomainType( DataElementDomain.aggregate );
+ dataElement4.setDomainType( DataElementDomain.AGGREGATE );
dataElementService.addDataElement( dataElement1 );
dataElementService.addDataElement( dataElement2 );
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/CsvObjectUtils.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/CsvObjectUtils.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/CsvObjectUtils.java 2014-06-16 05:13:31 +0000
@@ -155,7 +155,7 @@
object.setFormName( getSafe( values, 5, null, 230 ) );
object.setActive( true );
- String domainType = getSafe( values, 6, DataElementDomain.aggregate.getValue(), 16 );
+ String domainType = getSafe( values, 6, DataElementDomain.AGGREGATE.getValue(), 16 );
object.setDomainType( DataElementDomain.fromValue( domainType ) );
object.setType( getSafe( values, 7, DataElement.VALUE_TYPE_INT, 16 ) );
=== modified file 'dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionServiceTest.java'
--- dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionServiceTest.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionServiceTest.java 2014-06-16 05:13:31 +0000
@@ -195,17 +195,17 @@
dataElementA = createDataElement( 'A' );
dataElementA.setType( DataElement.VALUE_TYPE_STRING );
- dataElementA.setDomainType( DataElementDomain.tracker );
+ dataElementA.setDomainType( DataElementDomain.TRACKER );
dataElementB = createDataElement( 'B' );
dataElementB.setType( DataElement.VALUE_TYPE_STRING );
- dataElementB.setDomainType( DataElementDomain.tracker );
+ dataElementB.setDomainType( DataElementDomain.TRACKER );
dataElementC = createDataElement( 'C' );
- dataElementC.setDomainType( DataElementDomain.aggregate );
+ dataElementC.setDomainType( DataElementDomain.AGGREGATE );
dataElementD = createDataElement( 'D' );
- dataElementD.setDomainType( DataElementDomain.aggregate );
+ dataElementD.setDomainType( DataElementDomain.AGGREGATE );
int deAId = dataElementService.addDataElement( dataElementA );
int deBId = dataElementService.addDataElement( dataElementB );
=== modified file 'dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionStoreTest.java'
--- dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionStoreTest.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionStoreTest.java 2014-06-16 05:13:31 +0000
@@ -192,17 +192,17 @@
dataElementA = createDataElement( 'A' );
dataElementA.setType( DataElement.VALUE_TYPE_STRING );
- dataElementA.setDomainType( DataElementDomain.tracker );
+ dataElementA.setDomainType( DataElementDomain.TRACKER );
dataElementB = createDataElement( 'B' );
dataElementB.setType( DataElement.VALUE_TYPE_STRING );
- dataElementB.setDomainType( DataElementDomain.tracker );
+ dataElementB.setDomainType( DataElementDomain.TRACKER );
dataElementC = createDataElement( 'C' );
- dataElementC.setDomainType( DataElementDomain.aggregate );
+ dataElementC.setDomainType( DataElementDomain.AGGREGATE );
dataElementD = createDataElement( 'D' );
- dataElementD.setDomainType( DataElementDomain.aggregate );
+ dataElementD.setDomainType( DataElementDomain.AGGREGATE );
int deAId = dataElementService.addDataElement( dataElementA );
int deBId = dataElementService.addDataElement( dataElementB );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementRowHandler.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementRowHandler.java 2014-06-16 05:13:31 +0000
@@ -79,7 +79,7 @@
final DataElement dataElement = (DataElement) object;
dataElement.setActive( true );
- dataElement.setDomainType( DataElementDomain.aggregate );
+ dataElement.setDomainType( DataElementDomain.AGGREGATE );
dataElement.setZeroIsSignificant( false );
if ( dataElement.getCode() != null && dataElement.getCode().trim().length() == 0 )
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java 2014-06-16 05:13:31 +0000
@@ -276,7 +276,7 @@
element.setShortName( values.get( FIELD_SHORT_NAME ) );
element.setDescription( Dhis14ParsingUtils.removeNewLine( values.get( FIELD_DESCRIPTION ) ) );
element.setActive( true );
- element.setDomainType( DataElementDomain.aggregate );
+ element.setDomainType( DataElementDomain.AGGREGATE );
element.setZeroIsSignificant( false );
element.setType( Dhis14ObjectMappingUtil.getDataElementTypeMap().get(
Integer.parseInt( values.get( FIELD_DATA_TYPE ) ) ) );
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/ProgramStageDataElementDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/ProgramStageDataElementDeletionHandler.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/ProgramStageDataElementDeletionHandler.java 2014-06-16 05:13:31 +0000
@@ -78,7 +78,7 @@
@Override
public void deleteDataElement( DataElement dataElement )
{
- if ( DataElementDomain.tracker.equals( dataElement.getDomainType() ) )
+ if ( DataElementDomain.TRACKER.equals( dataElement.getDomainType() ) )
{
Iterator<ProgramStageDataElement> iterator = programStageDEService.getAllProgramStageDataElements().iterator();
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java 2014-06-16 05:13:31 +0000
@@ -53,6 +53,6 @@
public boolean retain( DataElement object )
{
- return object != null && types.contains( object.getType() ) && DataElementDomain.aggregate.equals( object.getDomainType() );
+ return object != null && types.contains( object.getType() ) && DataElementDomain.AGGREGATE.equals( object.getDomainType() );
}
}
=== modified file 'dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java'
--- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java 2014-06-16 05:13:31 +0000
@@ -422,7 +422,7 @@
dataElement.setDescription( "DataElementDescription" + uniqueCharacter );
dataElement.setActive( true );
dataElement.setType( DataElement.VALUE_TYPE_INT );
- dataElement.setDomainType( DataElementDomain.aggregate );
+ dataElement.setDomainType( DataElementDomain.AGGREGATE );
dataElement.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM );
return dataElement;
@@ -437,7 +437,7 @@
DataElement dataElement = createDataElement( uniqueCharacter );
dataElement.setCategoryCombo( categoryCombo );
- dataElement.setDomainType( DataElementDomain.aggregate );
+ dataElement.setDomainType( DataElementDomain.AGGREGATE );
return dataElement;
}
@@ -451,7 +451,7 @@
{
DataElement dataElement = createDataElement( uniqueCharacter );
dataElement.setType( type );
- dataElement.setDomainType( DataElementDomain.aggregate );
+ dataElement.setDomainType( DataElementDomain.AGGREGATE );
dataElement.setAggregationOperator( aggregationOperator );
return dataElement;
@@ -468,7 +468,7 @@
{
DataElement dataElement = createDataElement( uniqueCharacter );
dataElement.setType( type );
- dataElement.setDomainType( DataElementDomain.aggregate );
+ dataElement.setDomainType( DataElementDomain.AGGREGATE );
dataElement.setAggregationOperator( aggregationOperator );
dataElement.setCategoryCombo( categoryCombo );
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/dataelement/DataElementController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/dataelement/DataElementController.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/dataelement/DataElementController.java 2014-06-16 05:13:31 +0000
@@ -9,7 +9,7 @@
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
- * Redistributions in binary form must reproduce the above copyright notice,
+ * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* Neither the name of the HISP project nor the names of its contributors may
@@ -68,8 +68,8 @@
{
entityList = Lists.newArrayList( manager.filter( getEntityClass(), options.getOptions().get( "query" ) ) );
}
- else if ( DataElementDomain.aggregate.equals( options.getOptions().get( KEY_DOMAIN_TYPE ) )
- || DataElementDomain.tracker.equals( options.getOptions().get( KEY_DOMAIN_TYPE ) ) )
+ else if ( DataElementDomain.AGGREGATE.equals( options.getOptions().get( KEY_DOMAIN_TYPE ) )
+ || DataElementDomain.TRACKER.equals( options.getOptions().get( KEY_DOMAIN_TYPE ) ) )
{
String domainType = options.getOptions().get( KEY_DOMAIN_TYPE );
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsAction.java 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsAction.java 2014-06-16 05:13:31 +0000
@@ -196,15 +196,15 @@
}
else if ( domain != null )
{
- if ( domain.equals( DataElementDomain.aggregate.getValue() ) )
+ if ( domain.equals( DataElementDomain.AGGREGATE.getValue() ) )
{
dataElements = new ArrayList<DataElement>(
- dataElementService.getDataElementsByDomainType( DataElementDomain.aggregate ) );
+ dataElementService.getDataElementsByDomainType( DataElementDomain.AGGREGATE ) );
}
else
{
dataElements = new ArrayList<DataElement>(
- dataElementService.getDataElementsByDomainType( DataElementDomain.tracker ) );
+ dataElementService.getDataElementsByDomainType( DataElementDomain.TRACKER ) );
}
}
else