use of org.jaffa.transaction.domain.TransactionDependencySweeperView in project jaffa-framework by jaffa-projects.
the class JaffaTransactionMessageService method getDependencySweeperViewsIfOpenNoDependsOnTx.
/**
* Returns all of the TransactionDependencySweeperViews of the TransactionDependencies in the Open state that have
* no dependsOn Transaction or have a dependsOn Transaction in the S state.
* The TransactionDependencySweeperView is a subset of the TransactionDependency model.
*
* @return all TransactionSweeperViews created from the Transactions in the Hold state that have
* no TransactionDependency in the Open state.
* @throws FrameworkException
*/
@Override
public Collection<TransactionDependencySweeperView> getDependencySweeperViewsIfOpenNoDependsOnTx() throws FrameworkException {
UOW uow = null;
Collection<TransactionDependencySweeperView> results = new ArrayList<TransactionDependencySweeperView>();
try {
uow = new UOW();
Criteria criteria = new Criteria();
criteria.setTable(TransactionDependencySweeperViewMeta.getName());
// create a list of transactionDependencySweeperViews from the results
for (Object result : uow.query(criteria)) {
if (!(result instanceof TransactionDependencySweeperView)) {
continue;
}
results.add((TransactionDependencySweeperView) result);
}
} finally {
if (uow != null) {
uow.close();
}
}
return results;
}
Aggregations