本文整理匯總了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;
}
示例2: getFetchMode
public static FetchMode getFetchMode(FetchType fetch) {
if ( fetch == FetchType.EAGER ) {
return FetchMode.JOIN;
}
else {
return FetchMode.SELECT;
}
}
示例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;
}
示例4: getCode
/**
* @return code
*/
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumn(name = "idCode")
public AccessCodeEntity getCode() {
return this.code;
}
示例5: getEmployees
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER, mappedBy="company")
public Set<Employee> getEmployees() {
return this.employees;
}
示例6: getUser
@ManyToOne(fetch=FetchType.EAGER, optional=false)
public User getUser() {return user;}
示例7: getSharedWith
@ManyToOne(fetch=FetchType.EAGER, optional=true)
public User getSharedWith() {return sharedWith;}
示例8: getFuncionario
@ManyToOne(fetch = FetchType.EAGER)
public Funcionario getFuncionario() {
return funcionario;
}
示例9: getEmpresa
@ManyToOne(fetch = FetchType.EAGER)
public Empresa getEmpresa() {
return empresa;
}
示例10: getUser
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "userId", nullable = false)
public UserModel getUser() {
return user;
}
示例11: getOffice
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "office_id")
public QOffice getOffice() {
return office;
}
示例12: getPessoa
@ManyToOne(fetch = FetchType.EAGER)
public Pessoa getPessoa() {
return pessoa;
}
示例13: getEstabelecimento
@ManyToOne(fetch = FetchType.EAGER)
public Estabelecimento getEstabelecimento() {
return estabelecimento;
}
示例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;
}