1 post / 0 new
Unable add Filter condition in DBSync through AppCode
Through AppCode, I’m not able to add the filter condition in DBSync, when I select Data source and its Object. Here is the code which I used to program, can anyone help on this? Whatsapp.java package com.whatsapp; public class Whatsapp { public String _Wstatus; public String _Wname; public String _Wnumber; public Whatsapp(String sts, String name, String no){ _Wstatus = sts; _Wname = name; _Wnumber = no; } } TestWhatsApp.java package com.whatsapp; import java.rmi.RemoteException; import java.util.ArrayList; import java.util.List; import com.appmashups.appcode.AppCode; import com.appmashups.appcode.Context; public class TestWhatsApp implements AppCode{ boolean isCalled; public List<Whatsapp> getWhatappDetails(Whatsapp input){ // the below if stmt, is used to avoid duplicate values at output side. if(isCalled){ return null; } isCalled = true; Whatsapp ap = new Whatsapp("Can't talk! only Whatsapp", "John","7795188865"); Whatsapp ap1 = new Whatsapp("Sleeping", "David","9902175689"); Whatsapp ap2 = new Whatsapp("At Meeting", "Ram", "9845758325"); Whatsapp ap3 = new Whatsapp("At Office", "Manju", "8845758325"); Whatsapp ap4 = new Whatsapp("At gym", "Sunil", "7845758325"); List<Whatsapp> wa = new ArrayList<Whatsapp>(); wa.add(ap); wa.add(ap1); wa.add(ap2); wa.add(ap3); wa.add(ap4); List<Whatsapp> w = new ArrayList<Whatsapp>(); for(Whatsapp f : wa){ if(f._Wname.equals(input._Wname)){ w.add(f); } }
Total votes: 413