当前位置: 首页>>代码示例>>Java>>正文


Java Entity.implementsInterface方法代码示例

本文整理汇总了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");
}
 
开发者ID:xsingHu,项目名称:xs-android-architecture,代码行数:8,代码来源:SimpleDaoGeneratorTest.java

示例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");
}
 
开发者ID:sne11ius,项目名称:GeoTracker,代码行数:12,代码来源:GeoTrackerDaoGenerator.java

示例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");

    
   
}
 
开发者ID:cnevinc,项目名称:togather,代码行数:30,代码来源:YummyDaoGenerator.java

示例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);
    }
 
开发者ID:unfoldingWord-dev,项目名称:uw-android,代码行数:13,代码来源:MyDaoGenerator.java

示例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;
    }
 
开发者ID:unfoldingWord-dev,项目名称:uw-android,代码行数:15,代码来源:MyDaoGenerator.java

示例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;
    }
 
开发者ID:unfoldingWord-dev,项目名称:uw-android,代码行数:16,代码来源:MyDaoGenerator.java

示例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();
}
 
开发者ID:itsmechlark,项目名称:greendao-cipher,代码行数:9,代码来源:TestDaoGenerator.java

示例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");
}
 
开发者ID:dsoulayrol,项目名称:android-sholi,代码行数:12,代码来源:Generator.java

示例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);
}
 
开发者ID:scifiswapnil,项目名称:gadgetbridge_artikcloud,代码行数:7,代码来源:GBDaoGenerator.java


注:本文中的de.greenrobot.daogenerator.Entity.implementsInterface方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。