當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。