java - get result from RSQL2CriteriaConverterImpl createCriteria() method -


i developing java application in dao class call rsql2criteriaconverterimpl createcriteria() method.method below -

public criteria getrqlcriteria(requestquerycontext requestquerycontext, session hibsession) {         criteria criteria;         if (requestquerycontext.getfilter() != null) {              //<== here value of filter  - status=='failed';queued>='2017-07-24t00:00:00.000';             // setup factory             rsql2hibernatefactory factory = rsql2hibernatefactory.getinstance();             factory.setargumentparser(new skyersqlargumentparser());             factory.setsessionfactory(hibsession.getsessionfactory());             rsql2criteriaconverter converter = factory.createconverter();              // parse rsql , create detached criteria specified entity class             try {                 detachedcriteria detached = converter.createcriteria(requestquerycontext.getfilter(), entityclass);                 //<== here value of filter  - status=='failed';queued>=null;                 // connect current hibernate session                 criteria = detached.getexecutablecriteria(hibsession);             } catch (exception exception) {                 throw new skyeexception("invalid filter expression.", exception);             }          } else {             criteria = hibsession.createcriteria(entityclass);         }         return criteria;     } 

in requestquerycontext.getfilter() value contains string**(like - status=='failed') gives correct result**. if pass filter value localdatetime (like - queued>=2017-07-24t00:00:00.000) @ converter.createcriteria() method value becomes this.queued>=null.

my entity class above objects -

@type(type = "org.jadira.usertype.dateandtime.joda.persistentlocaldatetime") @column(name = "queued") @jsondeserialize(using = localdatetimejdeserializer.class) @jsonserialize(using = localdatetimejserializer.class) private localdatetime queued;  @column(name = "status") private taskstatus status = taskstatus.created; 

what can not convert queued value null.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -