sqlQuery.setParameter("docId", textFlow.getDocument().getDocId());
sqlQuery.setParameter("projectId", textFlow.getDocument()
.getProjectIteration().getProject().getId());
sqlQuery.setParameter("localeId", targetLocaleId.getId());
sqlQuery.addEntity(HTextFlowTarget.class);
return Optional.fromNullable((HTextFlowTarget) sqlQuery.uniqueResult());
}
/**
* Look up the {@link HTextFlowTarget} for the given hLocale in hTextFlow,
* creating a new one if none is present.