com.j256.ormlite.table
Annotation Type DatabaseTable


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface DatabaseTable

Annotation that marks a class to be stored in the database. It is only required if you want to mark the class or change its default tableName. You specify this annotation above the classes that you want to persist to the database. For example:

 @DatabaseTable(tableName = "accounts")
 public class Account {
   ...
 

NOTE: Classes that are persisted using this package must have a no-argument constructor with at least package visibility so objects can be created when you do a query, etc..

Author:
graywatson

Optional Element Summary
 Class<?> daoClass
          The DAO class that corresponds to this class.
 String tableName
          The name of the column in the database.
 

tableName

public abstract String tableName
The name of the column in the database. If not set then the name is taken from the class name lowercased.

Default:
""

daoClass

public abstract Class<?> daoClass
The DAO class that corresponds to this class. This is used by the DaoManager when it constructs a DAO internally. It is important to use this on devices with minimal memory such as mobile devices.

Default:
java.lang.Void.class


Copyright © 2011. All Rights Reserved.