當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。