dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08430
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2025: Missing additional
------------------------------------------------------------
revno: 2025
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2010-11-10 13:22:27 +0700
message:
Missing additional
modified:
dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.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-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 2010-10-20 14:22:05 +0000
+++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java 2010-11-10 06:22:27 +0000
@@ -38,6 +38,7 @@
import org.hisp.dhis.aggregation.AggregatedDataValueService;
import org.hisp.dhis.chart.Chart;
+import org.hisp.dhis.concept.Concept;
import org.hisp.dhis.datadictionary.DataDictionary;
import org.hisp.dhis.datadictionary.DataDictionaryService;
import org.hisp.dhis.datadictionary.ExtendedDataElement;
@@ -679,6 +680,31 @@
}
/**
+ * @param dataElement The data element.
+ * @param period The period.
+ * @param source The source.
+ * @param value The value.
+ * @param lastupdated The date.
+ * @param categoryOptionCombo The data element category option combo.
+ */
+ public static DataValue createDataValue( DataElement dataElement, Period period, Source source, String value,
+ Date lastupdated, DataElementCategoryOptionCombo categoryOptionCombo )
+ {
+ DataValue dataValue = new DataValue();
+
+ dataValue.setDataElement( dataElement );
+ dataValue.setPeriod( period );
+ dataValue.setSource( source );
+ dataValue.setValue( value );
+ dataValue.setComment( "Comment" );
+ dataValue.setStoredBy( "StoredBy" );
+ dataValue.setTimestamp( lastupdated );
+ dataValue.setOptionCombo( categoryOptionCombo );
+
+ return dataValue;
+ }
+
+ /**
* @param uniqueCharacter A unique character to identify the object.
* @param operator The operator.
* @param leftSide The left side expression.
@@ -939,8 +965,8 @@
*
* @return a dataSetLock instance
*/
- protected static DataSetLock createDataSetLock( DataSet dataSet, Period period,
- Set<Source> sources, String storedBy, Date timestamp )
+ protected static DataSetLock createDataSetLock( DataSet dataSet, Period period, Set<Source> sources,
+ String storedBy, Date timestamp )
{
DataSetLock dataSetLock = new DataSetLock();
@@ -953,6 +979,20 @@
return dataSetLock;
}
+ /**
+ * @param uniqueCharacter A unique character to identify the object.
+ *
+ * @return a concept instance
+ */
+ protected static Concept createConcept( char uniqueCharacter )
+ {
+ Concept concept = new Concept();
+
+ concept.setName( "Concept" + uniqueCharacter );
+
+ return concept;
+ }
+
// -------------------------------------------------------------------------
// Supportive methods
// -------------------------------------------------------------------------