本文整理汇总了Java中javax.persistence.FetchType类的典型用法代码示例。如果您正苦于以下问题:Java FetchType类的具体用法?Java FetchType怎么用?Java FetchType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FetchType类属于javax.persistence包,在下文中一共展示了FetchType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPlmVersions
import javax.persistence.FetchType; //导入依赖的package包/类
/** @return . */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "PLM_ISSUE_VERSION", joinColumns = { @JoinColumn(name = "ISSUE_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "VERSION_ID", nullable = false, updatable = false) })
public Set<PlmVersion> getPlmVersions() {
return this.plmVersions;
}
示例2: getResources
import javax.persistence.FetchType; //导入依赖的package包/类
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "org_role_resource_rel",
joinColumns = {@JoinColumn(name = "role_id")},
inverseJoinColumns = {@JoinColumn(name = "resources_id")})
public Set<Resource> getResources() {
return resources;
}
示例3: getAlbums
import javax.persistence.FetchType; //导入依赖的package包/类
@ManyToMany(fetch=FetchType.LAZY, cascade=CascadeType.PERSIST)
@JoinTable(name = "album_media",
joinColumns = {
@JoinColumn(name = "media_id", nullable = false, updatable = false) },
inverseJoinColumns = {
@JoinColumn(name = "album_id", nullable = false, updatable = false) })
public List<Album> getAlbums() {return albums;}
示例4: getFetchType
import javax.persistence.FetchType; //导入依赖的package包/类
private void getFetchType(AnnotationDescriptor descriptor, Element element) {
String fetchString = element != null ? element.attributeValue( "fetch" ) : null;
if ( fetchString != null ) {
if ( "eager".equalsIgnoreCase( fetchString ) ) {
descriptor.setValue( "fetch", FetchType.EAGER );
}
else if ( "lazy".equalsIgnoreCase( fetchString ) ) {
descriptor.setValue( "fetch", FetchType.LAZY );
}
}
}
示例5: getBundle
import javax.persistence.FetchType; //导入依赖的package包/类
@JoinColumn(nullable = false)
@ManyToOne(fetch = FetchType.LAZY)
@Index(name = "bundleIndex")
public LanguageBundle getBundle()
{
return bundle;
}
示例6: getFetchMode
import javax.persistence.FetchType; //导入依赖的package包/类
public static FetchMode getFetchMode(FetchType fetch) {
if ( fetch == FetchType.EAGER ) {
return FetchMode.JOIN;
}
else {
return FetchMode.SELECT;
}
}
示例7: getRoles
import javax.persistence.FetchType; //导入依赖的package包/类
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "org_user_role_rel",
joinColumns = {@JoinColumn(name = "user_id")},
inverseJoinColumns = {@JoinColumn(name = "role_id")})
@Where(clause="delete_flag=0")
@OrderBy("no")
public Set<Role> getRoles() {
return roles;
}
示例8: getComments
import javax.persistence.FetchType; //导入依赖的package包/类
/**
* Get all comments for current blog entry.
*
* @return List of all comments for current blog entry.
*/
@OneToMany(mappedBy = "blogEntry", fetch = FetchType.LAZY,
cascade = CascadeType.PERSIST, orphanRemoval = true)
@OrderBy("postedOn")
public List<BlogComment> getComments() {
return comments;
}
示例9: getCustomer
import javax.persistence.FetchType; //导入依赖的package包/类
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "customerNumber", nullable = false, insertable = false, updatable = false)
@JsonIgnore
public Customer getCustomer() {
return this.customer;
}
示例10: getDictInfos
import javax.persistence.FetchType; //导入依赖的package包/类
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "dictType")
public Set<DictInfo> getDictInfos() {
return this.dictInfos;
}
示例11: getAccountAvatars
import javax.persistence.FetchType; //导入依赖的package包/类
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "accountInfo")
public Set<AccountAvatar> getAccountAvatars() {
return this.accountAvatars;
}
示例12: getPhoneRelationss
import javax.persistence.FetchType; //导入依赖的package包/类
/**
* @return the phoneRelationss
*/
@OneToMany(fetch = FetchType.LAZY, mappedBy = "phoneBasicInfo")
@OrderBy("id")
public List<PhoneRelations> getPhoneRelationss() {
return phoneRelationss;
}
示例13: getOffice
import javax.persistence.FetchType; //导入依赖的package包/类
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "office_id")
public QOffice getOffice() {
return office;
}
示例14: getUserAccountType
import javax.persistence.FetchType; //导入依赖的package包/类
/** @return null. */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "TYPE_ID")
public UserAccountType getUserAccountType() {
return this.userAccountType;
}
示例15: getDepartments
import javax.persistence.FetchType; //导入依赖的package包/类
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="company")
public Set<Department> getDepartments() {
return this.departments;
}