@Retention(value=RUNTIME) @Target(value=TYPE) public @interface BindDataSource
Decorate an interface to define a database schema. This definition is needed to generate a AbstractDataSource instance.
For every managed entity referred in {#dao() attribute, will be used the associated BindDao definition.
| Modifier and Type | Required Element and Description |
|---|---|
Class<?>[] |
daoSet
DAOs to include in the database schema
|
String |
fileName
Name of database file
|
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
asyncTask
if true, generate async task
|
boolean |
cursorWrapper
if true, generate cursor wrapper
|
boolean |
log
if true, generate log info
|
boolean |
rx
if true, generate rx support
|
boolean |
schema
if true, generate schema sql file, in
schema/ folder. |
int |
version
Database version
|
public abstract Class<?>[] daoSet
public abstract String fileName
public abstract boolean log
public abstract boolean schema
if true, generate schema sql file, in schema/ folder.
The name of file will be:
{name of datasource}.schema.{version}.sql
Example:
xeno.schema.1.sql
public abstract boolean asyncTask
Copyright © 2017. All rights reserved.