dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33534
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17128: Using NameableObject for QueryItem
------------------------------------------------------------
revno: 17128
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-10-15 19:31:32 +0200
message:
Using NameableObject for QueryItem
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.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/QueryItem.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java 2014-10-15 17:31:32 +0000
@@ -40,7 +40,7 @@
*/
public class QueryItem
{
- private IdentifiableObject item;
+ private NameableObject item;
private List<QueryFilter> filters = new ArrayList<>();
@@ -50,18 +50,18 @@
// Constructors
// -------------------------------------------------------------------------
- public QueryItem( IdentifiableObject item )
+ public QueryItem( NameableObject item )
{
this.item = item;
}
- public QueryItem( IdentifiableObject item, boolean numeric )
+ public QueryItem( NameableObject item, boolean numeric )
{
this.item = item;
this.numeric = numeric;
}
- public QueryItem( IdentifiableObject item, QueryOperator operator, String filter, boolean numeric )
+ public QueryItem( NameableObject item, QueryOperator operator, String filter, boolean numeric )
{
this.item = item;
this.numeric = numeric;
@@ -72,7 +72,7 @@
}
}
- public QueryItem( IdentifiableObject item, List<QueryFilter> filters, boolean numeric )
+ public QueryItem( NameableObject item, List<QueryFilter> filters, boolean numeric )
{
this.item = item;
this.filters = filters;
@@ -98,11 +98,11 @@
return filters != null && !filters.isEmpty();
}
- public static List<QueryItem> getQueryItems( Collection<? extends IdentifiableObject> objects )
+ public static List<QueryItem> getQueryItems( Collection<? extends NameableObject> objects )
{
List<QueryItem> queryItems = new ArrayList<>();
- for ( IdentifiableObject object : objects )
+ for ( NameableObject object : objects )
{
queryItems.add( new QueryItem( object, false ) );
}
@@ -153,12 +153,12 @@
// Getters and setters
// -------------------------------------------------------------------------
- public IdentifiableObject getItem()
+ public NameableObject getItem()
{
return item;
}
- public void setItem( IdentifiableObject item )
+ public void setItem( NameableObject item )
{
this.item = item;
}