I having one requirement where I may pass any pojo and do as an argument like this
public class Genericclass <pojo,dao> {
//What I am expecting is when I call a method of this
class it should give me pojo object
public pojo getPojo(){
//create new object of the pojo
return pojo type OBJ;
}
Public dao getdao(){
//create new day OBJ return dao OBJ; } }
i may use this while calling any type of pojo ex
Public class Temp {
Psvm(string args[]){
Add(Generic class<emppojo.class,empdao.class>);
//emp or dept or what ever I may pass // I will do some business logic and create OBJ for
generic claa and I will use getpojo and getdao methods
for creating new objects and I will get dao object call a
method,
Sorry if I did any coding mistake . give me a solution
based on my requirement
}
// thanks in advance