HHH-6225 Add support to find entities by date in one single query (checkstyle fixes)

This commit is contained in:
Steve Ebersole 2016-01-11 14:20:57 -06:00
parent efae886634
commit 6ed765ede3
1 changed files with 5 additions and 6 deletions

View File

@ -6,17 +6,12 @@
*/
package org.hibernate.envers.internal.reader;
import static org.hibernate.envers.internal.tools.ArgumentsTools.checkNotNull;
import static org.hibernate.envers.internal.tools.ArgumentsTools.checkPositive;
import static org.hibernate.envers.internal.tools.EntityTools.getTargetClassIfProxied;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.persistence.NoResultException;
import org.hibernate.Criteria;
@ -35,6 +30,10 @@ import org.hibernate.envers.query.AuditQueryCreator;
import org.hibernate.event.spi.EventSource;
import org.hibernate.proxy.HibernateProxy;
import static org.hibernate.envers.internal.tools.ArgumentsTools.checkNotNull;
import static org.hibernate.envers.internal.tools.ArgumentsTools.checkPositive;
import static org.hibernate.envers.internal.tools.EntityTools.getTargetClassIfProxied;
/**
* @author Adam Warski (adam at warski dot org)
* @author Hernán Chanfreau
@ -143,7 +142,7 @@ public class AuditReaderImpl implements AuditReaderImplementor {
@Override
public <T> T find(Class<T> cls, Object primaryKey, Date date)
throws IllegalArgumentException, NotAuditedException, RevisionDoesNotExistException, IllegalStateException {
return find(cls, primaryKey, getRevisionNumberForDate(date));
return find( cls, primaryKey, getRevisionNumberForDate( date ) );
}
@Override