本文整理汇总了Java中de.greenrobot.daogenerator.Entity.implementsInterface方法的典型用法代码示例。如果您正苦于以下问题:Java Entity.implementsInterface方法的具体用法?Java Entity.implementsInterface怎么用?Java Entity.implementsInterface使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.greenrobot.daogenerator.Entity
的用法示例。
在下文中一共展示了Entity.implementsInterface方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testInterfacesError
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
@Test(expected = RuntimeException.class)
public void testInterfacesError() throws Exception {
Schema schema = new Schema(1, "de.greenrobot.testdao");
Entity addressTable = schema.addEntity("Addresse");
addressTable.implementsInterface("Dummy");
addressTable.implementsInterface("Dummy");
}
示例2: addGeoLocation
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addGeoLocation(final Schema schema) {
final Entity geoLocation = schema.addEntity("GeoLocation");
geoLocation.implementsInterface("nu.wasis.geotracker.model.DomainObject");
geoLocation.addIdProperty();
geoLocation.addDoubleProperty("latitude").notNull();
geoLocation.addDoubleProperty("longitude").notNull();
geoLocation.addDoubleProperty("altitude");
geoLocation.addFloatProperty("accuracy");
geoLocation.addFloatProperty("speed");
geoLocation.addLongProperty("time");
}
示例3: addArticleTable
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addArticleTable(Schema schema) {
Entity restaurant = schema.addEntity("Restaurant");
restaurant.implementsInterface("Serializable");
restaurant.addIdProperty();
restaurant.addStringProperty("description");
restaurant.addStringProperty("address");
restaurant.addStringProperty("source");
restaurant.addStringProperty("time");
restaurant.addStringProperty("name");
restaurant.addStringProperty("latitude");
restaurant.addStringProperty("longitude");
restaurant.addStringProperty("comments");
restaurant.addStringProperty("photos");
restaurant.addStringProperty("price");
restaurant.addStringProperty("rating");
restaurant.addStringProperty("distance");
restaurant.addStringProperty("cover");
Entity user = schema.addEntity("User");
user.addIdProperty();
user.implementsInterface("Serializable");
user.addStringProperty("name");
user.addStringProperty("picture");
user.addStringProperty("lantitude");
user.addStringProperty("longitude");
}
示例4: createBibleChapter
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void createBibleChapter(Schema schema, Entity book) {
DaoHelperMethods.EntityInformation bibleChapterInfo =
new DaoHelperMethods.EntityInformation(ModelNames.BIBLE_CHAPTER, ModelNames.BIBLE_CHAPTER_STRING_ATTRIBUTES);
Entity bibleChapter = DaoHelperMethods.createEntity(schema, bibleChapterInfo);
bibleChapter.setSuperclass(UW_DATABASE_MODEL_PROTOCOL);
bibleChapter.implementsInterface(getComparableInterfaceForClassName(ModelNames.BIBLE_CHAPTER));
DaoHelperMethods.createParentChildRelationship(
book, ModelNames.BOOK_BIBLE_CHAPTERS_ATTRIBUTE,
bibleChapter, ModelNames.BIBLE_CHAPTER_BOOK_ATTRIBUTE);
}
示例5: createStoryChapter
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static Entity createStoryChapter(Schema schema, Entity book) {
DaoHelperMethods.EntityInformation storyChapterInfo =
new DaoHelperMethods.EntityInformation(ModelNames.STORY_CHAPTER, ModelNames.STORY_CHAPTER_STRING_ATTRIBUTES);
Entity storyChapter = DaoHelperMethods.createEntity(schema, storyChapterInfo);
storyChapter.setSuperclass(UW_DATABASE_MODEL_PROTOCOL);
storyChapter.implementsInterface(getComparableInterfaceForClassName(ModelNames.STORY_CHAPTER));
DaoHelperMethods.createParentChildRelationship(
book, ModelNames.BOOK_STORY_CHAPTERS_ATTRIBUTE,
storyChapter, ModelNames.STORY_CHAPTER_BOOK_ATTRIBUTE);
return storyChapter;
}
示例6: createAudioChapter
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static Entity createAudioChapter(Schema schema, Entity audioBook) {
DaoHelperMethods.EntityInformation audioChapterInfo =
new DaoHelperMethods.EntityInformation(ModelNames.AUDIO_CHAPTER, ModelNames.AUDIO_CHAPTER_STRING_ATTRIBUTES);
audioChapterInfo.intAttributes = ModelNames.AUDIO_CHAPTER_INT_ATTRIBUTES;
Entity audioChapter = DaoHelperMethods.createEntity(schema, audioChapterInfo);
audioChapter.setSuperclass(UW_DATABASE_MODEL_PROTOCOL);
audioChapter.implementsInterface(getComparableInterfaceForClassName(ModelNames.AUDIO_CHAPTER));
DaoHelperMethods.createParentChildRelationship(
audioBook, ModelNames.AUDIO_BOOK_AUDIO_CHAPTER_ATTRIBUTE,
audioChapter, ModelNames.AUDIO_CHAPTER_AUDIO_BOOK_ATTRIBUTE);
return audioChapter;
}
示例7: createExtendsImplements
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
protected void createExtendsImplements() {
Entity entity = schema.addEntity("ExtendsImplementsEntity");
entity.addIdProperty();
entity.addStringProperty("text");
entity.setSuperclass("TestSuperclass");
entity.implementsInterface("TestInterface");
entity.implementsSerializable();
}
示例8: addItem
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addItem(Schema schema) {
// Table and column names are overriden to match the ones set
// by the Provider used in previous version.
Entity item = schema.addEntity("Item");
item.setTableName("items");
item.implementsInterface("name.soulayrol.rhaa.sholi.data.model.PersistentObject");
item.implementsInterface("name.soulayrol.rhaa.sholi.data.model.Checkable");
item.addIdProperty().autoincrement();
item.addStringProperty("name").columnName("item").unique().notNull();
item.addIntProperty("status").columnName("status");
}
示例9: addDateValidityTo
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addDateValidityTo(Entity entity) {
entity.addDateProperty(VALID_FROM_UTC);
entity.addDateProperty(VALID_TO_UTC);
entity.implementsInterface(VALID_BY_DATE);
}