当前位置: 首页>>代码示例>>Java>>正文


Java FetchType类代码示例

本文整理汇总了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;
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:7,代码来源:PlmIssue.java

示例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;
}
 
开发者ID:xujeff,项目名称:tianti,代码行数:8,代码来源:Role.java

示例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;}
 
开发者ID:awslabs,项目名称:aws-photosharing-example,代码行数:8,代码来源:Media.java

示例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 );
		}
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:JPAOverriddenAnnotationReader.java

示例5: getBundle

import javax.persistence.FetchType; //导入依赖的package包/类
@JoinColumn(nullable = false)
@ManyToOne(fetch = FetchType.LAZY)
@Index(name = "bundleIndex")
public LanguageBundle getBundle()
{
	return bundle;
}
 
开发者ID:equella,项目名称:Equella,代码行数:8,代码来源:LanguageString.java

示例6: getFetchMode

import javax.persistence.FetchType; //导入依赖的package包/类
public static FetchMode getFetchMode(FetchType fetch) {
	if ( fetch == FetchType.EAGER ) {
		return FetchMode.JOIN;
	}
	else {
		return FetchMode.SELECT;
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:AnnotationBinder.java

示例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;
}
 
开发者ID:xujeff,项目名称:tianti,代码行数:10,代码来源:User.java

示例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;
}
 
开发者ID:fgulan,项目名称:java-course,代码行数:12,代码来源:BlogEntry.java

示例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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:Payment.java

示例10: getDictInfos

import javax.persistence.FetchType; //导入依赖的package包/类
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "dictType")
public Set<DictInfo> getDictInfos() {
    return this.dictInfos;
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:6,代码来源:DictType.java

示例11: getAccountAvatars

import javax.persistence.FetchType; //导入依赖的package包/类
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "accountInfo")
public Set<AccountAvatar> getAccountAvatars() {
    return this.accountAvatars;
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:6,代码来源:AccountInfo.java

示例12: getPhoneRelationss

import javax.persistence.FetchType; //导入依赖的package包/类
/**
 * @return the phoneRelationss
 */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "phoneBasicInfo")
@OrderBy("id")
public List<PhoneRelations> getPhoneRelationss() {
    return phoneRelationss;
}
 
开发者ID:zhaoxi1988,项目名称:sjk,代码行数:9,代码来源:PhoneBasicInfo.java

示例13: getOffice

import javax.persistence.FetchType; //导入依赖的package包/类
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "office_id")
public QOffice getOffice() {
    return office;
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:6,代码来源:QUser.java

示例14: getUserAccountType

import javax.persistence.FetchType; //导入依赖的package包/类
/** @return null. */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "TYPE_ID")
public UserAccountType getUserAccountType() {
    return this.userAccountType;
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:7,代码来源:UserAccount.java

示例15: getDepartments

import javax.persistence.FetchType; //导入依赖的package包/类
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="company")
public Set<Department> getDepartments() {
    return this.departments;
}
 
开发者ID:amritbhat786,项目名称:DocIT,代码行数:5,代码来源:Company.java


注:本文中的javax.persistence.FetchType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。