org.eclipse.emf.query.statements
Class SELECT
java.lang.Object
org.eclipse.emf.query.internal.statements.QueryStatement
org.eclipse.emf.query.statements.SELECT
-
All Implemented Interfaces:
-
IEObjectSource
-
Direct Known Subclasses:
-
UPDATE
-
public class SELECT
- extends org.eclipse.emf.query.internal.statements.QueryStatement
The select statement "selects" certain EObjects from the
"from" clause that match the "where" clause.
The statement is further customizable to restrict the result set
to be bounded by a certain maximum size and to allow the query to
be cancellable.
Fields inherited from class org.eclipse.emf.query.internal.statements.QueryStatement
|
WORK_UNIT
|
Constructor Summary
|
SELECT
(boolean cancellable,
FROM from,
WHERE where)
|
SELECT
(
FROM from,
WHERE where)
|
SELECT
(int maximumResultSize,
boolean cancellable,
FROM from,
WHERE where)
|
SELECT
(int maximumResultSize,
boolean cancellable,
FROM from,
WHERE where,
IProgressMonitor progressMonitor)
|
SELECT
(int maximumResultSize,
FROM from,
WHERE where)
|
Methods inherited from class org.eclipse.emf.query.internal.statements.QueryStatement
|
getProgressMonitor, getResultSet, isCancellable, setProgressMonitor, setResultSet
|
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
UNBOUNDED
public static final int UNBOUNDED
-
See Also:
-
Constant Field Values
SELECT
public SELECT(
FROM from,
WHERE where)
SELECT
public SELECT(boolean cancellable,
FROM from,
WHERE where)
SELECT
public SELECT(int maximumResultSize,
FROM from,
WHERE where)
SELECT
public SELECT(int maximumResultSize,
boolean cancellable,
FROM from,
WHERE where)
SELECT
public SELECT(int maximumResultSize,
boolean cancellable,
FROM from,
WHERE where,
IProgressMonitor progressMonitor)
doExecute
protected void doExecute()
- Performs the statement execution.
-
-
Specified by:
-
doExecute
in class org.eclipse.emf.query.internal.statements.QueryStatement
-
-
See Also:
-
QueryStatement.execute()
handleException
protected void handleException(
Exception exception,
String functionName)
-
Description copied from class:
org.eclipse.emf.query.internal.statements.QueryStatement
- Handles an exception by logging and recording it.
-
-
Overrides:
-
handleException
in class org.eclipse.emf.query.internal.statements.QueryStatement
-
-
Parameters:
-
exception
- the exception -
functionName
- the method in which it was caught
canBeResumed
public boolean canBeResumed()
-
Description copied from class:
org.eclipse.emf.query.internal.statements.QueryStatement
- Determines whether or not this particular query statement can
be resumed.
-
-
Specified by:
-
canBeResumed
in class org.eclipse.emf.query.internal.statements.QueryStatement
-
-
Returns:
- true (if the statement can be can resumed) or false (otherwise)
doResume
protected void doResume()
-
Description copied from class:
org.eclipse.emf.query.internal.statements.QueryStatement
- Resumes a paused statement.
-
-
Specified by:
-
doResume
in class org.eclipse.emf.query.internal.statements.QueryStatement
-
-
See Also:
-
QueryStatement.doResume()
addEObject
protected void addEObject(
EObject eObject)
-
isCancelled
protected boolean isCancelled()
-
execute
public final
IQueryResult execute()
-
Description copied from class:
org.eclipse.emf.query.internal.statements.QueryStatement
- Execute the query in order to produce a result.
-
-
Overrides:
-
execute
in class org.eclipse.emf.query.internal.statements.QueryStatement
-
-
Returns:
- The results produced by the query.
getEObjects
public final
Set<? extends
EObject> getEObjects()
-
Description copied from interface:
IEObjectSource
- A getter for the EObjects supplied by this
IEObjectSource
-
-
Specified by:
-
getEObjects
in interface
IEObjectSource
-
Overrides:
-
getEObjects
in class org.eclipse.emf.query.internal.statements.QueryStatement
-
-
Returns:
- Set The set of EObjects this
IEObjectSource
furnishes
resume
public final
IQueryResult resume(
IProgressMonitor progressMon)
-
Description copied from class:
org.eclipse.emf.query.internal.statements.QueryStatement
- Resume query execution if such an option is available.
-
-
Overrides:
-
resume
in class org.eclipse.emf.query.internal.statements.QueryStatement
-
-
Parameters:
-
progressMon
- The progress monitor to be used by the query
statement while resuming.
-
Returns:
- The results of the query execution.