本文整理汇总了Java中de.greenrobot.daogenerator.Entity.addImport方法的典型用法代码示例。如果您正苦于以下问题:Java Entity.addImport方法的具体用法?Java Entity.addImport怎么用?Java Entity.addImport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.greenrobot.daogenerator.Entity
的用法示例。
在下文中一共展示了Entity.addImport方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addCommonActivitySampleProperties
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addCommonActivitySampleProperties(String superClass, Entity activitySample, Entity user, Entity device) {
activitySample.setSuperclass(superClass);
activitySample.addImport(MAIN_PACKAGE + ".devices.SampleProvider");
activitySample.setJavaDoc(
"This class represents a sample specific to the device. Values like activity kind or\n" +
"intensity, are device specific. Normalized values can be retrieved through the\n" +
"corresponding {@link SampleProvider}.");
activitySample.addIntProperty("timestamp").notNull().primaryKey();
Property deviceId = activitySample.addLongProperty("deviceId").primaryKey().getProperty();
activitySample.addToOne(device, deviceId);
Property userId = activitySample.addLongProperty("userId").getProperty();
activitySample.addToOne(user, userId);
}
示例2: addEntity
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static Entity addEntity(Schema schema, String className) {
Entity entity = schema.addEntity(className);
entity.addImport("de.greenrobot.dao.AbstractDao");
return entity;
}