| Method from org.hibernate.impl.CriteriaImpl Detail: |
public Criteria add(Criterion expression) {
add( this, expression );
return this;
}
|
public Criteria add(Criteria criteriaInst,
Criterion expression) {
criterionEntries.add( new CriterionEntry(expression, criteriaInst) );
return this;
}
|
public Criteria addOrder(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 Criteria createAlias(String associationPath,
String alias) {
return createAlias( associationPath, alias, INNER_JOIN );
}
|
public Criteria createAlias(String associationPath,
String alias,
int joinType) {
new Subcriteria( this, associationPath, alias, joinType );
return this;
}
|
public Criteria createCriteria(String associationPath) {
return createCriteria( associationPath, INNER_JOIN );
}
|
public Criteria createCriteria(String associationPath,
int joinType) {
return new Subcriteria( this, associationPath, joinType );
}
|
public Criteria createCriteria(String associationPath,
String alias) {
return createCriteria( associationPath, alias, INNER_JOIN );
}
|
public Criteria createCriteria(String associationPath,
String alias,
int joinType) {
return new Subcriteria( this, associationPath, alias, joinType );
}
|
public String getAlias() {
return rootAlias;
}
|
public String getCacheRegion() {
return this.cacheRegion;
}
|
public boolean getCacheable() {
return this.cacheable;
}
|
public String getComment() {
return comment;
}
|
public String getEntityOrClassName() {
return entityOrClassName;
}
|
public FetchMode getFetchMode(String path) {
return (FetchMode) fetchModes.get(path);
}
|
public Integer getFetchSize() {
return fetchSize;
}
|
public Integer getFirstResult() {
return firstResult;
}
|
public Map getLockModes() {
return lockModes;
}
|
public Integer getMaxResults() {
return maxResults;
}
|
public Projection getProjection() {
return projection;
}
|
public Criteria getProjectionCriteria() {
return projectionCriteria;
}
|
public ResultTransformer getResultTransformer() {
return resultTransformer;
}
|
public SessionImplementor getSession() {
return session;
}
|
public 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 Iterator iterateExpressionEntries() {
return criterionEntries.iterator();
}
|
public Iterator iterateOrderings() {
return orderEntries.iterator();
}
|
public Iterator iterateSubcriteria() {
return subcriteriaList.iterator();
}
|
public List list() throws HibernateException {
before();
try {
return session.list( this );
}
finally {
after();
}
}
|
public ScrollableResults scroll() {
return scroll( ScrollMode.SCROLL_INSENSITIVE );
}
|
public ScrollableResults scroll(ScrollMode scrollMode) {
before();
try {
return session.scroll(this, scrollMode);
}
finally {
after();
}
}
|
public Criteria setCacheMode(CacheMode cacheMode) {
this.cacheMode = cacheMode;
return this;
}
|
public Criteria setCacheRegion(String cacheRegion) {
this.cacheRegion = cacheRegion.trim();
return this;
}
|
public Criteria setCacheable(boolean cacheable) {
this.cacheable = cacheable;
return this;
}
|
public Criteria setComment(String comment) {
this.comment = comment;
return this;
}
|
public Criteria setFetchMode(String associationPath,
FetchMode mode) {
fetchModes.put( associationPath, mode );
return this;
}
|
public Criteria setFetchSize(int fetchSize) {
this.fetchSize = new Integer(fetchSize);
return this;
}
|
public Criteria setFirstResult(int firstResult) {
this.firstResult = new Integer(firstResult);
return this;
}
|
public Criteria setFlushMode(FlushMode flushMode) {
this.flushMode = flushMode;
return this;
}
|
public Criteria setLockMode(LockMode lockMode) {
return setLockMode( getAlias(), lockMode );
}
|
public Criteria setLockMode(String alias,
LockMode lockMode) {
lockModes.put( alias, lockMode );
return this;
}
|
public Criteria setMaxResults(int maxResults) {
this.maxResults = new Integer(maxResults);
return this;
}
|
public Criteria setProjection(Projection projection) {
this.projection = projection;
this.projectionCriteria = this;
setResultTransformer( PROJECTION );
return this;
}
|
public Criteria setResultTransformer(ResultTransformer tupleMapper) {
this.resultTransformer = tupleMapper;
return this;
}
|
public void setSession(SessionImplementor session) {
this.session = session;
}
|
public Criteria setTimeout(int timeout) {
this.timeout = new Integer(timeout);
return this;
}
|
public String toString() {
return "CriteriaImpl(" +
entityOrClassName + ":" +
(rootAlias==null ? "" : rootAlias) +
subcriteriaList.toString() +
criterionEntries.toString() +
( projection==null ? "" : projection.toString() ) +
')';
}
|
public Object uniqueResult() throws HibernateException {
return AbstractQueryImpl.uniqueElement( list() );
}
|