Java 类ims.admin.vo.ReportVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void displayall(PrintAgentVoCollection collPrintAgentVo)
{
    clearScreen();
    form.setMode(FormMode.VIEW);

    ReportVoCollection coll = null;

    displayJobs(collPrintAgentVo);
    form.grdJobs().setValue(form.getLocalContext().getJobSettings());
    try
    {
        onGrdJobsSelectionChanged();
    }
    catch (PresentationLogicException e)
    {
        engine.showMessage("Error selecting the grid row: " + e.toString());
        return;
    }

}
项目:AvoinApotti    文件:Logic.java   
protected void onGrdJobsSelectionChanged() throws PresentationLogicException
{
    PrintAgentVo printAgentVo = form.grdJobs().getValue();

    form.getLocalContext().setJobSettings(printAgentVo);
    ReportVoCollection coll = form.getLocalContext().getReportsAvailable();

    displayAvailableReports(coll, printAgentVo);
    displaySelectedTemplates(printAgentVo);
    displayJobDetails(printAgentVo);

    //WDEV-17946
    form.getLocalContext().setLastId(printAgentVo != null ? printAgentVo.getID_PrintAgent() : null);
    form.btnPrintNow().setEnabled(printAgentVo != null && Boolean.TRUE.equals(printAgentVo.getIsActive()));

    updateControlsState();
}
项目:AvoinApotti    文件:Logic.java   
private ReportVoCollection getValidReps(Integer formId) 
{   
    ReportVoCollection coll = new ReportVoCollection();
    ReportVoCollection fullColl = form.getLocalContext().getRepColl();

    if(fullColl != null)
    {
        for (int i = 0; i < fullColl.size(); i++)
        {
            ReportVo repVo = fullColl.get(i);
            IReportSeed[] iSeeds = getIseeds(repVo);

            if (engine.canFormProvideData(getFormNameFromId(formId.intValue()), iSeeds))
            {
                coll.add(repVo);
            }
        }
    }

    return coll;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbFormNameValueChanged() throws PresentationLogicException
{
    if(form.qmbFormName().getValue() != null)               //wdev-10881
    {
        Integer formId = form.qmbFormName().getValue().getID_AppForm();

        ReportVoCollection coll = domain.listAssignedReports(formId);
        form.getLocalContext().setAssignedReportsCollection(coll);
        populateReportsGridAssignment(coll);

        form.txtReport().setValue(null);
        form.txtTemplate().setValue(null);
        form.qmbCategory().clear();
        form.grdAvailableReports().getRows().clear();
    }
}
项目:AvoinApotti    文件:WebServicesIntegrationImpl.java   
private ReportVo getReportByImsId(String imsId)
{
    StringBuffer hql = new StringBuffer();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();

    hql.append("from ReportBo as report where report.ImsId =:imsId");
    markers.add("imsId");
    values.add(new Integer(imsId).intValue());

    DomainFactory factory = getDomainFactory();
    List list = factory.find(hql.toString(), markers, values);
    ReportVoCollection result = ReportVoAssembler.createReportVoCollectionFromReportBo(list);               

    return result != null ? result.get(0) : null;       
}
项目:AvoinApotti    文件:FormReportsImpl.java   
/**
* List reports assigned to a Form
*/
@SuppressWarnings("unchecked")
public ims.admin.vo.ReportVoCollection listAssignedReports(Integer formId)
{
    DomainFactory factory = getDomainFactory();
    ims.admin.vo.ReportVoCollection collection = new ims.admin.vo.ReportVoCollection();

    List reps = factory.find("from FormReportBo fr where fr.form.id = :formId and fr.report.isActive = :isActive", new String[]{"formId", "isActive"}, new Object[]{formId, Boolean.TRUE});
    if (reps != null && !reps.isEmpty())
    {
        for (Iterator iter = reps.iterator(); iter.hasNext();) 
        {
            FormReportBo element = (FormReportBo) iter.next();
            collection.add(ReportVoAssembler.create(element.getReport()));
        }           
    }       
    return collection;
}
项目:AvoinApotti    文件:DocumentGenerationImpl.java   
public ReportVoCollection listAssignedReports(Integer formId)
{
    /*
    DomainFactory factory = getDomainFactory();

    List reps = factory.find("from FormReportBo fr where fr.form.id = :formId", new String[]{"formId"}, new Object[]{formId});

    return ReportVoAssembler.createReportVoCollectionFromReportBo(reps);
    */
    DomainFactory factory = getDomainFactory();
    ims.admin.vo.ReportVoCollection collection = new ims.admin.vo.ReportVoCollection();

    List reps = factory.find("from FormReportBo fr where fr.form.id = :formId", new String[]{"formId"}, new Object[]{formId});
    if (reps != null && !reps.isEmpty())
    {
        for (Iterator iter = reps.iterator(); iter.hasNext();) 
        {
            FormReportBo element = (FormReportBo) iter.next();
            collection.add(ReportVoAssembler.create(element.getReport()));
        }           
    }       
    return collection;

}
项目:openMAXIMS    文件:Logic.java   
private void displayall(PrintAgentVoCollection collPrintAgentVo)
{
    clearScreen();
    form.setMode(FormMode.VIEW);

    ReportVoCollection coll = null;

    displayJobs(collPrintAgentVo);
    form.grdJobs().setValue(form.getLocalContext().getJobSettings());
    try
    {
        onGrdJobsSelectionChanged();
    }
    catch (PresentationLogicException e)
    {
        engine.showMessage("Error selecting the grid row: " + e.toString());
        return;
    }

}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdJobsSelectionChanged() throws PresentationLogicException
{
    PrintAgentVo printAgentVo = form.grdJobs().getValue();

    form.getLocalContext().setJobSettings(printAgentVo);
    ReportVoCollection coll = form.getLocalContext().getReportsAvailable();

    displayAvailableReports(coll, printAgentVo);
    displaySelectedTemplates(printAgentVo);
    displayJobDetails(printAgentVo);

    //WDEV-17946
    form.getLocalContext().setLastId(printAgentVo != null ? printAgentVo.getID_PrintAgent() : null);
    form.btnPrintNow().setEnabled(printAgentVo != null && Boolean.TRUE.equals(printAgentVo.getIsActive()));

    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
private ReportVoCollection getValidReps(Integer formId) 
{   
    ReportVoCollection coll = new ReportVoCollection();
    ReportVoCollection fullColl = form.getLocalContext().getRepColl();

    if(fullColl != null)
    {
        for (int i = 0; i < fullColl.size(); i++)
        {
            ReportVo repVo = fullColl.get(i);
            IReportSeed[] iSeeds = getIseeds(repVo);

            if (engine.canFormProvideData(getFormNameFromId(formId.intValue()), iSeeds))
            {
                coll.add(repVo);
            }
        }
    }

    return coll;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbFormNameValueChanged() throws PresentationLogicException
{
    if(form.qmbFormName().getValue() != null)               //wdev-10881
    {
        Integer formId = form.qmbFormName().getValue().getID_AppForm();

        ReportVoCollection coll = domain.listAssignedReports(formId);
        form.getLocalContext().setAssignedReportsCollection(coll);
        populateReportsGridAssignment(coll);

        form.txtReport().setValue(null);
        form.txtTemplate().setValue(null);
        form.qmbCategory().clear();
        form.grdAvailableReports().getRows().clear();
    }
}
项目:openMAXIMS    文件:WebServicesIntegrationImpl.java   
private ReportVo getReportByImsId(String imsId)
{
    StringBuffer hql = new StringBuffer();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();

    hql.append("from ReportBo as report where report.ImsId =:imsId");
    markers.add("imsId");
    values.add(new Integer(imsId).intValue());

    DomainFactory factory = getDomainFactory();
    List list = factory.find(hql.toString(), markers, values);
    ReportVoCollection result = ReportVoAssembler.createReportVoCollectionFromReportBo(list);               

    return result != null ? result.get(0) : null;       
}
项目:openMAXIMS    文件:FormReportsImpl.java   
/**
* List reports assigned to a Form
*/
@SuppressWarnings("unchecked")
public ims.admin.vo.ReportVoCollection listAssignedReports(Integer formId)
{
    DomainFactory factory = getDomainFactory();
    ims.admin.vo.ReportVoCollection collection = new ims.admin.vo.ReportVoCollection();
    List reps = factory.find("from FormReportBo fr  where fr.form.id = :formId  and fr.report.isActive = :isActive and fr.report.templates.isActive = 1", new String[]{"formId", "isActive"}, new Object[]{formId, Boolean.TRUE});//WDEV-23731
    if (reps != null && !reps.isEmpty())
    {
        for (Iterator iter = reps.iterator(); iter.hasNext();) 
        {
            FormReportBo element = (FormReportBo) iter.next();
            collection.add(ReportVoAssembler.create(element.getReport()));
        }           
    }       
    return collection;
}
项目:openMAXIMS    文件:DocumentGenerationImpl.java   
public ReportVoCollection listAssignedReports(Integer formId)
{
    /*
    DomainFactory factory = getDomainFactory();

    List reps = factory.find("from FormReportBo fr where fr.form.id = :formId", new String[]{"formId"}, new Object[]{formId});

    return ReportVoAssembler.createReportVoCollectionFromReportBo(reps);
    */
    DomainFactory factory = getDomainFactory();
    ims.admin.vo.ReportVoCollection collection = new ims.admin.vo.ReportVoCollection();

    List reps = factory.find("from FormReportBo fr where fr.form.id = :formId", new String[]{"formId"}, new Object[]{formId});
    if (reps != null && !reps.isEmpty())
    {
        for (Iterator iter = reps.iterator(); iter.hasNext();) 
        {
            FormReportBo element = (FormReportBo) iter.next();
            collection.add(ReportVoAssembler.create(element.getReport()));
        }           
    }       
    return collection;

}
项目:openMAXIMS    文件:Logic.java   
private void displayall(PrintAgentVoCollection collPrintAgentVo)
{
    clearScreen();
    form.setMode(FormMode.VIEW);

    ReportVoCollection coll = null;

    displayJobs(collPrintAgentVo);
    form.grdJobs().setValue(form.getLocalContext().getJobSettings());
    try
    {
        onGrdJobsSelectionChanged();
    }
    catch (PresentationLogicException e)
    {
        engine.showMessage("Error selecting the grid row: " + e.toString());
        return;
    }

}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdJobsSelectionChanged() throws PresentationLogicException
{
    PrintAgentVo printAgentVo = form.grdJobs().getValue();

    form.getLocalContext().setJobSettings(printAgentVo);
    ReportVoCollection coll = form.getLocalContext().getReportsAvailable();

    displayAvailableReports(coll, printAgentVo);
    displaySelectedTemplates(printAgentVo);
    displayJobDetails(printAgentVo);

    //WDEV-17946
    form.getLocalContext().setLastId(printAgentVo != null ? printAgentVo.getID_PrintAgent() : null);
    form.btnPrintNow().setEnabled(printAgentVo != null && Boolean.TRUE.equals(printAgentVo.getIsActive()));

    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
private ReportVoCollection getValidReps(Integer formId) 
{   
    ReportVoCollection coll = new ReportVoCollection();
    ReportVoCollection fullColl = form.getLocalContext().getRepColl();

    if(fullColl != null)
    {
        for (int i = 0; i < fullColl.size(); i++)
        {
            ReportVo repVo = fullColl.get(i);
            IReportSeed[] iSeeds = getIseeds(repVo);

            if (engine.canFormProvideData(getFormNameFromId(formId.intValue()), iSeeds))
            {
                coll.add(repVo);
            }
        }
    }

    return coll;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbFormNameValueChanged() throws PresentationLogicException
{
    if(form.qmbFormName().getValue() != null)               //wdev-10881
    {
        Integer formId = form.qmbFormName().getValue().getID_AppForm();

        ReportVoCollection coll = domain.listAssignedReports(formId);
        form.getLocalContext().setAssignedReportsCollection(coll);
        populateReportsGridAssignment(coll);

        form.txtReport().setValue(null);
        form.txtTemplate().setValue(null);
        form.qmbCategory().clear();
        form.grdAvailableReports().getRows().clear();
    }
}
项目:openMAXIMS    文件:WebServicesIntegrationImpl.java   
private ReportVo getReportByImsId(String imsId)
{
    StringBuffer hql = new StringBuffer();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();

    hql.append("from ReportBo as report where report.ImsId =:imsId");
    markers.add("imsId");
    values.add(new Integer(imsId).intValue());

    DomainFactory factory = getDomainFactory();
    List list = factory.find(hql.toString(), markers, values);
    ReportVoCollection result = ReportVoAssembler.createReportVoCollectionFromReportBo(list);               

    return result != null ? result.get(0) : null;       
}
项目:openMAXIMS    文件:FormReportsImpl.java   
/**
* List reports assigned to a Form
*/
@SuppressWarnings("unchecked")
public ims.admin.vo.ReportVoCollection listAssignedReports(Integer formId)
{
    DomainFactory factory = getDomainFactory();
    ims.admin.vo.ReportVoCollection collection = new ims.admin.vo.ReportVoCollection();

    List reps = factory.find("from FormReportBo fr where fr.form.id = :formId and fr.report.isActive = :isActive", new String[]{"formId", "isActive"}, new Object[]{formId, Boolean.TRUE});
    if (reps != null && !reps.isEmpty())
    {
        for (Iterator iter = reps.iterator(); iter.hasNext();) 
        {
            FormReportBo element = (FormReportBo) iter.next();
            collection.add(ReportVoAssembler.create(element.getReport()));
        }           
    }       
    return collection;
}
项目:openMAXIMS    文件:DocumentGenerationImpl.java   
public ReportVoCollection listAssignedReports(Integer formId)
{
    /*
    DomainFactory factory = getDomainFactory();

    List reps = factory.find("from FormReportBo fr where fr.form.id = :formId", new String[]{"formId"}, new Object[]{formId});

    return ReportVoAssembler.createReportVoCollectionFromReportBo(reps);
    */
    DomainFactory factory = getDomainFactory();
    ims.admin.vo.ReportVoCollection collection = new ims.admin.vo.ReportVoCollection();

    List reps = factory.find("from FormReportBo fr where fr.form.id = :formId", new String[]{"formId"}, new Object[]{formId});
    if (reps != null && !reps.isEmpty())
    {
        for (Iterator iter = reps.iterator(); iter.hasNext();) 
        {
            FormReportBo element = (FormReportBo) iter.next();
            collection.add(ReportVoAssembler.create(element.getReport()));
        }           
    }       
    return collection;

}
项目:openmaxims-linux    文件:Logic.java   
private void displayall(PrintAgentVoCollection collPrintAgentVo)
{
    clearScreen();
    form.setMode(FormMode.VIEW);

    ReportVoCollection coll = null;

    displayJobs(collPrintAgentVo);
    form.grdJobs().setValue(form.getLocalContext().getJobSettings());
    try
    {
        onGrdJobsSelectionChanged();
    }
    catch (PresentationLogicException e)
    {
        engine.showMessage("Error selecting the grid row: " + e.toString());
        return;
    }

}
项目:openmaxims-linux    文件:Logic.java   
protected void onGrdJobsSelectionChanged() throws PresentationLogicException
{
    PrintAgentVo printAgentVo = form.grdJobs().getValue();

    form.getLocalContext().setJobSettings(printAgentVo);
    ReportVoCollection coll = form.getLocalContext().getReportsAvailable();

    displayAvailableReports(coll, printAgentVo);
    displaySelectedTemplates(printAgentVo);
    displayJobDetails(printAgentVo);

    //WDEV-17946
    form.getLocalContext().setLastId(printAgentVo != null ? printAgentVo.getID_PrintAgent() : null);
    form.btnPrintNow().setEnabled(printAgentVo != null && Boolean.TRUE.equals(printAgentVo.getIsActive()));

    updateControlsState();
}
项目:openmaxims-linux    文件:Logic.java   
private ReportVoCollection getValidReps(Integer formId) 
{   
    ReportVoCollection coll = new ReportVoCollection();
    ReportVoCollection fullColl = form.getLocalContext().getRepColl();

    if(fullColl != null)
    {
        for (int i = 0; i < fullColl.size(); i++)
        {
            ReportVo repVo = fullColl.get(i);
            IReportSeed[] iSeeds = getIseeds(repVo);

            if (engine.canFormProvideData(getFormNameFromId(formId.intValue()), iSeeds))
            {
                coll.add(repVo);
            }
        }
    }

    return coll;
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onQmbFormNameValueChanged() throws PresentationLogicException
{
    if(form.qmbFormName().getValue() != null)               //wdev-10881
    {
        Integer formId = form.qmbFormName().getValue().getID_AppForm();

        ReportVoCollection coll = domain.listAssignedReports(formId);
        form.getLocalContext().setAssignedReportsCollection(coll);
        populateReportsGridAssignment(coll);

        form.txtReport().setValue(null);
        form.txtTemplate().setValue(null);
        form.qmbCategory().clear();
        form.grdAvailableReports().getRows().clear();
    }
}
项目:openmaxims-linux    文件:WebServicesIntegrationImpl.java   
private ReportVo getReportByImsId(String imsId)
{
    StringBuffer hql = new StringBuffer();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();

    hql.append("from ReportBo as report where report.ImsId =:imsId");
    markers.add("imsId");
    values.add(new Integer(imsId).intValue());

    DomainFactory factory = getDomainFactory();
    List list = factory.find(hql.toString(), markers, values);
    ReportVoCollection result = ReportVoAssembler.createReportVoCollectionFromReportBo(list);               

    return result != null ? result.get(0) : null;       
}
项目:openmaxims-linux    文件:FormReportsImpl.java   
/**
* List reports assigned to a Form
*/
@SuppressWarnings("unchecked")
public ims.admin.vo.ReportVoCollection listAssignedReports(Integer formId)
{
    DomainFactory factory = getDomainFactory();
    ims.admin.vo.ReportVoCollection collection = new ims.admin.vo.ReportVoCollection();

    List reps = factory.find("from FormReportBo fr where fr.form.id = :formId and fr.report.isActive = :isActive", new String[]{"formId", "isActive"}, new Object[]{formId, Boolean.TRUE});
    if (reps != null && !reps.isEmpty())
    {
        for (Iterator iter = reps.iterator(); iter.hasNext();) 
        {
            FormReportBo element = (FormReportBo) iter.next();
            collection.add(ReportVoAssembler.create(element.getReport()));
        }           
    }       
    return collection;
}
项目:openmaxims-linux    文件:DocumentGenerationImpl.java   
public ReportVoCollection listAssignedReports(Integer formId)
{
    /*
    DomainFactory factory = getDomainFactory();

    List reps = factory.find("from FormReportBo fr where fr.form.id = :formId", new String[]{"formId"}, new Object[]{formId});

    return ReportVoAssembler.createReportVoCollectionFromReportBo(reps);
    */
    DomainFactory factory = getDomainFactory();
    ims.admin.vo.ReportVoCollection collection = new ims.admin.vo.ReportVoCollection();

    List reps = factory.find("from FormReportBo fr where fr.form.id = :formId", new String[]{"formId"}, new Object[]{formId});
    if (reps != null && !reps.isEmpty())
    {
        for (Iterator iter = reps.iterator(); iter.hasNext();) 
        {
            FormReportBo element = (FormReportBo) iter.next();
            collection.add(ReportVoAssembler.create(element.getReport()));
        }           
    }       
    return collection;

}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    ReportVoCollection coll = domain.listReports(new Integer(engine.getPreviousNonDialogFormName().getID()));

    for(int i = 0; i < coll.size(); i++)
    {
        ReportVo report = coll.get(i);

        if(canBeSeeded(report) && report.getTemplatesIsNotNull() && report.getTemplates().size() > 0)
        {
            grdReportsRow row = form.grdReports().getRows().newRow();

            row.setBackColor(Color.Beige);
            row.setcolName(report.getReportName());
            row.setcolDescription(report.getReportDescription());
            row.setValue(report);

            for (int j = 0; j < report.getTemplates().size(); j++)
            {
                ReportTemplateVo template = report.getTemplates().get(j);

                grdReportsRow templateRow = row.getRows().newRow();
                templateRow.setcolName(template.getName());
                templateRow.setcolDescription(template.getDescription());
                templateRow.setValue(template);
            }

            row.setExpanded(true);
        }
    }

    if(form.grdReports().getRows().size() == 1 && form.grdReports().getRows().get(0).getRows().size() == 1)
        form.grdReports().setValue(form.grdReports().getRows().get(0).getRows().get(0).getValue());
}
项目:AvoinApotti    文件:Logic.java   
private void displayAvailableReports(ReportVoCollection coll, PrintAgentVo printAgentVo)
{
    form.grdReportsAvailable().getRows().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        ReportVo rep = coll.get(i);

        if (rep.getTemplatesIsNotNull() && bHasActiveTemplates(rep))
        {
            grdReportsAvailableRow row = form.grdReportsAvailable().getRows().newRow();
            row.setColumnReport(rep.getReportName());
            row.setTooltip(rep.getReportDescription());
            row.setBold(true);
            row.setBackColor(Color.Beige);
            row.setValue(rep);

            for (int j = 0; j < rep.getTemplates().size(); j++)
            {
                if (rep.getTemplates().get(j).getIsActiveIsNotNull() && rep.getTemplates().get(j).getIsActive().equals(Boolean.TRUE) && isTemplateAlreadySelected(rep.getTemplates().get(j), printAgentVo) == false)
                {
                    grdReportsAvailableRow child = row.getRows().newRow();

                    child.setColumnReport(rep.getTemplates().get(j).getName());
                    child.setTooltip(rep.getTemplates().get(j).getDescription());
                    child.setValue(rep.getTemplates().get(j));
                }
            }

            row.setExpanded(true);

            if (row.getRows().size() == 0)
            {
                form.grdReportsAvailable().setValue(row.getValue());
                form.grdReportsAvailable().removeSelectedRow();
            }
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void populateReports(ReportVoCollection repColl) 
{
    for (int i = 0; i < repColl.size(); i++)
    {
        ReportVo rep = repColl.get(i);
        GenForm.grdReportListRow row = form.grdReportList().getRows().newRow();
        row.setReportName(rep.getReportName());
        //row.setRepAssign(false);
        row.setValue(rep);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateReportsGridAssignment(ReportVoCollection coll)
{
    form.grdReportList().getRows().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        ReportVo rep = coll.get(i);
        GenForm.grdReportListRow row = form.grdReportList().getRows().newRow();

        row.setReportName(rep.getReportName());
        row.setValue(rep);
    }
}
项目:AvoinApotti    文件:FormReportsImpl.java   
/**
* List all reports in the system
*/
@SuppressWarnings("unchecked")
public ims.admin.vo.ReportVoCollection listReports()
{
    DomainFactory factory = getDomainFactory();
    String hqlString = "from ReportBo rep where rep.isActive = :ACTIVE";
    List reports = factory.find(hqlString, new String[] {"ACTIVE"}, new Object[] {Boolean.TRUE});
    return ReportVoAssembler.createReportVoCollectionFromReportBo(reports);
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    ReportVoCollection coll = domain.listReports(new Integer(form.getLocalContext().getDialogName() != null ? form.getLocalContext().getDialogName().getID() : engine.getPreviousNonDialogFormName().getID()));

    for(int i = 0; i < coll.size(); i++)
    {
        ReportVo report = coll.get(i);

        if(canBeSeeded(report) && report.getTemplatesIsNotNull() && report.getTemplates().size() > 0)
        {
            grdReportsRow row = form.grdReports().getRows().newRow();

            row.setBackColor(Color.Beige);
            row.setcolName(report.getReportName());
            row.setcolDescription(report.getReportDescription());
            row.setValue(report);

            for (int j = 0; j < report.getTemplates().size(); j++)
            {
                ReportTemplateVo template = report.getTemplates().get(j);

                if(Boolean.TRUE.equals(template.getIsActive()))
                {
                    grdReportsRow templateRow = row.getRows().newRow();
                    templateRow.setcolName(template.getName());
                    templateRow.setcolDescription(template.getDescription());
                    templateRow.setValue(template);
                }
            }

            row.setExpanded(true);
        }
    }

    if(form.grdReports().getRows().size() == 1 && form.grdReports().getRows().get(0).getRows().size() == 1)
        form.grdReports().setValue(form.grdReports().getRows().get(0).getRows().get(0).getValue());
}
项目:openMAXIMS    文件:Logic.java   
private void addClinicView(ReportVoCollection coll) 
{
    if (coll != null)
    {
        for(int i = 0; i < coll.size(); i++)
        {
            ReportVo report = coll.get(i);

            if (report.getReportNameIsNotNull() 
                    && (report.getReportName().equalsIgnoreCase("Scheduler - Clinic View")))
            {
                if(report.getTemplatesIsNotNull() && report.getTemplates().size() > 0)
                {

                    grdPatientLettersRow row = form.grdPatientLetters().getRows().newRow();

                    row.setBackColor(Color.Beige);
                    row.setcolName(report.getReportName());
                    row.setcolDescription(report.getReportDescription());
                    row.setValue(report);

                    for (int j = 0; j < report.getTemplates().size(); j++)
                    {
                        ReportTemplateVo template = report.getTemplates().get(j);

                        grdPatientLettersRow templateRow = row.getRows().newRow();
                        templateRow.setcolName(template.getName());
                        templateRow.setcolDescription(template.getDescription());
                        templateRow.setValue(template);
                    }

                    row.setExpanded(true);
                }
            }
        }

        if(form.grdPatientLetters().getRows().size() == 1 && form.grdPatientLetters().getRows().get(0).getRows().size() == 1)
            form.grdPatientLetters().setValue(form.grdPatientLetters().getRows().get(0).getRows().get(0).getValue());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addGeneralTemplates(ReportVoCollection coll) 
{
    if (coll != null)
    {
        for(int i = 0; i < coll.size(); i++)
        {
            ReportVo report = coll.get(i);

            if(canBeSeeded(report) && report.getTemplatesIsNotNull() && report.getTemplates().size() > 0)
            {

                grdGeneralTemplateRow row = form.grdGeneralTemplate().getRows().newRow();

                row.setBackColor(Color.Beige);
                row.setcolName(report.getReportName());
                row.setcolDescription(report.getReportDescription());
                row.setValue(report);

                //WDEV-18311
                ReportTemplateVoCollection collTemplates = report.getTemplates().sort( new TemplatesComparator(SortOrder.ASCENDING)); 

                for (int j = 0; j < collTemplates.size(); j++)
                {
                    ReportTemplateVo template = collTemplates.get(j);

                    grdGeneralTemplateRow templateRow = row.getRows().newRow();
                    templateRow.setcolName(template.getName());
                    templateRow.setcolDescription(template.getDescription());
                    templateRow.setValue(template);
                }

                row.setExpanded(true);
            }
        }

        if(form.grdGeneralTemplate().getRows().size() == 1 && form.grdGeneralTemplate().getRows().get(0).getRows().size() == 1)
            form.grdGeneralTemplate().setValue(form.grdGeneralTemplate().getRows().get(0).getRows().get(0).getValue());

    }       
}
项目:openMAXIMS    文件:Logic.java   
private void displayAvailableReports(ReportVoCollection coll, PrintAgentVo printAgentVo)
{
    form.grdReportsAvailable().getRows().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        ReportVo rep = coll.get(i);

        if (rep.getTemplatesIsNotNull() && bHasActiveTemplates(rep))
        {
            grdReportsAvailableRow row = form.grdReportsAvailable().getRows().newRow();
            row.setColumnReport(rep.getReportName());
            row.setTooltip(rep.getReportDescription());
            row.setBold(true);
            row.setBackColor(Color.Beige);
            row.setValue(rep);

            for (int j = 0; j < rep.getTemplates().size(); j++)
            {
                if (rep.getTemplates().get(j).getIsActiveIsNotNull() && rep.getTemplates().get(j).getIsActive().equals(Boolean.TRUE) && isTemplateAlreadySelected(rep.getTemplates().get(j), printAgentVo) == false)
                {
                    grdReportsAvailableRow child = row.getRows().newRow();

                    child.setColumnReport(rep.getTemplates().get(j).getName());
                    child.setTooltip(rep.getTemplates().get(j).getDescription());
                    child.setValue(rep.getTemplates().get(j));
                }
            }

            row.setExpanded(true);

            if (row.getRows().size() == 0)
            {
                form.grdReportsAvailable().setValue(row.getValue());
                form.grdReportsAvailable().removeSelectedRow();
            }
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateReports(ReportVoCollection repColl) 
{
    for (int i = 0; i < repColl.size(); i++)
    {
        ReportVo rep = repColl.get(i);
        GenForm.grdReportListRow row = form.grdReportList().getRows().newRow();
        row.setReportName(rep.getReportName());
        //row.setRepAssign(false);
        row.setValue(rep);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateReportsGridAssignment(ReportVoCollection coll)
{
    form.grdReportList().getRows().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        ReportVo rep = coll.get(i);
        GenForm.grdReportListRow row = form.grdReportList().getRows().newRow();

        row.setReportName(rep.getReportName());
        row.setValue(rep);
    }
}
项目:openMAXIMS    文件:FormReportsImpl.java   
/**
* List all reports in the system
*/
@SuppressWarnings("unchecked")
public ims.admin.vo.ReportVoCollection listReports()
{
    DomainFactory factory = getDomainFactory();
    String hqlString = "from ReportBo rep where rep.isActive = :ACTIVE";
    List reports = factory.find(hqlString, new String[] {"ACTIVE"}, new Object[] {Boolean.TRUE});
    return ReportVoAssembler.createReportVoCollectionFromReportBo(reports);
}