dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42944
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21862: Minor fixes
------------------------------------------------------------
revno: 21862
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2016-02-03 14:40:27 +0700
message:
Minor fixes
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/common/OrderParams.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.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-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/common/OrderParams.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/common/OrderParams.java 2016-01-05 09:05:54 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/common/OrderParams.java 2016-02-03 07:40:27 +0000
@@ -52,6 +52,11 @@
{
}
+ public OrderParams( Set<String> order )
+ {
+ this.order = order;
+ }
+
public void setOrder( Set<String> order )
{
this.order = order;
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java 2016-02-03 07:29:14 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata2/DefaultMetadataExportService.java 2016-02-03 07:40:27 +0000
@@ -98,10 +98,8 @@
}
else
{
- OrderParams orderParams = new OrderParams();
- orderParams.setOrder( Sets.newHashSet( params.getDefaultOrder() ) );
+ OrderParams orderParams = new OrderParams( Sets.newHashSet( params.getDefaultOrder() ) );
query = queryService.getQueryFromUrl( klass, params.getDefaultFilter(), orderParams.getOrders( schemaService.getDynamicSchema( klass ) ) );
- query.setDefaultOrder();
}
if ( query.getUser() == null )
@@ -109,6 +107,7 @@
query.setUser( defaultUser );
}
+ query.setDefaultOrder();
List<? extends IdentifiableObject> objects = queryService.query( query );
log.info( "Exported " + objects.size() + " objects of type " + klass.getSimpleName() );
metadata.put( klass, objects );
@@ -222,9 +221,7 @@
if ( classMap.containsKey( "filter" ) && classMap.containsKey( "order" ) )
{
- OrderParams orderParams = new OrderParams();
- orderParams.setOrder( Sets.newHashSet( classMap.get( "order" ) ) );
-
+ OrderParams orderParams = new OrderParams( Sets.newHashSet( classMap.get( "order" ) ) );
Query query = queryService.getQueryFromUrl( klass, classMap.get( "filter" ), orderParams.getOrders( schema ) );
query.setDefaultOrder();
params.addQuery( query );