dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35836
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18352: adds a few new aliases for filter query ops
------------------------------------------------------------
revno: 18352
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-02-20 15:38:07 +0700
message:
adds a few new aliases for filter query ops
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/DefaultObjectFilterService.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/OpFactory.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/objectfilter/DefaultObjectFilterService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/DefaultObjectFilterService.java 2015-02-20 08:28:01 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/DefaultObjectFilterService.java 2015-02-20 08:38:07 +0000
@@ -150,6 +150,10 @@
{
return Restrictions.eq( split[0], split[2] );
}
+ case "ne":
+ {
+ return Restrictions.ne( split[0], split[2] );
+ }
case "neq":
{
return Restrictions.ne( split[0], split[2] );
@@ -166,14 +170,26 @@
{
return Restrictions.ge( split[0], split[2] );
}
+ case "ge":
+ {
+ return Restrictions.ge( split[0], split[2] );
+ }
case "lte":
{
return Restrictions.le( split[0], split[2] );
}
+ case "le":
+ {
+ return Restrictions.le( split[0], split[2] );
+ }
case "like":
{
return Restrictions.like( split[0], "%" + split[2] + "%" );
}
+ case "ilike":
+ {
+ return Restrictions.ilike( split[0], "%" + split[2] + "%" );
+ }
}
return null;
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/OpFactory.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/OpFactory.java 2015-01-20 07:15:07 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/OpFactory.java 2015-02-20 08:38:07 +0000
@@ -56,14 +56,18 @@
static
{
register( "eq", EqOp.class );
+ register( "ne", NeqOp.class );
register( "neq", NeqOp.class );
register( "like", LikeOp.class );
+ register( "ilike", LikeOp.class );
register( "nlike", NLikeOp.class );
register( "startsWith", StartsWithOp.class );
register( "endsWith", EndsWithOp.class );
register( "gt", GtOp.class );
+ register( "ge", GteOp.class );
register( "gte", GteOp.class );
register( "lt", LtOp.class );
+ register( "le", LteOp.class );
register( "lte", LteOp.class );
register( "null", NullOp.class );
register( "nnull", NnullOp.class );