Skip to content

@BindDataSource

xcesco edited this page Jan 23, 2017 · 8 revisions

This annotation decorate an interface to define a datasource associated to a database schema. Between its attributes there is a DAO collection. Every DAO is defined by an interface annotated with @BindDao. Every DAO and is associated to a specific Java class which is associated to a specific table.

A data source class name have to finish with 'DataSource' suffix.

Attributes

List of attributes is:

  • dao: collection of DAO associated to data source.
  • fileName: filename used to store database
  • version: database version. Default version is 1.
  • log: controls generation of log of SQL on logcat.
  • tableNamePrefix: rapresents a prefix of table name.
  • asyncTask: if true, generate async task name Bind<data source name without DataSource prefix>AsyncTask
  • cursor: if true, generate a wrapped cursor for every Java class managed by data source. Cursor's name is Bind<data source name without DataSource prefix>Cursor.

Table of Contents

Query definition

Features

Relations

Multithread supports

Modularization

Annotations for data convertion

Annotations for SQLite ORM

Annotations for shared preferences

Clone this wiki locally