Methods Summary |
---|
public org.hibernate.Criteria | add(org.hibernate.Criteria criteriaInst, org.hibernate.criterion.Criterion expression)
criterionEntries.add( new CriterionEntry(expression, criteriaInst) );
return this;
|
public org.hibernate.Criteria | add(org.hibernate.criterion.Criterion expression)
add( this, expression );
return this;
|
public org.hibernate.Criteria | addOrder(org.hibernate.criterion.Order ordering)
orderEntries.add( new OrderEntry( ordering, this ) );
return this;
|
protected void | after()
if ( sessionFlushMode != null ) {
getSession().setFlushMode( sessionFlushMode );
sessionFlushMode = null;
}
if ( sessionCacheMode != null ) {
getSession().setCacheMode( sessionCacheMode );
sessionCacheMode = null;
}
|
protected void | before()
if ( flushMode != null ) {
sessionFlushMode = getSession().getFlushMode();
getSession().setFlushMode( flushMode );
}
if ( cacheMode != null ) {
sessionCacheMode = getSession().getCacheMode();
getSession().setCacheMode( cacheMode );
}
|
public org.hibernate.Criteria | createAlias(java.lang.String associationPath, java.lang.String alias)
return createAlias( associationPath, alias, INNER_JOIN );
|
public org.hibernate.Criteria | createAlias(java.lang.String associationPath, java.lang.String alias, int joinType)
new Subcriteria( this, associationPath, alias, joinType );
return this;
|
public org.hibernate.Criteria | createCriteria(java.lang.String associationPath)
return createCriteria( associationPath, INNER_JOIN );
|
public org.hibernate.Criteria | createCriteria(java.lang.String associationPath, int joinType)
return new Subcriteria( this, associationPath, joinType );
|
public org.hibernate.Criteria | createCriteria(java.lang.String associationPath, java.lang.String alias)
return createCriteria( associationPath, alias, INNER_JOIN );
|
public org.hibernate.Criteria | createCriteria(java.lang.String associationPath, java.lang.String alias, int joinType)
return new Subcriteria( this, associationPath, alias, joinType );
|
public java.lang.String | getAlias()
return rootAlias;
|
public java.lang.String | getCacheRegion()
return this.cacheRegion;
|
public boolean | getCacheable()
return this.cacheable;
|
public java.lang.String | getComment()
return comment;
|
public java.lang.String | getEntityOrClassName()
return entityOrClassName;
|
public org.hibernate.FetchMode | getFetchMode(java.lang.String path)
return (FetchMode) fetchModes.get(path);
|
public java.lang.Integer | getFetchSize()
return fetchSize;
|
public java.lang.Integer | getFirstResult()
return firstResult;
|
public java.util.Map | getLockModes()
return lockModes;
|
public java.lang.Integer | getMaxResults()
return maxResults;
|
public org.hibernate.criterion.Projection | getProjection()
return projection;
|
public org.hibernate.Criteria | getProjectionCriteria()
return projectionCriteria;
|
public org.hibernate.transform.ResultTransformer | getResultTransformer()
return resultTransformer;
|
public org.hibernate.engine.SessionImplementor | getSession()
return session;
|
public java.lang.Integer | getTimeout()
return timeout;
|
public boolean | isLookupByNaturalKey()
if ( projection != null ) {
return false;
}
if ( subcriteriaList.size() > 0 ) {
return false;
}
if ( criterionEntries.size() != 1 ) {
return false;
}
CriterionEntry ce = (CriterionEntry) criterionEntries.get(0);
return ce.getCriterion() instanceof NaturalIdentifier;
|
public java.util.Iterator | iterateExpressionEntries()
return criterionEntries.iterator();
|
public java.util.Iterator | iterateOrderings()
return orderEntries.iterator();
|
public java.util.Iterator | iterateSubcriteria()
return subcriteriaList.iterator();
|
public java.util.List | list()
before();
try {
return session.list( this );
}
finally {
after();
}
|
public org.hibernate.ScrollableResults | scroll()
return scroll( ScrollMode.SCROLL_INSENSITIVE );
|
public org.hibernate.ScrollableResults | scroll(org.hibernate.ScrollMode scrollMode)
before();
try {
return session.scroll(this, scrollMode);
}
finally {
after();
}
|
public org.hibernate.Criteria | setCacheMode(org.hibernate.CacheMode cacheMode)
this.cacheMode = cacheMode;
return this;
|
public org.hibernate.Criteria | setCacheRegion(java.lang.String cacheRegion)
this.cacheRegion = cacheRegion.trim();
return this;
|
public org.hibernate.Criteria | setCacheable(boolean cacheable)
this.cacheable = cacheable;
return this;
|
public org.hibernate.Criteria | setComment(java.lang.String comment)
this.comment = comment;
return this;
|
public org.hibernate.Criteria | setFetchMode(java.lang.String associationPath, org.hibernate.FetchMode mode)
fetchModes.put( associationPath, mode );
return this;
|
public org.hibernate.Criteria | setFetchSize(int fetchSize)
this.fetchSize = new Integer(fetchSize);
return this;
|
public org.hibernate.Criteria | setFirstResult(int firstResult)
this.firstResult = new Integer(firstResult);
return this;
|
public org.hibernate.Criteria | setFlushMode(org.hibernate.FlushMode flushMode)
this.flushMode = flushMode;
return this;
|
public org.hibernate.Criteria | setLockMode(org.hibernate.LockMode lockMode)
return setLockMode( getAlias(), lockMode );
|
public org.hibernate.Criteria | setLockMode(java.lang.String alias, org.hibernate.LockMode lockMode)
lockModes.put( alias, lockMode );
return this;
|
public org.hibernate.Criteria | setMaxResults(int maxResults)
this.maxResults = new Integer(maxResults);
return this;
|
public org.hibernate.Criteria | setProjection(org.hibernate.criterion.Projection projection)
this.projection = projection;
this.projectionCriteria = this;
setResultTransformer( PROJECTION );
return this;
|
public org.hibernate.Criteria | setResultTransformer(org.hibernate.transform.ResultTransformer tupleMapper)
this.resultTransformer = tupleMapper;
return this;
|
public void | setSession(org.hibernate.engine.SessionImplementor session)
this.session = session;
|
public org.hibernate.Criteria | setTimeout(int timeout)
this.timeout = new Integer(timeout);
return this;
|
public java.lang.String | toString()
return "CriteriaImpl(" +
entityOrClassName + ":" +
(rootAlias==null ? "" : rootAlias) +
subcriteriaList.toString() +
criterionEntries.toString() +
( projection==null ? "" : projection.toString() ) +
')";
|
public java.lang.Object | uniqueResult()
return AbstractQueryImpl.uniqueElement( list() );
|