Hello,
I would like to create a generic DAO by using Active Object.
I Start to create an abstract class:
public abstract class GenericDAO<T, PK extends Serializable>{
private final ActiveObjects ao;
@Inject
public GenericDAO(@ComponentImport ActiveObjects ao) {
this.ao = checkNotNull(ao);
}
public void create(Class<T> entityClass){
Class<T> t = ao.create((Class<T>) entityClass);
t.save();
}
but i have an error in create.
The error is :
The method create(Class<T>, DBParam...) in the type ActiveObjects is not applicable for the arguments (Class<T>).
can we create a generic DAO by Using Active objects ?
Resolved :
GenericDAO<entityDao extends Entity>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.