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

io.crnk.jpa.query.JpaQueryFactory Maven / Gradle / Ivy

There is a newer version: 2.6.20180522184741
Show newest version
package io.crnk.jpa.query;

import java.util.List;

public interface JpaQueryFactory {

	/**
	 * Called by the JPA module ones initalized.
	 *
	 * @param context to access entityManager, meta-data, etc.
	 */
	void initalize(JpaQueryFactoryContext context);

	/**
	 * Builds a new query for the given entity class.
	 *
	 * @param          entity
	 * @param entityClass to query
	 * @return query
	 */
	 JpaQuery query(Class entityClass);

	/**
	 * Builds a new query for the given attribute. Used to retrieve relations of
	 * an entity.
	 *
	 * @param                parent entity
	 * @param parentEntityClass to fetch children from
	 * @param childrenAttrName  on parent entity
	 * @param parentIds         to retrieve the children from
	 * @return query
	 */
	 JpaQuery query(Class parentEntityClass, String childrenAttrName, List parentIds);

	/**
	 * @return ComputedAttributeRegistry holding registered computed attributes
	 */
	ComputedAttributeRegistry getComputedAttributes();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy