Example usage for org.hibernate.annotations FetchMode SELECT

List of usage examples for org.hibernate.annotations FetchMode SELECT

Introduction

In this page you can find the example usage for org.hibernate.annotations FetchMode SELECT.

Prototype

FetchMode SELECT

To view the source code for org.hibernate.annotations FetchMode SELECT.

Click Source Link

Document

Use a secondary select for each individual entity, collection, or join load.

Usage

From source file:com.gisgraphy.domain.geoloc.entity.Adm.java

License:Open Source License

/**
 * 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/*from w ww.j a v a  2  s. c  om*/
 */
@OneToMany(cascade = { CascadeType.ALL }, mappedBy = "parent")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Fetch(FetchMode.SELECT)
public List<Adm> getChildren() {
    return children;
}

From source file:com.gisgraphy.domain.geoloc.entity.GisFeature.java

License:Open Source License

/**
 * @return A list of the {@link AlternateName}s for this GisFeature
 *///w  w w . java 2s.c o  m
@OneToMany(cascade = { CascadeType.ALL }, mappedBy = "gisFeature")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Fetch(FetchMode.SELECT)
public Set<AlternateName> getAlternateNames() {
    return alternateNames;
}

From source file:com.gisgraphy.domain.geoloc.entity.GisFeature.java

License:Open Source License

/**
 * @return the zip codes for the city/*from  w  ww.  j av a  2 s. c  om*/
 */
@OneToMany(cascade = { CascadeType.ALL }, mappedBy = "gisFeature")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Fetch(FetchMode.SELECT)
//TODO tests zip
public Set<ZipCode> getZipCodes() {
    return zipCodes;
}

From source file:com.gisgraphy.domain.geoloc.entity.OpenStreetMap.java

License:Open Source License

/**
 * @return A list of the {@link AlternateName}s for this street
 */// w  w w .ja  v  a 2s .com
@OneToMany(cascade = { CascadeType.ALL }, mappedBy = "street")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Fetch(FetchMode.SELECT)
public List<AlternateOsmName> getAlternateNames() {
    return alternateNames;
}

From source file:com.gisgraphy.domain.geoloc.entity.OpenStreetMap.java

License:Open Source License

/**
 * @return the houseNumbers associated to that street
 *//*from w w w . j  a v a  2  s. c  o m*/
@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;
}

From source file:com.nec.harvest.model.MenuH.java

License:Open Source License

@OneToMany(mappedBy = "pk.parent", targetEntity = MenuD.class)
@Fetch(FetchMode.SELECT)
public List<MenuD> getChildren() {
    return children;
}

From source file:com.ppcxy.cyfm.sys.entity.user.User.java

License:Apache License

@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "cy_sys_user_role", joinColumns = { @JoinColumn(name = "user_id") }, inverseJoinColumns = {
        @JoinColumn(name = "role_id") })
// Fecth/*  w  w  w .  j  a  va  2s  .c  o  m*/
@Fetch(FetchMode.SELECT)
@Basic(optional = true, fetch = FetchType.EAGER)
// ?id?
@OrderBy("id ASC")
// 
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public List<Role> getRoleList() {
    return roleList;
}

From source file:com.sapienter.jbilling.server.report.db.ReportDTO.java

License:Open Source License

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "report")
@Fetch(FetchMode.SELECT)
public List<ReportParameterDTO<?>> getParameters() {
    return parameters;
}

From source file:de.metanome.backend.results_db.Execution.java

License:Apache License

@ManyToMany(fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE })
@Fetch(value = FetchMode.SELECT)
@JoinTable(name = "execution_input", joinColumns = {
        @JoinColumn(name = "execution_id") }, inverseJoinColumns = { @JoinColumn(name = "input_id") })
public List<Input> getInputs() {
    return inputs;
}

From source file:edu.scripps.fl.curves.Curve.java

License:Apache License

@Type(type = "DoubleListStringType")
@Fetch(value = FetchMode.SELECT)
@Column(name = "concentrations", length = 4000)
public List<Double> getConcentrations() {
    return concentrations;
}