本文整理匯總了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;
}