本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}