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


Java OneToMany类代码示例

本文整理汇总了Java中com.raizlabs.android.dbflow.annotation.OneToMany的典型用法代码示例。如果您正苦于以下问题:Java OneToMany类的具体用法?Java OneToMany怎么用?Java OneToMany使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


OneToMany类属于com.raizlabs.android.dbflow.annotation包,在下文中一共展示了OneToMany类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getIngredients

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = {OneToMany.Method.ALL}, variableName = "ingredients")
public List<DBFlowIngredient> getIngredients() {
    if (ingredients == null || ingredients.isEmpty()) {
        ingredients = SQLite.select()
                .from(DBFlowIngredient.class)
                .where(DBFlowIngredient_Table.recipe_id.eq(id))
                .queryList();
    }
    return ingredients;
}
 
开发者ID:ecarrara-araujo,项目名称:yabaking,代码行数:11,代码来源:DBFlowRecipe.java

示例2: getSteps

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = {OneToMany.Method.ALL}, variableName = "steps")
public List<DBFlowStep> getSteps() {
    if (steps == null || steps.isEmpty()) {
        steps = SQLite.select()
                .from(DBFlowStep.class)
                .where(DBFlowStep_Table.recipe_id.eq(id))
                .orderBy(DBFlowStep_Table.order.asc())
                .queryList();
    }
    return steps;
}
 
开发者ID:ecarrara-araujo,项目名称:yabaking,代码行数:12,代码来源:DBFlowRecipe.java

示例3: getPlaceModels

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = {OneToMany.Method.ALL}, variableName = "placeModels")
public List<PlaceModel> getPlaceModels() {
    if (placeModels == null || placeModels.isEmpty()) {
        placeModels = SQLite.select()
                .from(PlaceModel.class)
                .where(PlaceModel_Table.routeModel_id.eq(id))
                .queryList();
    }
    return placeModels;
}
 
开发者ID:sept-en,项目名称:FlightSight-client,代码行数:11,代码来源:RouteModel.java

示例4: getCards

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
/**
 * Gets the cards in the deck.
 * Cards are loaded when the deck is loaded from the db.
 * Cards are deleted when the deck is deleted from the db.
 * Cards are NOT saved when the deck is saved, and must be saved independently for performance reasons.
 *
 * @return All the cards in the deck
 */
@OneToMany(methods = {OneToMany.Method.LOAD, OneToMany.Method.DELETE}, variableName = "cards")
public List<Card> getCards() {
    if (cards == null || cards.isEmpty()) {
        cards = SQLite.select()
                .from(Card.class)
                .where(Card_Table.deckId_id.eq(id))
                .queryList();
    }
    return cards;
}
 
开发者ID:unparalleled,项目名称:kcards,代码行数:19,代码来源:Deck.java

示例5: records

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = {OneToMany.Method.ALL}, variableName = "recordModels")
public List<RecordModel> records() {
    // get recordModels is this.Id
    if (recordModels == null || recordModels.isEmpty()) {
        recordModels = SQLite.select()
                .from(RecordModel.class)
                .where(RecordModel_Table.contact_Id.eq(id))
                .and(RecordModel_Table.Status.isNot(STATUS_DELETE))
                .queryList();
    }
    return recordModels;
}
 
开发者ID:qiujuer,项目名称:UPMiss,代码行数:13,代码来源:ContactModel.java

示例6: getValues

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = {OneToMany.Method.SAVE, OneToMany.Method.DELETE}, variableName = "values")
public List<Value> getValues() {
    if(values==null){
        values = new Select()
                .from(Value.class)
                .where(Condition.column(Value$Table.ID_QUESTION)
                        .eq(this.getId_question())).queryList();
    }
    return values;
}
 
开发者ID:EyeSeeTea,项目名称:EDSApp,代码行数:11,代码来源:Question.java

示例7: getBuilds

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = ALL)
public List<Build> getBuilds() {
    if (builds == null || builds.isEmpty()) {
        builds = SQLite.select()
                .from(Build.class)
                .where(Build_Table.repoForeignKeyContainer__id.eq(_id))
                .queryList();
    }
    return builds;
}
 
开发者ID:wiyarmir,项目名称:TravisForAndroid,代码行数:11,代码来源:Repo.java

示例8: getValues

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = {OneToMany.Method.SAVE, OneToMany.Method.DELETE}, variableName = "values")
public List<Value> getValues() {
    if (values == null) {
        values = new Select()
                .from(Value.class)
                .where(Value_Table.id_question_fk
                        .eq(this.getId_question())).queryList();
    }
    return values;
}
 
开发者ID:EyeSeeTea,项目名称:malariapp,代码行数:11,代码来源:Question.java

示例9: getOrgUnits

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = {OneToMany.Method.SAVE,
        OneToMany.Method.DELETE}, variableName = "orgUnits")
public List<OrgUnit> getOrgUnits() {
    this.orgUnits = new Select().from(OrgUnit.class)
            .where(OrgUnit_Table.id_org_unit_parent.eq(
                    this.getId_org_unit_level())).queryList();
    return orgUnits;
}
 
开发者ID:EyeSeeTea,项目名称:pictureapp,代码行数:9,代码来源:OrgUnitLevel.java

示例10: getSubGenres

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = { OneToMany.Method.SAVE, OneToMany.Method.DELETE}, variableName = "subGenres")
public List<SubGenre> getSubGenres() {
  if (subGenres == null || subGenres.isEmpty()) {
    subGenres = SQLite.select()
        .from(SubGenre.class)
        .queryList();
  }
  return subGenres;
}
 
开发者ID:ppamorim,项目名称:Amazing-MVP,代码行数:10,代码来源:Genre.java

示例11: getDbPageList

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = {OneToMany.Method.SAVE, OneToMany.Method.DELETE}, variableName = "pageList")
public List<Page> getDbPageList() {
    if (pageList == null) {
        pageList = new ArrayList<>();
    }
    if (pageList.isEmpty()) {
        pageList = SQLite.select()
            .from(Page.class)
            .where(Page_Table.owningIssueId.eq(owningIssueId), Page_Table.subIssue_id.eq(id))
            .queryList();
    }
    return pageList;
}
 
开发者ID:Raizlabs,项目名称:DBFlow,代码行数:14,代码来源:SubIssue.java

示例12: getDbSubIssueList

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = {OneToMany.Method.SAVE, OneToMany.Method.DELETE}, variableName = "subIssueList")
public List<SubIssue> getDbSubIssueList() {
    if (subIssueList == null || subIssueList.isEmpty()) {
        subIssueList = SQLite.select()
            .from(SubIssue.class)
            .where(SubIssue_Table.owningIssueId.eq(id))
            .queryList();
    }
    return subIssueList;
}
 
开发者ID:Raizlabs,项目名称:DBFlow,代码行数:11,代码来源:Issue.java

示例13: getOrgUnits

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = {OneToMany.Method.SAVE, OneToMany.Method.DELETE}, variableName = "orgUnits")
public List<OrgUnit> getOrgUnits(){
    this.orgUnits = new Select().from(OrgUnit.class)
            .where(Condition.column(OrgUnit$Table.ID_PARENT).eq(this.getId_org_unit_level())).queryList();
    return orgUnits;
}
 
开发者ID:EyeSeeTea,项目名称:EDSApp,代码行数:7,代码来源:OrgUnitLevel.java

示例14: getOrgUnits

import com.raizlabs.android.dbflow.annotation.OneToMany; //导入依赖的package包/类
@OneToMany(methods = {OneToMany.Method.SAVE, OneToMany.Method.DELETE}, variableName = "orgUnits")
public List<OrgUnit> getOrgUnits(){
    this.orgUnits = new Select().from(OrgUnit.class)
            .where(OrgUnit_Table.id_org_unit_parent.eq(this.getId_org_unit_level())).queryList();
    return orgUnits;
}
 
开发者ID:EyeSeeTea,项目名称:malariapp,代码行数:7,代码来源:OrgUnitLevel.java


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