com.atlassian.jira.entity
Class SelectQueryImpl.ExecutionContextImpl<E>
java.lang.Object
com.atlassian.jira.entity.SelectQueryImpl.ExecutionContextImpl<E>
- All Implemented Interfaces:
- SelectQuery.ExecutionContext<E>
- Enclosing class:
- SelectQueryImpl<E>
public final class SelectQueryImpl.ExecutionContextImpl<E>
- extends Object
- implements SelectQuery.ExecutionContext<E>
SelectQueryImpl.ExecutionContextImpl
public SelectQueryImpl.ExecutionContextImpl(OfBizDelegator ofBizDelegator,
EntityBuilder<E> entityBuilder)
asList
public List<E> asList()
- Specified by:
asList in interface SelectQuery.ExecutionContext<E>
singleValue
public E singleValue()
throws IllegalStateException
- Description copied from interface:
SelectQuery.ExecutionContext
- Returns the single Entity that is the result of this query.
Will return null if no rows were returned by the DB query.
Throws IllegalStateException if more than one row is found.
- Specified by:
singleValue in interface SelectQuery.ExecutionContext<E>
- Returns:
- the Entity found or null of none found.
- Throws:
IllegalStateException - if more than one row is found.
consumeWith
public <R> R consumeWith(EntityListConsumer<E,R> consumer)
- Specified by:
consumeWith in interface SelectQuery.ExecutionContext<E>
visitWith
public void visitWith(Visitor<E> visitor)
- Specified by:
visitWith in interface SelectQuery.ExecutionContext<E>
count
public long count()
- Description copied from interface:
SelectQuery.ExecutionContext
- Returns a count of matching items. Note that this does not go through the
the
entityName + "Count" pseudo-view stuff in the entity model, but rather generates
a count function directly in the query that it executes, so you should be able to use it with
arbitrary entities.
- Specified by:
count in interface SelectQuery.ExecutionContext<E>
- Returns:
- count of matching items
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2002-2014 Atlassian. All Rights Reserved.