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

org.hibernate.envers.query.AuditQuery Maven / Gradle / Ivy

There is a newer version: 7.0.0.Beta2
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.envers.query;

import java.util.List;
import jakarta.persistence.NoResultException;
import jakarta.persistence.NonUniqueResultException;
import jakarta.persistence.criteria.JoinType;

import org.hibernate.CacheMode;
import org.hibernate.FlushMode;
import org.hibernate.Incubating;
import org.hibernate.LockMode;
import org.hibernate.envers.exception.AuditException;
import org.hibernate.envers.query.criteria.AuditCriterion;
import org.hibernate.envers.query.order.AuditOrder;
import org.hibernate.envers.query.projection.AuditProjection;

/**
 * @author Adam Warski (adam at warski dot org)
 */
public interface AuditQuery {
	List getResultList() throws AuditException;

	Object getSingleResult() throws AuditException, NonUniqueResultException, NoResultException;

	AuditAssociationQuery traverseRelation(String associationName, JoinType joinType);

	AuditAssociationQuery traverseRelation(
			String associationName,
			JoinType joinType,
			String alias);

	@Incubating
	AuditAssociationQuery traverseRelation(
			String associationName,
			JoinType joinType,
			String alias,
			AuditCriterion onClauseCriterion);

	AuditQuery add(AuditCriterion criterion);

	AuditQuery addProjection(AuditProjection projection);

	AuditQuery addOrder(AuditOrder order);

	AuditQuery setMaxResults(int maxResults);

	AuditQuery setFirstResult(int firstResult);

	AuditQuery setCacheable(boolean cacheable);

	AuditQuery setCacheRegion(String cacheRegion);

	AuditQuery setComment(String comment);

	AuditQuery setFlushMode(FlushMode flushMode);

	AuditQuery setCacheMode(CacheMode cacheMode);

	AuditQuery setTimeout(int timeout);

	AuditQuery setLockMode(LockMode lockMode);

	String getAlias();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy