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>
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.