}
@Override
public <T> T find( Class<T> resultType, Specification<Composite> whereClause, Iterable<OrderBy> orderBySegments, Integer firstResult, Integer maxResults, Map<String, Object> variables )
{
final EntityFinder entityFinder = moduleUnitOfWork.module().findService( EntityFinder.class ).get();
try
{
final EntityReference foundEntity = entityFinder.findEntity( resultType, whereClause, variables == null ? Collections.<String, Object>emptyMap() : variables );
if( foundEntity != null )
{
try
{
return moduleUnitOfWork.get( resultType, foundEntity.identity() );