Java 类ims.core.vo.DocumentCategoryConfigShortVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void populateReports(DocumentCategoryConfigShortVoCollection documentCategoryConfigShortVoCollection) 
{
    form.dyngrdReports().getRows().clear();

    if (documentCategoryConfigShortVoCollection == null)
    {
        //wdev-12285
        engine.showMessage("No matching templates found.");
        //---------
        return;
    }

    if(documentCategoryConfigShortVoCollection.size() == 0)         //wdev-12285
        engine.showMessage("No matching templates found.");         //wdev-12285
    else                                                            //wdev-12285
        for (int i = 0; i < documentCategoryConfigShortVoCollection.size(); i++)
        {
            DocumentCategoryConfigShortVo voReportList = documentCategoryConfigShortVoCollection.get(i);
            addReport(voReportList);
        }
}
项目:openMAXIMS    文件:Logic.java   
private void populateReports(DocumentCategoryConfigShortVoCollection documentCategoryConfigShortVoCollection) 
{
    form.dyngrdReports().getRows().clear();

    if (documentCategoryConfigShortVoCollection == null)
    {
        //wdev-12285
        engine.showMessage("No matching templates found.");
        //---------
        return;
    }

    if(documentCategoryConfigShortVoCollection.size() == 0)         //wdev-12285
        engine.showMessage("No matching templates found.");         //wdev-12285
    else                                                            //wdev-12285
        for (int i = 0; i < documentCategoryConfigShortVoCollection.size(); i++)
        {
            DocumentCategoryConfigShortVo voReportList = documentCategoryConfigShortVoCollection.get(i);
            addReport(voReportList);
        }
}
项目:openMAXIMS    文件:Logic.java   
private void populateReports(DocumentCategoryConfigShortVoCollection documentCategoryConfigShortVoCollection) 
{
    form.dyngrdReports().getRows().clear();

    if (documentCategoryConfigShortVoCollection == null)
    {
        //wdev-12285
        engine.showMessage("No matching templates found.");
        //---------
        return;
    }

    if(documentCategoryConfigShortVoCollection.size() == 0)         //wdev-12285
        engine.showMessage("No matching templates found.");         //wdev-12285
    else                                                            //wdev-12285
        for (int i = 0; i < documentCategoryConfigShortVoCollection.size(); i++)
        {
            DocumentCategoryConfigShortVo voReportList = documentCategoryConfigShortVoCollection.get(i);
            addReport(voReportList);
        }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateReports(DocumentCategoryConfigShortVoCollection documentCategoryConfigShortVoCollection) 
{
    form.dyngrdReports().getRows().clear();

    if (documentCategoryConfigShortVoCollection == null)
    {
        //wdev-12285
        engine.showMessage("No matching templates found.");
        //---------
        return;
    }

    if(documentCategoryConfigShortVoCollection.size() == 0)         //wdev-12285
        engine.showMessage("No matching templates found.");         //wdev-12285
    else                                                            //wdev-12285
        for (int i = 0; i < documentCategoryConfigShortVoCollection.size(); i++)
        {
            DocumentCategoryConfigShortVo voReportList = documentCategoryConfigShortVoCollection.get(i);
            addReport(voReportList);
        }
}
项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControlsDC(DocumentCategoryConfigShortVoCollection docCatsCol)
{
    if (docCatsCol == null)
        return;
    for (int i = 0; i < docCatsCol.size(); i++)
    {
        addRowToMappGrid(docCatsCol.get(i));
    }
}
项目:AvoinApotti    文件:Logic.java   
private DocumentCategoryConfigShortVoCollection populateDataFromScreenDC()
{
    DynamicGridRowCollection rows = form.lyrMain().tabByCategory().dyngrdMapps().getRows();
    DynamicGridColumn colSpec = getColumn(form.lyrMain().tabByCategory().dyngrdMapps(), COLUMN_NAME);
    if (rows.size() == 0)
        return null;
    DocumentCategoryConfigShortVoCollection result = new DocumentCategoryConfigShortVoCollection();

    for (int i = 0; i < rows.size(); i++)
    {
        DocumentCategoryConfigShortVo docCat = (DocumentCategoryConfigShortVo) rows.get(i).getValue();
        docCat.setSpecialty(null);

        DynamicGridRowCollection specR = rows.get(i).getRows();
        if (specR != null && specR.size() > 0)
        {
            docCat.setSpecialty(new SpecialtyCollection());
            for (int j = 0; j < specR.size(); j++)
            {
                Object spec = specR.get(j).getCells().get(colSpec).getValue();
                if (spec instanceof Specialty)
                {
                    docCat.getSpecialty().add((Specialty) spec);
                }
            }
        }
        result.add(docCat);
    }

    return result;
}
项目:AvoinApotti    文件:DocumentCategoryConfigImpl.java   
public DocumentCategoryConfigShortVoCollection listDocCateConfig(DocumentCategory docCat)
{

    String hql = "from DocumentCategoryConfig as dcc where (dcc.category.id = :catId) order by upper(dcc.template.name) asc";//     WDEV-13654
    List<?> domObjs = getDomainFactory().find(hql, new String[] { "catId" }, new Object[] { docCat.getId() });
    if (domObjs == null || domObjs.size() == 0)
        return null;
    return DocumentCategoryConfigShortVoAssembler.createDocumentCategoryConfigShortVoCollectionFromDocumentCategoryConfig(domObjs);
}
项目:AvoinApotti    文件:DocumentCategoryConfigImpl.java   
public DocumentCategoryConfigShortVoCollection saveAll(DocumentCategoryConfigShortVoCollection oldCats, DocumentCategoryConfigShortVoCollection newCats) throws StaleObjectException, ForeignKeyViolationException
{
    DomainFactory df = getDomainFactory();
    if (oldCats != null)
    {
        if (newCats != null)
            for (int i = oldCats.size() - 1; i >= 0; i--)
            {
                if (newCats.contains(oldCats.get(i)))
                {
                    oldCats.remove(i);
                }
            }

        for (int i = 0; i < oldCats.size(); i++)
        {
            df.delete(DocumentCategoryConfigShortVoAssembler.extractDocumentCategoryConfig(df, oldCats.get(i)));
        }
    }
    if (newCats == null)
        return null;

    DocumentCategoryConfigShortVoCollection result = new DocumentCategoryConfigShortVoCollection();
    for (int i = 0; i < newCats.size(); i++)
    {
        result.add(save(newCats.get(i)));
    }
    return result;
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControlsDC(DocumentCategoryConfigShortVoCollection docCatsCol)
{
    if (docCatsCol == null)
        return;
    for (int i = 0; i < docCatsCol.size(); i++)
    {
        addRowToMappGrid(docCatsCol.get(i));
    }
}
项目:openMAXIMS    文件:Logic.java   
private DocumentCategoryConfigShortVoCollection populateDataFromScreenDC()
{
    DynamicGridRowCollection rows = form.lyrMain().tabByCategory().dyngrdMapps().getRows();
    DynamicGridColumn colSpec = getColumn(form.lyrMain().tabByCategory().dyngrdMapps(), COLUMN_NAME);
    if (rows.size() == 0)
        return null;
    DocumentCategoryConfigShortVoCollection result = new DocumentCategoryConfigShortVoCollection();

    for (int i = 0; i < rows.size(); i++)
    {
        DocumentCategoryConfigShortVo docCat = (DocumentCategoryConfigShortVo) rows.get(i).getValue();
        docCat.setSpecialty(null);

        DynamicGridRowCollection specR = rows.get(i).getRows();
        if (specR != null && specR.size() > 0)
        {
            docCat.setSpecialty(new SpecialtyCollection());
            for (int j = 0; j < specR.size(); j++)
            {
                Object spec = specR.get(j).getCells().get(colSpec).getValue();
                if (spec instanceof Specialty)
                {
                    docCat.getSpecialty().add((Specialty) spec);
                }
            }
        }
        result.add(docCat);
    }

    return result;
}
项目:openMAXIMS    文件:DocumentCategoryConfigImpl.java   
public DocumentCategoryConfigShortVoCollection listDocCateConfig(DocumentCategory docCat)
{

    String hql = "from DocumentCategoryConfig as dcc where (dcc.category.id = :catId) order by upper(dcc.template.name) asc";//     WDEV-13654
    List<?> domObjs = getDomainFactory().find(hql, new String[] { "catId" }, new Object[] { docCat.getId() });
    if (domObjs == null || domObjs.size() == 0)
        return null;
    return DocumentCategoryConfigShortVoAssembler.createDocumentCategoryConfigShortVoCollectionFromDocumentCategoryConfig(domObjs);
}
项目:openMAXIMS    文件:DocumentCategoryConfigImpl.java   
public DocumentCategoryConfigShortVoCollection saveAll(DocumentCategoryConfigShortVoCollection oldCats, DocumentCategoryConfigShortVoCollection newCats) throws StaleObjectException, ForeignKeyViolationException
{
    DomainFactory df = getDomainFactory();
    if (oldCats != null)
    {
        if (newCats != null)
            for (int i = oldCats.size() - 1; i >= 0; i--)
            {
                if (newCats.contains(oldCats.get(i)))
                {
                    oldCats.remove(i);
                }
            }

        for (int i = 0; i < oldCats.size(); i++)
        {
            df.delete(DocumentCategoryConfigShortVoAssembler.extractDocumentCategoryConfig(df, oldCats.get(i)));
        }
    }
    if (newCats == null)
        return null;

    DocumentCategoryConfigShortVoCollection result = new DocumentCategoryConfigShortVoCollection();
    for (int i = 0; i < newCats.size(); i++)
    {
        result.add(save(newCats.get(i)));
    }
    return result;
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControlsDC(DocumentCategoryConfigShortVoCollection docCatsCol)
{
    if (docCatsCol == null)
        return;
    for (int i = 0; i < docCatsCol.size(); i++)
    {
        addRowToMappGrid(docCatsCol.get(i));
    }
}
项目:openMAXIMS    文件:Logic.java   
private DocumentCategoryConfigShortVoCollection populateDataFromScreenDC()
{
    DynamicGridRowCollection rows = form.lyrMain().tabByCategory().dyngrdMapps().getRows();
    DynamicGridColumn colSpec = getColumn(form.lyrMain().tabByCategory().dyngrdMapps(), COLUMN_NAME);
    if (rows.size() == 0)
        return null;
    DocumentCategoryConfigShortVoCollection result = new DocumentCategoryConfigShortVoCollection();

    for (int i = 0; i < rows.size(); i++)
    {
        DocumentCategoryConfigShortVo docCat = (DocumentCategoryConfigShortVo) rows.get(i).getValue();
        docCat.setSpecialty(null);

        DynamicGridRowCollection specR = rows.get(i).getRows();
        if (specR != null && specR.size() > 0)
        {
            docCat.setSpecialty(new SpecialtyCollection());
            for (int j = 0; j < specR.size(); j++)
            {
                Object spec = specR.get(j).getCells().get(colSpec).getValue();
                if (spec instanceof Specialty)
                {
                    docCat.getSpecialty().add((Specialty) spec);
                }
            }
        }
        result.add(docCat);
    }

    return result;
}
项目:openMAXIMS    文件:DocumentCategoryConfigImpl.java   
public DocumentCategoryConfigShortVoCollection listDocCateConfig(DocumentCategory docCat)
{

    String hql = "from DocumentCategoryConfig as dcc where (dcc.category.id = :catId) order by upper(dcc.template.name) asc";//     WDEV-13654
    List<?> domObjs = getDomainFactory().find(hql, new String[] { "catId" }, new Object[] { docCat.getId() });
    if (domObjs == null || domObjs.size() == 0)
        return null;
    return DocumentCategoryConfigShortVoAssembler.createDocumentCategoryConfigShortVoCollectionFromDocumentCategoryConfig(domObjs);
}
项目:openMAXIMS    文件:DocumentCategoryConfigImpl.java   
public DocumentCategoryConfigShortVoCollection saveAll(DocumentCategoryConfigShortVoCollection oldCats, DocumentCategoryConfigShortVoCollection newCats) throws StaleObjectException, ForeignKeyViolationException
{
    DomainFactory df = getDomainFactory();
    if (oldCats != null)
    {
        if (newCats != null)
            for (int i = oldCats.size() - 1; i >= 0; i--)
            {
                if (newCats.contains(oldCats.get(i)))
                {
                    oldCats.remove(i);
                }
            }

        for (int i = 0; i < oldCats.size(); i++)
        {
            df.delete(DocumentCategoryConfigShortVoAssembler.extractDocumentCategoryConfig(df, oldCats.get(i)));
        }
    }
    if (newCats == null)
        return null;

    DocumentCategoryConfigShortVoCollection result = new DocumentCategoryConfigShortVoCollection();
    for (int i = 0; i < newCats.size(); i++)
    {
        result.add(save(newCats.get(i)));
    }
    return result;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateInstanceControlsDC(DocumentCategoryConfigShortVoCollection docCatsCol)
{
    if (docCatsCol == null)
        return;
    for (int i = 0; i < docCatsCol.size(); i++)
    {
        addRowToMappGrid(docCatsCol.get(i));
    }
}
项目:openmaxims-linux    文件:Logic.java   
private DocumentCategoryConfigShortVoCollection populateDataFromScreenDC()
{
    DynamicGridRowCollection rows = form.lyrMain().tabByCategory().dyngrdMapps().getRows();
    DynamicGridColumn colSpec = getColumn(form.lyrMain().tabByCategory().dyngrdMapps(), COLUMN_NAME);
    if (rows.size() == 0)
        return null;
    DocumentCategoryConfigShortVoCollection result = new DocumentCategoryConfigShortVoCollection();

    for (int i = 0; i < rows.size(); i++)
    {
        DocumentCategoryConfigShortVo docCat = (DocumentCategoryConfigShortVo) rows.get(i).getValue();
        docCat.setSpecialty(null);

        DynamicGridRowCollection specR = rows.get(i).getRows();
        if (specR != null && specR.size() > 0)
        {
            docCat.setSpecialty(new SpecialtyCollection());
            for (int j = 0; j < specR.size(); j++)
            {
                Object spec = specR.get(j).getCells().get(colSpec).getValue();
                if (spec instanceof Specialty)
                {
                    docCat.getSpecialty().add((Specialty) spec);
                }
            }
        }
        result.add(docCat);
    }

    return result;
}
项目:openmaxims-linux    文件:DocumentCategoryConfigImpl.java   
public DocumentCategoryConfigShortVoCollection listDocCateConfig(DocumentCategory docCat)
{

    String hql = "from DocumentCategoryConfig as dcc where (dcc.category.id = :catId) order by upper(dcc.template.name) asc";//     WDEV-13654
    List<?> domObjs = getDomainFactory().find(hql, new String[] { "catId" }, new Object[] { docCat.getId() });
    if (domObjs == null || domObjs.size() == 0)
        return null;
    return DocumentCategoryConfigShortVoAssembler.createDocumentCategoryConfigShortVoCollectionFromDocumentCategoryConfig(domObjs);
}
项目:openmaxims-linux    文件:DocumentCategoryConfigImpl.java   
public DocumentCategoryConfigShortVoCollection saveAll(DocumentCategoryConfigShortVoCollection oldCats, DocumentCategoryConfigShortVoCollection newCats) throws StaleObjectException, ForeignKeyViolationException
{
    DomainFactory df = getDomainFactory();
    if (oldCats != null)
    {
        if (newCats != null)
            for (int i = oldCats.size() - 1; i >= 0; i--)
            {
                if (newCats.contains(oldCats.get(i)))
                {
                    oldCats.remove(i);
                }
            }

        for (int i = 0; i < oldCats.size(); i++)
        {
            df.delete(DocumentCategoryConfigShortVoAssembler.extractDocumentCategoryConfig(df, oldCats.get(i)));
        }
    }
    if (newCats == null)
        return null;

    DocumentCategoryConfigShortVoCollection result = new DocumentCategoryConfigShortVoCollection();
    for (int i = 0; i < newCats.size(); i++)
    {
        result.add(save(newCats.get(i)));
    }
    return result;
}
项目:AvoinApotti    文件:PatientCorrespondenceTemplatesImpl.java   
public DocumentCategoryConfigShortVoCollection searchReports(String templateName, String listOfMandatorySeeds, DocumentCategory documentType, Specialty specialty) 
{
    DomainFactory factory = getDomainFactory();
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    String subHql = "";

    if(listOfMandatorySeeds != null && listOfMandatorySeeds.length() > 0)
    {
        subHql = " and r21.bOName not in (" + listOfMandatorySeeds + ")";
    }

    String mainHql = "select d from DocumentCategoryConfig as d left join d.template as t left join t.report as r";
    String whereHql = " where t.id not in (select t11.id from TemplateBo as t11 left join t11.report as r11 left join r11.seeds as r21 where (r21.canBeNull = 0" + subHql + ")) and r.reportXml is not null and t.templateXml is not null and r.isActive = 1 and t.isActive = 1";// WDEV-13519

    if(templateName != null && templateName.length() > 0)
    {
        whereHql += " and upper(t.name) like :templateName";
        markers.add("templateName");
        values.add(templateName.toUpperCase() + "%");
    }

    if(documentType != null)
    {
        whereHql += " and d.category.id = :catId";
        markers.add("catId");
        values.add(documentType.getID());
    }

    if(specialty != null)
    {
        mainHql += " left join d.specialty as s left join s.instance as i";
        whereHql += " and i.id = :specialtyId";
        markers.add("specialtyId");
        values.add(specialty.getID());
    }

    String hql = mainHql + whereHql + " order by upper(r.reportName) asc, upper(t.name) asc";// WDEV-13519
    List<?> list = factory.find(hql, markers, values);

    return DocumentCategoryConfigShortVoAssembler.createDocumentCategoryConfigShortVoCollectionFromDocumentCategoryConfig(list);//  WDEV-13519
}
项目:openMAXIMS    文件:PatientCorrespondenceTemplatesImpl.java   
public DocumentCategoryConfigShortVoCollection searchReports(String templateName, String listOfMandatorySeeds, DocumentCategory documentType, Specialty specialty) 
{
    DomainFactory factory = getDomainFactory();
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    String subHql = "";

    if(listOfMandatorySeeds != null && listOfMandatorySeeds.length() > 0)
    {
        subHql = " and r21.bOName not in (" + listOfMandatorySeeds + ")";
    }

    String mainHql = "select d from DocumentCategoryConfig as d left join d.template as t left join t.report as r";
    String whereHql = " where t.id not in (select t11.id from TemplateBo as t11 left join t11.report as r11 left join r11.seeds as r21 where (r21.canBeNull = 0" + subHql + ")) and r.reportXml is not null and t.templateXml is not null and r.isActive = 1 and t.isActive = 1";// WDEV-13519

    if(templateName != null && templateName.length() > 0)
    {
        whereHql += " and upper(t.name) like :templateName";
        markers.add("templateName");
        values.add(templateName.toUpperCase() + "%");
    }

    if(documentType != null)
    {
        whereHql += " and d.category.id = :catId";
        markers.add("catId");
        values.add(documentType.getID());
    }

    if(specialty != null)
    {
        mainHql += " left join d.specialty as s left join s.instance as i";
        whereHql += " and i.id = :specialtyId";
        markers.add("specialtyId");
        values.add(specialty.getID());
    }

    String hql = mainHql + whereHql + " order by upper(r.reportName) asc, upper(t.name) asc";// WDEV-13519
    List<?> list = factory.find(hql, markers, values);

    return DocumentCategoryConfigShortVoAssembler.createDocumentCategoryConfigShortVoCollectionFromDocumentCategoryConfig(list);//  WDEV-13519
}
项目:openMAXIMS    文件:PatientCorrespondenceTemplatesImpl.java   
public DocumentCategoryConfigShortVoCollection searchReports(String templateName, String listOfMandatorySeeds, DocumentCategory documentType, Specialty specialty) 
{
    DomainFactory factory = getDomainFactory();
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    String subHql = "";

    if(listOfMandatorySeeds != null && listOfMandatorySeeds.length() > 0)
    {
        subHql = " and r21.bOName not in (" + listOfMandatorySeeds + ")";
    }

    String mainHql = "select d from DocumentCategoryConfig as d left join d.template as t left join t.report as r";
    String whereHql = " where t.id not in (select t11.id from TemplateBo as t11 left join t11.report as r11 left join r11.seeds as r21 where (r21.canBeNull = 0" + subHql + ")) and r.reportXml is not null and t.templateXml is not null and r.isActive = 1 and t.isActive = 1";// WDEV-13519

    if(templateName != null && templateName.length() > 0)
    {
        whereHql += " and upper(t.name) like :templateName";
        markers.add("templateName");
        values.add(templateName.toUpperCase() + "%");
    }

    if(documentType != null)
    {
        whereHql += " and d.category.id = :catId";
        markers.add("catId");
        values.add(documentType.getID());
    }

    if(specialty != null)
    {
        mainHql += " left join d.specialty as s left join s.instance as i";
        whereHql += " and i.id = :specialtyId";
        markers.add("specialtyId");
        values.add(specialty.getID());
    }

    String hql = mainHql + whereHql + " order by upper(r.reportName) asc, upper(t.name) asc";// WDEV-13519
    List<?> list = factory.find(hql, markers, values);

    return DocumentCategoryConfigShortVoAssembler.createDocumentCategoryConfigShortVoCollectionFromDocumentCategoryConfig(list);//  WDEV-13519
}
项目:openmaxims-linux    文件:PatientCorrespondenceTemplatesImpl.java   
public DocumentCategoryConfigShortVoCollection searchReports(String templateName, String listOfMandatorySeeds, DocumentCategory documentType, Specialty specialty) 
{
    DomainFactory factory = getDomainFactory();
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    String subHql = "";

    if(listOfMandatorySeeds != null && listOfMandatorySeeds.length() > 0)
    {
        subHql = " and r21.bOName not in (" + listOfMandatorySeeds + ")";
    }

    String mainHql = "select d from DocumentCategoryConfig as d left join d.template as t left join t.report as r";
    String whereHql = " where t.id not in (select t11.id from TemplateBo as t11 left join t11.report as r11 left join r11.seeds as r21 where (r21.canBeNull = 0" + subHql + ")) and r.reportXml is not null and t.templateXml is not null and r.isActive = 1 and t.isActive = 1";// WDEV-13519

    if(templateName != null && templateName.length() > 0)
    {
        whereHql += " and upper(t.name) like :templateName";
        markers.add("templateName");
        values.add(templateName.toUpperCase() + "%");
    }

    if(documentType != null)
    {
        whereHql += " and d.category.id = :catId";
        markers.add("catId");
        values.add(documentType.getID());
    }

    if(specialty != null)
    {
        mainHql += " left join d.specialty as s left join s.instance as i";
        whereHql += " and i.id = :specialtyId";
        markers.add("specialtyId");
        values.add(specialty.getID());
    }

    String hql = mainHql + whereHql + " order by upper(r.reportName) asc, upper(t.name) asc";// WDEV-13519
    List<?> list = factory.find(hql, markers, values);

    return DocumentCategoryConfigShortVoAssembler.createDocumentCategoryConfigShortVoCollectionFromDocumentCategoryConfig(list);//  WDEV-13519
}