@Retention(value=RUNTIME) @Target(value=TYPE) public @interface BindTable
When a class is converted to a table, the name of table is obtained from Java class name with a upper camel to Lower under score convertion. For example SayHello class name will be transformed in say_hello table name.
This annotation allow to specify the name of the associated table associated to a Java class. Note that specified name will be transformed like a Java class name.
Take this class
@BindType
@BindTable("WsBean")
public class Bean05 {
@BindColumn(columnType = ColumnType.PRIMARY_KEY)
protected long pk;
protected long number;
protected String text;
protected byte[] content;
protected Date creationTime;
}
Its associated table name is ws_bean.
| Modifier and Type | Optional Element and Description |
|---|---|
String[] |
indexes
Allow to crete (multicolumn or single column) indexes for this table.
|
String |
name
Name of the table, in SQLite style (with words underline separator).
|
String[] |
uniqueIndexes
Allow to crete unique (multicolumn or single column) indexes for this table.
|
public abstract String name
public abstract String[] indexes
Allow to crete (multicolumn or single column) indexes for this table.
public abstract String[] uniqueIndexes
Allow to crete unique (multicolumn or single column) indexes for this table.
Copyright © 2018. All rights reserved.