當前位置: 首頁>>代碼示例>>Java>>正文


Java FetchMode類代碼示例

本文整理匯總了Java中org.hibernate.annotations.FetchMode的典型用法代碼示例。如果您正苦於以下問題:Java FetchMode類的具體用法?Java FetchMode怎麽用?Java FetchMode使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


FetchMode類屬於org.hibernate.annotations包,在下文中一共展示了FetchMode類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getAuthorities

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
/**
 * 
 * @return
 */
@ElementCollection(targetClass=EAuthority.class,fetch=FetchType.EAGER)
@JoinTable(name = "grupo_autorities")
@Enumerated(EnumType.STRING)
@Fetch(FetchMode.SELECT)
public List<EAuthority> getAuthorities() {
	return authorities;
}
 
開發者ID:darciopacifico,項目名稱:omr,代碼行數:12,代碼來源:GrupoVO.java

示例2: bind

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
private static void bind(MetadataImplementor metadata, AnnotationInstance fetchProfile) {
	String name = JandexHelper.getValue( fetchProfile, "name", String.class );
	Set<Fetch> fetches = new HashSet<Fetch>();
	AnnotationInstance[] overrideAnnotations = JandexHelper.getValue(
			fetchProfile,
			"fetchOverrides",
			AnnotationInstance[].class
	);
	for ( AnnotationInstance override : overrideAnnotations ) {
		FetchMode fetchMode = JandexHelper.getEnumValue( override, "mode", FetchMode.class );
		if ( !fetchMode.equals( org.hibernate.annotations.FetchMode.JOIN ) ) {
			throw new MappingException( "Only FetchMode.JOIN is currently supported" );
		}
		final String entityName = JandexHelper.getValue( override, "entity", String.class );
		final String associationName = JandexHelper.getValue( override, "association", String.class );
		fetches.add( new Fetch( entityName, associationName, fetchMode.toString().toLowerCase() ) );
	}
	metadata.addFetchProfile( new FetchProfile( name, fetches ) );
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:20,代碼來源:FetchProfileBinder.java

示例3: getPlanServices

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
@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;
}
 
開發者ID:bcgov,項目名稱:sbc-qsystem,代碼行數:12,代碼來源:QUser.java

示例4: getExamOMRMetadataVO

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
/**
 * @return the examOMRMetadataVO
 */
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, fetch=FetchType.EAGER)
@JoinColumn(name = "fk_relatorio")
@MapKey(name = "omrKey")
@JazzProp(name="",ignore=true)
@Fetch(FetchMode.SELECT)
public Map<String, ExamOMRMetadataVO> getExamOMRMetadataVO() {
	return examOMRMetadataVO;
}
 
開發者ID:darciopacifico,項目名稱:omr,代碼行數:12,代碼來源:RelatorioVO.java

示例5: getStrings

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
@OneToMany(cascade = CascadeType.ALL, mappedBy = "bundle")
@Fetch(value = FetchMode.SELECT)
@MapKey(name = "locale")
public Map<String, LanguageString> getStrings()
{
	return strings;
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:8,代碼來源:LanguageBundle.java

示例6: getSequenciaAny

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
@OneToMany(mappedBy="expedientTipus", cascade={CascadeType.ALL}, fetch=FetchType.EAGER)
@Fetch(value = FetchMode.SUBSELECT)
@MapKey(name = "any")
@Sort(type = SortType.NATURAL)
public SortedMap<Integer, SequenciaAny> getSequenciaAny() {
	return sequenciaAny;
}
 
開發者ID:GovernIB,項目名稱:helium,代碼行數:8,代碼來源:ExpedientTipus.java

示例7: getSequenciaDefaultAny

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
@OneToMany(mappedBy="expedientTipus", cascade={CascadeType.ALL}, fetch=FetchType.EAGER)
@Fetch(value = FetchMode.SUBSELECT)
@MapKey(name = "any")
@Sort(type = SortType.NATURAL)
public SortedMap<Integer, SequenciaDefaultAny> getSequenciaDefaultAny() {
	return sequenciaDefaultAny;
}
 
開發者ID:GovernIB,項目名稱:helium,代碼行數:8,代碼來源:ExpedientTipus.java

示例8: getBadges

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
@ManyToMany
@JoinTable(name = "user_badge", joinColumns = { @JoinColumn(name = "user_id") }, inverseJoinColumns = { @JoinColumn(name = "badge_id") })
@Fetch(FetchMode.SUBSELECT)
@OrderBy("id")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public Set<Badge> getBadges() {
	return badges;
}
 
開發者ID:muzili90,項目名稱:SpringBBS,代碼行數:9,代碼來源:AcctUser.java

示例9: getRoleList

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
@ManyToMany
//�м����,��������Ĭ����������
@JoinTable(name = "ACCT_USER_ROLE", joinColumns = { @JoinColumn(name = "USER_ID") }, inverseJoinColumns = { @JoinColumn(name = "ROLE_ID") })
//Fecth���Զ���
@Fetch(FetchMode.SUBSELECT)
//���ϰ�id����.
@OrderBy("id")
//�����ж���id�Ļ���.
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public List<AcctRole> getRoleList() {
	return roleList;
}
 
開發者ID:muzili90,項目名稱:SpringBBS,代碼行數:13,代碼來源:AcctUser.java

示例10: getChildren

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
/**
    * Return the Adms of a directly higher Level in the adm the tree structure
    * @return The Adms of a directly higher Level <br>
    * <b>Example</b> Returns the Adm(s) with level 2 if the current
    *         Adm has a level equals to 1
    */
   @OneToMany(cascade = { CascadeType.ALL }, mappedBy = "parent")
   @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
   @Fetch(FetchMode.SELECT)
   public List<Adm> getChildren() {
return children;
   }
 
開發者ID:gisgraphy,項目名稱:gisgraphy,代碼行數:13,代碼來源:Adm.java

示例11: getAlternateNames

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
/**
 * @return A list of the {@link AlternateName}s for this street
 */
@OneToMany(cascade = { CascadeType.ALL }, mappedBy = "street")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Fetch(FetchMode.SELECT)
public List<AlternateOsmName> getAlternateNames() {
	return alternateNames;
}
 
開發者ID:gisgraphy,項目名稱:gisgraphy,代碼行數:10,代碼來源:OpenStreetMap.java

示例12: getHouseNumbers

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
/**
 * @return the houseNumbers associated to that street
 */
@OneToMany(cascade = { CascadeType.ALL }, mappedBy = "street")
   @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
   @Fetch(FetchMode.SELECT)
@Sort(comparator=HouseNumberComparator.class,type=SortType.COMPARATOR)
public SortedSet<HouseNumber> getHouseNumbers() {
	return houseNumbers;
}
 
開發者ID:gisgraphy,項目名稱:gisgraphy,代碼行數:11,代碼來源:OpenStreetMap.java

示例13: getZipCodes

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
/**
    * @return the zip codes for the city
    */
@OneToMany(cascade = { CascadeType.ALL }, mappedBy = "gisFeature")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Fetch(FetchMode.SELECT)
//TODO tests zip
public Set<ZipCode> getZipCodes() {
	return zipCodes;
}
 
開發者ID:gisgraphy,項目名稱:gisgraphy,代碼行數:11,代碼來源:GisFeature.java

示例14: getTmMailNewsletterGroup

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, optional = true)
@JoinColumn(name="tm_mail_newsletter_group_id")
public TmMailNewsletterGroup getTmMailNewsletterGroup() {
	return this.tmMailNewsletterGroup;
}
 
開發者ID:gleb619,項目名稱:hotel_shop,代碼行數:8,代碼來源:RelMailNewsletterGroup.java

示例15: getTmContactEasy

import org.hibernate.annotations.FetchMode; //導入依賴的package包/類
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, cascade = CascadeType.ALL, optional = true)
@JoinColumn(name="contact_easy_id")
public TmContactEasy getTmContactEasy() {
	return this.tmContactEasy;
}
 
開發者ID:gleb619,項目名稱:hotel_shop,代碼行數:8,代碼來源:RelReqServHotelTmContactEasy.java


注:本文中的org.hibernate.annotations.FetchMode類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。