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