本文整理汇总了Java中org.litepal.tablemanager.model.AssociationsModel.setTableName方法的典型用法代码示例。如果您正苦于以下问题:Java AssociationsModel.setTableName方法的具体用法?Java AssociationsModel.setTableName怎么用?Java AssociationsModel.setTableName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.litepal.tablemanager.model.AssociationsModel
的用法示例。
在下文中一共展示了AssociationsModel.setTableName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addIntoAssociationModelCollection
import org.litepal.tablemanager.model.AssociationsModel; //导入方法依赖的package包/类
/**
* Package a {@link org.litepal.tablemanager.model.AssociationsModel}, and add it into
* {@link #mAssociationModels} Collection.
*
* @param className
* The class name for {@link org.litepal.tablemanager.model.AssociationsModel}.
* @param associatedClassName
* The associated class name for {@link org.litepal.tablemanager.model.AssociationsModel}.
* @param classHoldsForeignKey
* The class which holds foreign key.
* @param associationType
* The association type for {@link org.litepal.tablemanager.model.AssociationsModel}.
*/
private void addIntoAssociationModelCollection(String className, String associatedClassName,
String classHoldsForeignKey, int associationType) {
AssociationsModel associationModel = new AssociationsModel();
associationModel.setTableName(DBUtility.getTableNameByClassName(className));
associationModel.setAssociatedTableName(DBUtility.getTableNameByClassName(associatedClassName));
associationModel.setTableHoldsForeignKey(DBUtility.getTableNameByClassName(classHoldsForeignKey));
associationModel.setAssociationType(associationType);
mAssociationModels.add(associationModel);
}