Hi to all,
I have created OData service endpoint, using the below linked approach,
OData producer using Apache Olingo with MySQL, JPA & Tomcat web server
I got Odata service and am able to list all the data from database.
Now,
I want to list the record based on some conditions like where Name1 = "test"
Pls help me on this ....
FYI.,
am sharing the data format which I am getting from that Service,
http://localhost:8080/Customer_Reg/custlist.svc/CustGeneralDatas()/?$format=json
Output:
{"d":{"results":[{"__metadata":{"id":"http://localhost:8080/Customer_Reg/custlist.svc/CustGeneralDatas('1')","uri":"http://localhost:8080/Customer_Reg/custlist.svc/CustGeneralDatas('1')","type":"Customer_Reg.CustGeneralData"},"Aenam":null,"Anred":"2","Cin":null,"City1":"delhi","City2":"98","Ernam":null,"Ersda":null,"Kunnr":"1","Laeda":null,"Land1":null,"Mcod1":"3","Name1":"mahie","Name2":"5","Panno":null,"PoBox":"6","Pstlz":"9","Regio":null,"Smtp_addr":"mahi@gmail.vom","StrSuppl1":"7","StrSuppl2":"7","Stras":"6","TelNumber":"9738285552","Telf1":null,"Telfx":null,"Telx1":null,"Tin":null},
{"__metadata":{"id":"http://localhost:8080/Customer_Reg/custlist.svc/CustGeneralDatas('2')","uri":"http://localhost:8080/Customer_Reg/custlist.svc/CustGeneralDatas('2')","type":"Customer_Reg.CustGeneralData"},"Aenam":null,"Anred":"7","Cin":null,"City1":"bangalore","City2":null,"Ernam":null,"Ersda":null,"Kunnr":"2","Laeda":null,"Land1":null,"Mcod1":"7","Name1":"itenz","Name2":"8","Panno":null,"PoBox":"09","Pstlz":null,"Regio":null,"Smtp_addr":"test@ted.com","StrSuppl1":"0","StrSuppl2":"0","Stras":"9","TelNumber":"0989745984","Telf1":null,"Telfx":null,"Telx1":null,"Tin":null},
{"__metadata":{"id":"http://localhost:8080/Customer_Reg/custlist.svc/CustGeneralDatas('6')","uri":"http://localhost:8080/Customer_Reg/custlist.svc/CustGeneralDatas('6')","type":"Customer_Reg.CustGeneralData"},"Aenam":null,"Anred":"tf","Cin":null,"City1":"test","City2":null,"Ernam":null,"Ersda":null,"Kunnr":"6","Laeda":null,"Land1":null,"Mcod1":"test","Name1":"test","Name2":"test","Panno":null,"PoBox":"test","Pstlz":null,"Regio":null,"Smtp_addr":"test","StrSuppl1":"test","StrSuppl2":"test","Stras":"test","TelNumber":"test","Telf1":null,"Telfx":null,"Telx1":null,"Tin":null}]}}
Tags edited by: Jitendra Kansal (Moderator)