Hello!
I guess your class should have default constructor. This means it has to
define its data statically or take it from some pre-defined location.
Relevant code snippet from QueryCommandHandler:
case SCAN:
IgniteBiPredicate pred = null;
if (req.className() != null)
pred = instance(IgniteBiPredicate.class, req.className());
qry = new ScanQuery(pred);
break;
Regards,
--
Ilya Kasnacheev
ср, 12 дек. 2018 г. в 20:58, begineer <[email protected]>:
> Yes, Predicate class is public and implement appy(). But I am trying to
> understand how to set the fields of the predicate class.
>
> It has a constructor which takes two parameters
>
> public TradeObjectPredicate(String tradeObjectField1, Set<String>
> tradeObjectField2List){
> .....
> }
> How to pass these values from REST API.
>
> This is the error I am getting
>
> {"successStatus":1,"error":"Failed to find constructor for provided
> arguments
>
> [clsName=myprojectpackage.TradeObjectPredicate]","sessionToken":null,"response":null}
>
> Does it mean I have add default constructor to this class or add JSON
> annotations for serialization. But If I add default constructor, predicate
> filters will be null.
>
> Please advise
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>