18 package org.turro.financials.model.document;
20 import java.util.HashSet;
21 import java.util.List;
22 import org.turro.financials.db.FinancialsPU;
23 import org.turro.financials.entity.Contract;
24 import org.turro.financials.entity.Document;
25 import org.turro.jpa.Dao;
43 private void fillSet(
Contract contract) {
45 List<Document> l = dao.getResultList(
46 "select distinct dl.document from DocumentLine dl, DocumentWorkflow dw " +
47 "join dl.document dd " +
48 "join dd.ancestors da " +
49 "where dw.ancestor = da.ancestor.documentDefinition " +
50 "and dw.descendant = dd.documentDefinition " +
51 "and dw.lineType <> dl.lineType"