@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface Dao
The annotated interface must be a top level interface.
@Dao
public interface EmployeeDao {
@Insert
int insert(Employee employee);
}
The interface can extend another DAO interface:
@Dao
public interface WorkerDao {
@Insert
int insert(Worker worker);
}
@Dao
public interface EmployeeDao extends WorkerDao {
@Insert
int insert(Employee employee);
}
ArrayFactory,
BatchDelete,
BatchInsert,
BatchUpdate,
BlobFactory,
ClobFactory,
Delete,
Function,
Insert,
NClobFactory,
Procedure,
Select,
Script,
SqlProcessor,
Update| Modifier and Type | Optional Element and Description |
|---|---|
AccessLevel |
accessLevel |
java.lang.Class<? extends Config> |
config
Deprecated.
always pass a
Config instance to the constructor of DAO implementation
class |
@Deprecated public abstract java.lang.Class<? extends Config> config
Config instance to the constructor of DAO implementation
classIf a user defined class is specified, a generated DAO implementation class has a public no-arg constructor that instantiates the user defined class in the constructor.
If it is not specified, a generated DAO implementation class has a public constructor that
accepts a single Config instance as an argument. In this case, the Config
instance can be injected by using AnnotateWith.
public abstract AccessLevel accessLevel