Java 类org.hibernate.annotations.FetchMode 实例源码

项目:omr    文件:GrupoVO.java   
/**
 * 
 * @return
 */
@ElementCollection(targetClass=EAuthority.class,fetch=FetchType.EAGER)
@JoinTable(name = "grupo_autorities")
@Enumerated(EnumType.STRING)
@Fetch(FetchMode.SELECT)
public List<EAuthority> getAuthorities() {
    return authorities;
}
项目:lams    文件:FetchProfileBinder.java   
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 ) );
}
项目:omr    文件:RelatorioVO.java   
/**
 * @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;
}
项目:Equella    文件:LanguageBundle.java   
@OneToMany(cascade = CascadeType.ALL, mappedBy = "bundle")
@Fetch(value = FetchMode.SELECT)
@MapKey(name = "locale")
public Map<String, LanguageString> getStrings()
{
    return strings;
}
项目:sbc-qsystem    文件:QUser.java   
@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;
}
项目:helium    文件:ExpedientTipus.java   
@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;
}
项目:helium    文件:ExpedientTipus.java   
@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;
}
项目:SpringBBS    文件:AcctUser.java   
@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;
}
项目:SpringBBS    文件:AcctUser.java   
@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;
}
项目:gisgraphy    文件:Adm.java   
/**
    * 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;
   }
项目:gisgraphy    文件:OpenStreetMap.java   
/**
 * @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;
}
项目:gisgraphy    文件:OpenStreetMap.java   
/**
 * @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;
}
项目:gisgraphy    文件:GisFeature.java   
/**
    * @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;
}
项目:hotel_shop    文件:RelMailNewsletterGroup.java   
@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;
}
项目:hotel_shop    文件:RelReqServHotelTmContactEasy.java   
@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;
}
项目:hotel_shop    文件:RelServTransferTmContact.java   
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, optional = true)
@JoinColumn(name="serv_transfers_id")
public ServTransfer getServTransfer() {
    return this.servTransfer;
}
项目:WebBoxter    文件:AnswerEntity.java   
@Fetch(FetchMode.SELECT)
@ManyToOne(cascade = {CascadeType.MERGE, CascadeType.REFRESH, CascadeType.PERSIST}, optional = false)
@NotNull(message = NOT_NULL)
@JoinColumn(name = "QUESTION_ID", referencedColumnName = "ID", nullable = false)
public QuestionEntity getQuestionByQuestionId() {
    return questionByQuestionId;
}
项目:hotel_shop    文件:ServHotel.java   
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumn(name="contactinformation_id")
public InfoContactInformation getInfoContactInformation() {
    return this.infoContactInformation;
}
项目:omr    文件:RelatorioVO.java   
/**
 * @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;
}
项目:hotel_shop    文件:ServHotel.java   
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumn(name="payment_details_id")
public PaymentDetails getPaymentDetails() {
    return this.paymentDetails;
}
项目:hotel_shop    文件:RelServHotelImage.java   
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, optional = true)
@JoinColumn(name="serv_hotel_id")
public ServHotel getServHotel() {
    return this.servHotel;
}
项目:hotel_shop    文件:RelServHotelImage.java   
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, optional = true)
@JoinColumn(name="image_id")
public TmImage getTmImage() {
    return this.tmImage;
}
项目:hotel_shop    文件:RelServHotelDocDocuments.java   
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, optional = true)
@JoinColumn(name="serv_hotel_id")
public ServHotel getServHotel() {
    return this.servHotel;
}
项目:hotel_shop    文件:RelUserDetails.java   
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, optional = true)
@JoinColumn(name="user_details_id")
public UserDetail getUserDetail() {
    return this.userDetail;
}
项目:hotel_shop    文件:RelUserDetails.java   
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, optional = true)
@JoinColumn(name="users_id")
public Users getUsers() {
    return this.users;
}
项目:hotel_shop    文件:RelShopPermission.java   
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, optional = true)
@JoinColumn(name="info_permission_id")
public InfoPermission getInfoPermission() {
    return this.infoPermission;
}
项目:hotel_shop    文件:RelShopPermission.java   
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, optional = true)
@JoinColumn(name="shop_permission_id")
public ShopPermission getShopPermission() {
    return this.shopPermission;
}
项目:hotel_shop    文件:RelServHotelRoomImage.java   
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, optional = true)
@JoinColumn(name="serv_hotel_room_id")
public ServHotelRoom getServHotelRoom() {
    return this.servHotelRoom;
}
项目:hotel_shop    文件:RelServHotelRoomImage.java   
@Fetch(FetchMode.JOIN)
@BatchSize(size = 100)
@ManyToOne(fetch=FetchType.EAGER, optional = true)
@JoinColumn(name="image_id")
public TmImage getTmImage() {
    return this.tmImage;
}
项目:omr    文件:ParticipationVO.java   
/**
 * @return the questionResults
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "participationVO")
@IndexColumn(name = "PK")
@OrderColumn(name = "PK")
@Fetch(FetchMode.SELECT)
public List<CriterionResultVO> getCriterionResults() {
    return criterionResults;
}
项目:testcube-server    文件:TestPlan.java   
@Override
@ManyToOne(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_TESTPLANS_PLANTYPES")
@Index(name = "FK_TESTPLANS_PLANTYPES")
public PlanType getPlanType() {
    return (PlanType) super.getPlanType();
}
项目:omr    文件:PessoaVO.java   
@ElementCollection(targetClass=EAuthority.class,fetch=FetchType.EAGER)
@JoinTable(name = "pessoa_autorities")
@Enumerated(EnumType.STRING)
@Fetch(FetchMode.SELECT)
public List<EAuthority> getAuthorities() {
    return authorities;
}
项目:testcube-server    文件:Version.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_VERSIONS_PRODUCTS")
@Index(name = "IDX_VERSIONS_PRODUCTS")
public Product getProduct() {
    return (Product) super.getProduct();
}
项目:omr    文件:QuestionnaireVO.java   
@JazzProp(name="Questões",renderer=JazzRenderer.SUBMODULE,listable=false, searchable=false)
@ManyToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
//@Column(nullable=true) retirei em 110611 nao faz sentido
@Size(min=1, message="Adicione pelo menos uma questão!")
@Valid
@Fetch(FetchMode.SELECT)//coloquei este fetch pq o hibernate vai multiplicar os resultados, por nao se tratar de um set. Estúpido!
@OrderBy("ordem")
public List<QuestionVO> getQuestions() {
    return questions;
}
项目:testcube-server    文件:Component.java   
@Override
@SuppressWarnings("unchecked")
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "CUB_COMPONENTS_CC_LIST")
@Fetch(FetchMode.SELECT)
public List<User> getDefaultCCList() {
    return super.getDefaultCCList();
}
项目:testcube-server    文件:Category.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_CATEGORIES_PRODUCTS")
@Index(name = "IDX_CATEGORIES_PRODUCTS")
public Product getProduct() {
    return (Product) super.getProduct();
}
项目:omr    文件:GrupoVO.java   
/**
 * 
 * @return
 */
@ElementCollection(targetClass=EAuthority.class,fetch=FetchType.EAGER)
@JoinTable(name = "grupo_autorities")
@Enumerated(EnumType.STRING)
@Fetch(FetchMode.SELECT)
public List<EAuthority> getAuthorities() {
    return authorities;
}
项目:testcube-server    文件:TestCase.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_TESTCASES_TESTPLAN")
@Index(name = "IDX_TESTCASES_TESTPLAN")
public TestPlan getTestPlan() {
    return (TestPlan) super.getTestPlan();
}
项目:omr    文件:ExamVO.java   
/**
 * @return the examOMRMetadataVO
 */
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, fetch=FetchType.EAGER)
@JoinColumn(name = "fk_exam")
@MapKey(name = "omrKey")
@JazzProp(name="",ignore=true)
@Fetch(FetchMode.SELECT)
public Map<String, ExamOMRMetadataVO> getExamOMRMetadataVO() {
    return examOMRMetadataVO;
}
项目:omr    文件:PessoaVO.java   
@ElementCollection(targetClass=EAuthority.class,fetch=FetchType.EAGER)
@JoinTable(name = "pessoa_autorities")
@Enumerated(EnumType.STRING)
@Fetch(FetchMode.SELECT)
public List<EAuthority> getAuthorities() {
    return authorities;
}