Java Code Examples for com.lidroid.xutils.db.annotation.Table

The following examples show how to use com.lidroid.xutils.db.annotation.Table. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: android-open-project-demo   Source File: TableUtils.java    License: Apache License 2.0 5 votes vote down vote up
public static String getTableName(Class<?> entityType) {
    Table table = entityType.getAnnotation(Table.class);
    if (table == null || TextUtils.isEmpty(table.name())) {
        return entityType.getName().replace('.', '_');
    }
    return table.name();
}
 
Example 2
Source Project: android-open-project-demo   Source File: TableUtils.java    License: Apache License 2.0 5 votes vote down vote up
public static String getExecAfterTableCreated(Class<?> entityType) {
    Table table = entityType.getAnnotation(Table.class);
    if (table != null) {
        return table.execAfterTableCreated();
    }
    return null;
}