Example usage for javax.persistence FetchType EAGER

List of usage examples for javax.persistence FetchType EAGER

Introduction

In this page you can find the example usage for javax.persistence FetchType EAGER.

Prototype

FetchType EAGER

To view the source code for javax.persistence FetchType EAGER.

Click Source Link

Document

Defines that data must be eagerly fetched.

Usage

From source file:com.doculibre.constellio.entities.Record.java

@OneToMany(mappedBy = "record", cascade = { CascadeType.ALL }, fetch = FetchType.EAGER, orphanRemoval = true)
public Set<RecordTag> getRecordTags() {
    return recordTags;
}

From source file:de.terrestris.shogun.model.MapLayer.java

/**
 * @return the groups/*from ww  w.  jav a  2s.c  o m*/
 */
@ManyToMany(mappedBy = "mapLayers", fetch = FetchType.EAGER)
//   @JsonIgnore
@Fetch(FetchMode.SUBSELECT)
@JsonSerialize(using = LeanBaseModelSetSerializer.class)
public Set<Group> getGroups() {
    return groups;
}

From source file:de.terrestris.shogun.model.Group.java

/**
 * @return the roles//from w w w  .j  av a 2s .c  o  m
 */
@ManyToMany(fetch = FetchType.EAGER, targetEntity = Role.class)
@JoinTable(name = "TBL_GROUP_TBL_ROLE", joinColumns = {
        @JoinColumn(name = "GROUP_ID", nullable = false, updatable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "ROLE_ID", nullable = false, updatable = false) })
@Fetch(FetchMode.SUBSELECT)
@JsonSerialize(using = LeanBaseModelSetSerializer.class)
public Set<Role> getRoles() {
    return roles;
}

From source file:it.infn.ct.futuregateway.apiserver.resources.Task.java

/**
 * Retrieve the input files for the application. This is a map of files sent
 * to the remote infrastructure for the execution of the application and/or
 * service. The map key is the file name and the map value is an URL
 * locating the file.// w ww.  ja  va  2s  .c o  m
 * <p>
 * The URL can be local or remote to the service.
 *
 * @return The input files
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
public List<TaskFileInput> getInputFiles() {
    return this.inputFiles;
}

From source file:de.terrestris.shogun.model.MapLayer.java

/**
 * @return the additionalOwners//from   www  .  j  a  va 2 s .c  o  m
 */
@ManyToMany(fetch = FetchType.EAGER, targetEntity = User.class)
@Fetch(value = FetchMode.JOIN)
@JoinTable(name = "TBL_MAPLAYER_TBL_ADDOWNERS", joinColumns = {
        @JoinColumn(name = "MAPLAYER_ID", nullable = false, updatable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "ADD_OWNER_ID", nullable = false, updatable = false) })
@JsonSerialize(using = LeanBaseModelSetSerializer.class)
public Set<User> getAdditionalOwners() {
    return additionalOwners;
}

From source file:com.openlegacy.enterprise.ide.eclipse.editors.pages.details.jpa.FieldsJpaManyToOneFieldDetailsPage.java

private static String[] getFetchTypeItems() {
    List<String> list = new ArrayList<String>();
    list.add(FetchType.EAGER.toString());
    list.add(FetchType.LAZY.toString());
    return list.toArray(new String[] {});
}

From source file:org.mitre.oauth2.model.ClientDetailsEntity.java

/**
 * @return the scope/*from  ww  w .  j a va2  s .c o  m*/
 */
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "client_scope", joinColumns = @JoinColumn(name = "owner_id"))
@Override
@Column(name = "scope")
public Set<String> getScope() {
    return scope;
}

From source file:org.mitre.oauth2.model.ClientDetailsEntity.java

/**
 * @return the authorizedGrantTypes/*  ww  w. j av  a  2  s .c o m*/
 */
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "client_grant_type", joinColumns = @JoinColumn(name = "owner_id"))
@Column(name = "grant_type")
public Set<String> getGrantTypes() {
    return grantTypes;
}

From source file:it.infn.ct.futuregateway.apiserver.resources.Task.java

/**
 * Returns the runtime information.//from  ww w  .j a va 2  s  .c o m
 * Runtime information are retrieved by the system during the submission and
 * or execution of the task and can be relevant to the user. E.g. in case of
 * task running a VM the relevant information could be the IP and the
 * credentials of the machine.
 *
 * @return List of runtime
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
public List<RuntimeParams> getRuntime() {
    return runtime;
}

From source file:edu.ku.brc.specify.datamodel.SpQueryField.java

/**
 * @return the fields//from w ww .ja  v  a2 s  .  co m
 */
@OneToMany(fetch = FetchType.EAGER, mappedBy = "queryField")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.LOCK })
public Set<SpExportSchemaItemMapping> getMappings() {
    return mappings;
}