當前位置: 首頁>>代碼示例>>Java>>正文


Java FetchType.EAGER屬性代碼示例

本文整理匯總了Java中javax.persistence.FetchType.EAGER屬性的典型用法代碼示例。如果您正苦於以下問題:Java FetchType.EAGER屬性的具體用法?Java FetchType.EAGER怎麽用?Java FetchType.EAGER使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在javax.persistence.FetchType的用法示例。


在下文中一共展示了FetchType.EAGER屬性的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getPlanServices

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true)
@JoinColumn(name = "user_id", insertable = false, nullable = false, updatable = false)
// MOSCOW
@Fetch(FetchMode.SELECT)
// Это отсечение дублирования при джойне таблици, т.к. в QPlanService есть @OneToOne к QService, и в нем есть @OneToMany к QServiceLang - дублится по
// количеству переводов
// This is the truncation of the duplication when the table joins, since In QPlanService there is @OneToOne to QService, and there is @OneToMany to
// QServiceLang - it is duplicated by the number of translations.
public List<QPlanService> getPlanServices() {
    return planServices;
}
 
開發者ID:bcgov,項目名稱:sbc-qsystem,代碼行數:11,代碼來源:QUser.java

示例2: getFetchMode

public static FetchMode getFetchMode(FetchType fetch) {
	if ( fetch == FetchType.EAGER ) {
		return FetchMode.JOIN;
	}
	else {
		return FetchMode.SELECT;
	}
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:8,代碼來源:AnnotationBinder.java

示例3: getGoods8JPASet

@OneToMany(targetEntity = Goods8JPA.class, cascade = CascadeType.ALL,
          fetch = FetchType.EAGER)
@JoinColumn(name = "join_user_goodsSet", foreignKey =
@ForeignKey(name = "join_fk_user_goodsSet"))
@JoinTable(name = "jpa_user_goodsSet_table", foreignKey =
@ForeignKey(name = "table_user_goodsSet"))
public Set<Goods8JPA> getGoods8JPASet()
{
    return goods8JPASet;
}
 
開發者ID:SessionFactory,項目名稱:tinyshop8,代碼行數:10,代碼來源:User8JPA.java

示例4: getCode

/**
 * @return code
 */
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumn(name = "idCode")
public AccessCodeEntity getCode() {

  return this.code;
}
 
開發者ID:oasp,項目名稱:oasp-tutorial-sources,代碼行數:9,代碼來源:VisitorEntity.java

示例5: getEmployees

@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER, mappedBy="company")
public Set<Employee> getEmployees() {
    return this.employees;
}
 
開發者ID:amritbhat786,項目名稱:DocIT,代碼行數:4,代碼來源:Company.java

示例6: getUser

@ManyToOne(fetch=FetchType.EAGER, optional=false)
public User getUser() {return user;}
 
開發者ID:awslabs,項目名稱:aws-photosharing-example,代碼行數:2,代碼來源:Share.java

示例7: getSharedWith

@ManyToOne(fetch=FetchType.EAGER, optional=true)
public User getSharedWith() {return sharedWith;}
 
開發者ID:awslabs,項目名稱:aws-photosharing-example,代碼行數:2,代碼來源:Share.java

示例8: getFuncionario

@ManyToOne(fetch = FetchType.EAGER)
public Funcionario getFuncionario() {
	return funcionario;
}
 
開發者ID:m4rciosouza,項目名稱:ponto-inteligente-api,代碼行數:4,代碼來源:Lancamento.java

示例9: getEmpresa

@ManyToOne(fetch = FetchType.EAGER)
public Empresa getEmpresa() {
	return empresa;
}
 
開發者ID:m4rciosouza,項目名稱:ponto-inteligente-api,代碼行數:4,代碼來源:Funcionario.java

示例10: getUser

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "userId", nullable = false)
public UserModel getUser() {
	return user;
}
 
開發者ID:imaTowan,項目名稱:Towan,代碼行數:5,代碼來源:UserRoleModel.java

示例11: getOffice

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "office_id")
public QOffice getOffice() {
    return office;
}
 
開發者ID:bcgov,項目名稱:sbc-qsystem,代碼行數:5,代碼來源:QUser.java

示例12: getPessoa

@ManyToOne(fetch = FetchType.EAGER)
public Pessoa getPessoa() {
	return pessoa;
}
 
開發者ID:SergioColetto,項目名稱:borabeber-api,代碼行數:4,代碼來源:Estabelecimento.java

示例13: getEstabelecimento

@ManyToOne(fetch = FetchType.EAGER)
public Estabelecimento getEstabelecimento() {
	return estabelecimento;
}
 
開發者ID:SergioColetto,項目名稱:borabeber-api,代碼行數:4,代碼來源:Promocao.java

示例14:

@ManyToOne(targetEntity = User8JPA.class, cascade = CascadeType.ALL,
              fetch = FetchType.EAGER)
    @JoinColumn(name = "join_m2o_goods_user", foreignKey =
    @ForeignKey(name = "fk_join_m2o_goods_user"))
    public User8JPA getUser8JPA()
    {
        return user8JPA;
    } 
開發者ID:SessionFactory,項目名稱:tinyshop8,代碼行數:8,代碼來源:Goods8JPA.java


注:本文中的javax.persistence.FetchType.EAGER屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。