All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.persistence.criteria.FetchParent Maven / Gradle / Ivy

Go to download

Hibernate developmental JSR 317 (Java Persistence API 2.0) contracts. Used to allow incremental implementation of features on the way to full JPA 2.0 support.

The newest version!
// $Id: FetchParent.java 17233 2009-08-05 18:10:41Z [email protected] $
// EJB3 Specification Copyright 2004-2009 Sun Microsystems, Inc.
package javax.persistence.criteria;

import javax.persistence.metamodel.PluralAttribute;
import javax.persistence.metamodel.SingularAttribute;

/**
 * Represents an element of the from clause which may
 * function as the parent of Fetches.
 *
 * @param  The type of the fetch source
 * @param  The type of the fetched attribute/association
 */
public interface FetchParent {

    /**
     *  Return the fetch joins that have been made from this type.
     *  @return fetch joins made from this type
     */
    java.util.Set> getFetches();

    /**
     *  Fetch join to the specified single-valued attribute
     *  using an inner join.
     *  @param attribute  target of the join
     *  @return the resulting fetch join
     */
     Fetch fetch(SingularAttribute attribute);

    /**
     *  Fetch join to the specified single-valued attribute using
     *  the given join type.
     *  @param attribute  target of the join
     *  @param jt  join type
     *  @return the resulting fetch join
     */
     Fetch fetch(SingularAttribute attribute, JoinType jt);

    /**
     *  Fetch join to the specified collection-valued attribute
     *  using an inner join.
     *  @param attribute  target of the join
     *  @return the resulting join
     */
     Fetch fetch(PluralAttribute attribute);

    /**
     *  Fetch join to the specified collection-valued attribute
     *  using the given join type.
     *  @param attribute  target of the join
     *  @param jt  join type
     *  @return the resulting join
     */
     Fetch fetch(PluralAttribute attribute, JoinType jt);


    //String-based:

    /**
     * Fetch join to the specified attribute using an inner join.
	 *
	 * @param  The type of the source of the fetch; note that this method-local  hides the  defined as a type
	 * param to {@link FetchParent}; the expectation is that the two types match.
	 * @param  The type of the fetched attribute/association
     * @param attributeName  name of the attribute for the
     *         target of the join
     * @return the resulting fetch join
     * @throws IllegalArgumentException if attribute of the given
     *          name does not exist
     */
     Fetch fetch(String attributeName);

    /**
	 * Fetch join to the specified attribute using the given
     * join type.
	 *
	 * @param  The type of the source of the fetch; note that this method-local  hides the  defined as a type
	 * param to {@link FetchParent}; the expectation is that the two types match.
	 * @param  The type of the fetched attribute/association
     * @param attributeName  name of the attribute for the
     *               target of the join
     *  @param jt  join type
     *  @return the resulting fetch join
     *  @throws IllegalArgumentException if attribute of the given
     *          name does not exist
     */
     Fetch fetch(String attributeName, JoinType jt);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy