i am stuck with an java tradition of using anonymous methods, I am using third party library which have a generic interface which takes table_name as its generic types
like
TableQueryCallback<WYF_Brands> =new TableQueryCallback<WYF_Brands>() {
@Override
public void onCompleted(List<WYF_Brands> arg0, int arg1,
Exception arg2, ServiceFilterResponse arg3) {
// TODO Auto-generated method stub
}
};
here WYF_Brands is my table name.
what i want is
TableQueryCallback<WYF_Users> =new TableQueryCallback<WYF_Users>() {
@Override
public void onCompleted(List<WYF_Users> arg0, int arg1,
Exception arg2, ServiceFilterResponse arg3) {
// TODO Auto-generated method stub
}
};
where WYF_Users is my another table.
Requirement:i want to use such a method for all of my tables but in a reusable manner.
I have number of tables in database and don't wont to create different methods for different tables .I don't know how to use generics that can accept any table name as perameter.
Another thing is that this Interface is part of third party library so i can't change it as it is inside executable jar file.
i am using java as programming language.