Java 类ims.core.vo.domain.DrawingGraphicFindingVoAssembler 实例源码

项目:AvoinApotti    文件:DynamicAssessmentsImpl.java   
private Graphic_AssessmentFindingVo assembleGraphicAssessmentFinding(GraphicAssessmentFinding doGraphicAssessmentFinding) 
{
    if(doGraphicAssessmentFinding == null)
        return null;

    Graphic_AssessmentFindingVo graphicAssessmentFinding = new Graphic_AssessmentFindingVo(doGraphicAssessmentFinding.getId(), doGraphicAssessmentFinding.getVersion());

    graphicAssessmentFinding.setIsRIE(doGraphicAssessmentFinding.getIsRIE());
    graphicAssessmentFinding.setSequence(doGraphicAssessmentFinding.getSequence());
    graphicAssessmentFinding.setFinding(DrawingGraphicFindingVoAssembler.create(doGraphicAssessmentFinding.getFinding()));

    if(doGraphicAssessmentFinding.getFindingStage() != null)
    {
        graphicAssessmentFinding.setFindingStage(new Finding_StageQuestionsVoCollection());

        for (Object next : doGraphicAssessmentFinding.getFindingStage())
        {
            if(next instanceof FindingStageQuestions)
            {
                graphicAssessmentFinding.getFindingStage().add(assembleFindingStageQuestions((FindingStageQuestions) next));
            }
        }   
    }   

    return graphicAssessmentFinding;
}
项目:AvoinApotti    文件:FindingQuestionsImpl.java   
public DrawingGraphicFindingQuestionVo saveDrawingGraphicFinding(DrawingGraphicFindingQuestionVo voDrawingGraphicFindingQuestion) throws StaleObjectException
{
    if(voDrawingGraphicFindingQuestion == null)
        throw new RuntimeException("Cannot save null value for DrawingGraphicFindingQuestionVo");
    if(voDrawingGraphicFindingQuestion.isValidated() == false)
        throw new CodingRuntimeException("DrawingGraphicFindingQuestion Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DrawingGraphicFindingQuestion doDrawingGraphicFindingQuestion = DrawingGraphicFindingQuestionVoAssembler.extractDrawingGraphicFindingQuestion(factory, voDrawingGraphicFindingQuestion);
    DrawingGraphicFinding doDrawingGraphicFinding = DrawingGraphicFindingVoAssembler.extractDrawingGraphicFinding(factory, voDrawingGraphicFindingQuestion.getDrawingGraphicFinding());
    factory.save(doDrawingGraphicFinding);

    doDrawingGraphicFindingQuestion.setDrawingGraphicFinding(doDrawingGraphicFinding);
    factory.save(doDrawingGraphicFinding);
    return DrawingGraphicFindingQuestionVoAssembler.create(doDrawingGraphicFindingQuestion);
}
项目:openMAXIMS    文件:DynamicAssessmentsImpl.java   
private Graphic_AssessmentFindingVo assembleGraphicAssessmentFinding(GraphicAssessmentFinding doGraphicAssessmentFinding) 
{
    if(doGraphicAssessmentFinding == null)
        return null;

    Graphic_AssessmentFindingVo graphicAssessmentFinding = new Graphic_AssessmentFindingVo(doGraphicAssessmentFinding.getId(), doGraphicAssessmentFinding.getVersion());

    graphicAssessmentFinding.setIsRIE(doGraphicAssessmentFinding.getIsRIE());
    graphicAssessmentFinding.setSequence(doGraphicAssessmentFinding.getSequence());
    graphicAssessmentFinding.setFinding(DrawingGraphicFindingVoAssembler.create(doGraphicAssessmentFinding.getFinding()));

    if(doGraphicAssessmentFinding.getFindingStage() != null)
    {
        graphicAssessmentFinding.setFindingStage(new Finding_StageQuestionsVoCollection());

        for (Object next : doGraphicAssessmentFinding.getFindingStage())
        {
            if(next instanceof FindingStageQuestions)
            {
                graphicAssessmentFinding.getFindingStage().add(assembleFindingStageQuestions((FindingStageQuestions) next));
            }
        }   
    }   

    return graphicAssessmentFinding;
}
项目:openMAXIMS    文件:FindingQuestionsImpl.java   
public DrawingGraphicFindingQuestionVo saveDrawingGraphicFinding(DrawingGraphicFindingQuestionVo voDrawingGraphicFindingQuestion) throws StaleObjectException
{
    if(voDrawingGraphicFindingQuestion == null)
        throw new RuntimeException("Cannot save null value for DrawingGraphicFindingQuestionVo");
    if(voDrawingGraphicFindingQuestion.isValidated() == false)
        throw new CodingRuntimeException("DrawingGraphicFindingQuestion Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DrawingGraphicFindingQuestion doDrawingGraphicFindingQuestion = DrawingGraphicFindingQuestionVoAssembler.extractDrawingGraphicFindingQuestion(factory, voDrawingGraphicFindingQuestion);
    DrawingGraphicFinding doDrawingGraphicFinding = DrawingGraphicFindingVoAssembler.extractDrawingGraphicFinding(factory, voDrawingGraphicFindingQuestion.getDrawingGraphicFinding());
    factory.save(doDrawingGraphicFinding);

    doDrawingGraphicFindingQuestion.setDrawingGraphicFinding(doDrawingGraphicFinding);
    factory.save(doDrawingGraphicFinding);
    return DrawingGraphicFindingQuestionVoAssembler.create(doDrawingGraphicFindingQuestion);
}
项目:openMAXIMS    文件:DynamicAssessmentsImpl.java   
private Graphic_AssessmentFindingVo assembleGraphicAssessmentFinding(GraphicAssessmentFinding doGraphicAssessmentFinding) 
{
    if(doGraphicAssessmentFinding == null)
        return null;

    Graphic_AssessmentFindingVo graphicAssessmentFinding = new Graphic_AssessmentFindingVo(doGraphicAssessmentFinding.getId(), doGraphicAssessmentFinding.getVersion());

    graphicAssessmentFinding.setIsRIE(doGraphicAssessmentFinding.getIsRIE());
    graphicAssessmentFinding.setSequence(doGraphicAssessmentFinding.getSequence());
    graphicAssessmentFinding.setFinding(DrawingGraphicFindingVoAssembler.create(doGraphicAssessmentFinding.getFinding()));

    if(doGraphicAssessmentFinding.getFindingStage() != null)
    {
        graphicAssessmentFinding.setFindingStage(new Finding_StageQuestionsVoCollection());

        for (Object next : doGraphicAssessmentFinding.getFindingStage())
        {
            if(next instanceof FindingStageQuestions)
            {
                graphicAssessmentFinding.getFindingStage().add(assembleFindingStageQuestions((FindingStageQuestions) next));
            }
        }   
    }   

    return graphicAssessmentFinding;
}
项目:openMAXIMS    文件:FindingQuestionsImpl.java   
public DrawingGraphicFindingQuestionVo saveDrawingGraphicFinding(DrawingGraphicFindingQuestionVo voDrawingGraphicFindingQuestion) throws StaleObjectException
{
    if(voDrawingGraphicFindingQuestion == null)
        throw new RuntimeException("Cannot save null value for DrawingGraphicFindingQuestionVo");
    if(voDrawingGraphicFindingQuestion.isValidated() == false)
        throw new CodingRuntimeException("DrawingGraphicFindingQuestion Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DrawingGraphicFindingQuestion doDrawingGraphicFindingQuestion = DrawingGraphicFindingQuestionVoAssembler.extractDrawingGraphicFindingQuestion(factory, voDrawingGraphicFindingQuestion);
    DrawingGraphicFinding doDrawingGraphicFinding = DrawingGraphicFindingVoAssembler.extractDrawingGraphicFinding(factory, voDrawingGraphicFindingQuestion.getDrawingGraphicFinding());
    factory.save(doDrawingGraphicFinding);

    doDrawingGraphicFindingQuestion.setDrawingGraphicFinding(doDrawingGraphicFinding);
    factory.save(doDrawingGraphicFinding);
    return DrawingGraphicFindingQuestionVoAssembler.create(doDrawingGraphicFindingQuestion);
}
项目:openmaxims-linux    文件:DynamicAssessmentsImpl.java   
private Graphic_AssessmentFindingVo assembleGraphicAssessmentFinding(GraphicAssessmentFinding doGraphicAssessmentFinding) 
{
    if(doGraphicAssessmentFinding == null)
        return null;

    Graphic_AssessmentFindingVo graphicAssessmentFinding = new Graphic_AssessmentFindingVo(doGraphicAssessmentFinding.getId(), doGraphicAssessmentFinding.getVersion());

    graphicAssessmentFinding.setIsRIE(doGraphicAssessmentFinding.getIsRIE());
    graphicAssessmentFinding.setSequence(doGraphicAssessmentFinding.getSequence());
    graphicAssessmentFinding.setFinding(DrawingGraphicFindingVoAssembler.create(doGraphicAssessmentFinding.getFinding()));

    if(doGraphicAssessmentFinding.getFindingStage() != null)
    {
        graphicAssessmentFinding.setFindingStage(new Finding_StageQuestionsVoCollection());

        for (Object next : doGraphicAssessmentFinding.getFindingStage())
        {
            if(next instanceof FindingStageQuestions)
            {
                graphicAssessmentFinding.getFindingStage().add(assembleFindingStageQuestions((FindingStageQuestions) next));
            }
        }   
    }   

    return graphicAssessmentFinding;
}
项目:openmaxims-linux    文件:FindingQuestionsImpl.java   
public DrawingGraphicFindingQuestionVo saveDrawingGraphicFinding(DrawingGraphicFindingQuestionVo voDrawingGraphicFindingQuestion) throws StaleObjectException
{
    if(voDrawingGraphicFindingQuestion == null)
        throw new RuntimeException("Cannot save null value for DrawingGraphicFindingQuestionVo");
    if(voDrawingGraphicFindingQuestion.isValidated() == false)
        throw new CodingRuntimeException("DrawingGraphicFindingQuestion Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DrawingGraphicFindingQuestion doDrawingGraphicFindingQuestion = DrawingGraphicFindingQuestionVoAssembler.extractDrawingGraphicFindingQuestion(factory, voDrawingGraphicFindingQuestion);
    DrawingGraphicFinding doDrawingGraphicFinding = DrawingGraphicFindingVoAssembler.extractDrawingGraphicFinding(factory, voDrawingGraphicFindingQuestion.getDrawingGraphicFinding());
    factory.save(doDrawingGraphicFinding);

    doDrawingGraphicFindingQuestion.setDrawingGraphicFinding(doDrawingGraphicFinding);
    factory.save(doDrawingGraphicFinding);
    return DrawingGraphicFindingQuestionVoAssembler.create(doDrawingGraphicFindingQuestion);
}
项目:AvoinApotti    文件:DynamicAssessmentsImpl.java   
private Patient_GraphicAssessmentFindingVo assemblePatientGraphicAssessmentFinding(PatientGraphicAssessmentFinding doPatientGraphicAssessmentFinding) 
{
    if(doPatientGraphicAssessmentFinding == null)
        return null;

    Patient_GraphicAssessmentFindingVo patientGraphicAssessmentFinding = new Patient_GraphicAssessmentFindingVo(doPatientGraphicAssessmentFinding.getId(), doPatientGraphicAssessmentFinding.getVersion());

    patientGraphicAssessmentFinding.setIsRIE(doPatientGraphicAssessmentFinding.getIsRIE());
    patientGraphicAssessmentFinding.setAreaName(doPatientGraphicAssessmentFinding.getAreaName());
    patientGraphicAssessmentFinding.setGraphicFinding(DrawingGraphicFindingVoAssembler.create(doPatientGraphicAssessmentFinding.getGraphicFinding()));
    patientGraphicAssessmentFinding.setAreaDrawn(doPatientGraphicAssessmentFinding.getAreaDrawn());
    patientGraphicAssessmentFinding.setAuthoringInformation(AuthoringInformationVoAssembler.create(doPatientGraphicAssessmentFinding.getAuthoringInformation()));
    patientGraphicAssessmentFinding.setAreaDetails(doPatientGraphicAssessmentFinding.getAreaDetails());

    if(doPatientGraphicAssessmentFinding.getStage() != null)
    {
        patientGraphicAssessmentFinding.setStage(new Patient_GraphicalAssessmentStageVoCollection());

        for(Object next : doPatientGraphicAssessmentFinding.getStage())
        {
            if(next instanceof PatientGraphicalAssessmentStage)
            {
                patientGraphicAssessmentFinding.getStage().add(assemblePatientGraphicalAssessmentStage((PatientGraphicalAssessmentStage) next));
            }
        }
    }

    return patientGraphicAssessmentFinding;
}
项目:AvoinApotti    文件:FindingQuestionsImpl.java   
public ims.core.vo.DrawingGraphicFindingVo saveFinding(ims.core.vo.DrawingGraphicFindingVo voDrawingGraphicFinding) throws ims.domain.exceptions.StaleObjectException
{
    if(voDrawingGraphicFinding == null)
        throw new RuntimeException("Cannot save null value for DrawingGraphicFindingVo");
    if(voDrawingGraphicFinding.isValidated() == false)
        throw new CodingRuntimeException("DrawingGraphicFinding Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DrawingGraphicFinding doDrawingGraphicFinding = DrawingGraphicFindingVoAssembler.extractDrawingGraphicFinding(factory, voDrawingGraphicFinding);
    factory.save(doDrawingGraphicFinding);
    return DrawingGraphicFindingVoAssembler.create(doDrawingGraphicFinding);
}
项目:openMAXIMS    文件:DynamicAssessmentsImpl.java   
private Patient_GraphicAssessmentFindingVo assemblePatientGraphicAssessmentFinding(PatientGraphicAssessmentFinding doPatientGraphicAssessmentFinding) 
{
    if(doPatientGraphicAssessmentFinding == null)
        return null;

    Patient_GraphicAssessmentFindingVo patientGraphicAssessmentFinding = new Patient_GraphicAssessmentFindingVo(doPatientGraphicAssessmentFinding.getId(), doPatientGraphicAssessmentFinding.getVersion());

    patientGraphicAssessmentFinding.setIsRIE(doPatientGraphicAssessmentFinding.getIsRIE());
    patientGraphicAssessmentFinding.setAreaName(doPatientGraphicAssessmentFinding.getAreaName());
    patientGraphicAssessmentFinding.setGraphicFinding(DrawingGraphicFindingVoAssembler.create(doPatientGraphicAssessmentFinding.getGraphicFinding()));
    patientGraphicAssessmentFinding.setAreaDrawn(doPatientGraphicAssessmentFinding.getAreaDrawn());
    patientGraphicAssessmentFinding.setAuthoringInformation(AuthoringInformationVoAssembler.create(doPatientGraphicAssessmentFinding.getAuthoringInformation()));
    patientGraphicAssessmentFinding.setAreaDetails(doPatientGraphicAssessmentFinding.getAreaDetails());

    if(doPatientGraphicAssessmentFinding.getStage() != null)
    {
        patientGraphicAssessmentFinding.setStage(new Patient_GraphicalAssessmentStageVoCollection());

        for(Object next : doPatientGraphicAssessmentFinding.getStage())
        {
            if(next instanceof PatientGraphicalAssessmentStage)
            {
                patientGraphicAssessmentFinding.getStage().add(assemblePatientGraphicalAssessmentStage((PatientGraphicalAssessmentStage) next));
            }
        }
    }

    return patientGraphicAssessmentFinding;
}
项目:openMAXIMS    文件:FindingQuestionsImpl.java   
public ims.core.vo.DrawingGraphicFindingVo saveFinding(ims.core.vo.DrawingGraphicFindingVo voDrawingGraphicFinding) throws ims.domain.exceptions.StaleObjectException
{
    if(voDrawingGraphicFinding == null)
        throw new RuntimeException("Cannot save null value for DrawingGraphicFindingVo");
    if(voDrawingGraphicFinding.isValidated() == false)
        throw new CodingRuntimeException("DrawingGraphicFinding Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DrawingGraphicFinding doDrawingGraphicFinding = DrawingGraphicFindingVoAssembler.extractDrawingGraphicFinding(factory, voDrawingGraphicFinding);
    factory.save(doDrawingGraphicFinding);
    return DrawingGraphicFindingVoAssembler.create(doDrawingGraphicFinding);
}
项目:openMAXIMS    文件:DynamicAssessmentsImpl.java   
private Patient_GraphicAssessmentFindingVo assemblePatientGraphicAssessmentFinding(PatientGraphicAssessmentFinding doPatientGraphicAssessmentFinding) 
{
    if(doPatientGraphicAssessmentFinding == null)
        return null;

    Patient_GraphicAssessmentFindingVo patientGraphicAssessmentFinding = new Patient_GraphicAssessmentFindingVo(doPatientGraphicAssessmentFinding.getId(), doPatientGraphicAssessmentFinding.getVersion());

    patientGraphicAssessmentFinding.setIsRIE(doPatientGraphicAssessmentFinding.getIsRIE());
    patientGraphicAssessmentFinding.setAreaName(doPatientGraphicAssessmentFinding.getAreaName());
    patientGraphicAssessmentFinding.setGraphicFinding(DrawingGraphicFindingVoAssembler.create(doPatientGraphicAssessmentFinding.getGraphicFinding()));
    patientGraphicAssessmentFinding.setAreaDrawn(doPatientGraphicAssessmentFinding.getAreaDrawn());
    patientGraphicAssessmentFinding.setAuthoringInformation(AuthoringInformationVoAssembler.create(doPatientGraphicAssessmentFinding.getAuthoringInformation()));
    patientGraphicAssessmentFinding.setAreaDetails(doPatientGraphicAssessmentFinding.getAreaDetails());

    if(doPatientGraphicAssessmentFinding.getStage() != null)
    {
        patientGraphicAssessmentFinding.setStage(new Patient_GraphicalAssessmentStageVoCollection());

        for(Object next : doPatientGraphicAssessmentFinding.getStage())
        {
            if(next instanceof PatientGraphicalAssessmentStage)
            {
                patientGraphicAssessmentFinding.getStage().add(assemblePatientGraphicalAssessmentStage((PatientGraphicalAssessmentStage) next));
            }
        }
    }

    return patientGraphicAssessmentFinding;
}
项目:openMAXIMS    文件:FindingQuestionsImpl.java   
public ims.core.vo.DrawingGraphicFindingVo saveFinding(ims.core.vo.DrawingGraphicFindingVo voDrawingGraphicFinding) throws ims.domain.exceptions.StaleObjectException
{
    if(voDrawingGraphicFinding == null)
        throw new RuntimeException("Cannot save null value for DrawingGraphicFindingVo");
    if(voDrawingGraphicFinding.isValidated() == false)
        throw new CodingRuntimeException("DrawingGraphicFinding Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DrawingGraphicFinding doDrawingGraphicFinding = DrawingGraphicFindingVoAssembler.extractDrawingGraphicFinding(factory, voDrawingGraphicFinding);
    factory.save(doDrawingGraphicFinding);
    return DrawingGraphicFindingVoAssembler.create(doDrawingGraphicFinding);
}
项目:openmaxims-linux    文件:DynamicAssessmentsImpl.java   
private Patient_GraphicAssessmentFindingVo assemblePatientGraphicAssessmentFinding(PatientGraphicAssessmentFinding doPatientGraphicAssessmentFinding) 
{
    if(doPatientGraphicAssessmentFinding == null)
        return null;

    Patient_GraphicAssessmentFindingVo patientGraphicAssessmentFinding = new Patient_GraphicAssessmentFindingVo(doPatientGraphicAssessmentFinding.getId(), doPatientGraphicAssessmentFinding.getVersion());

    patientGraphicAssessmentFinding.setIsRIE(doPatientGraphicAssessmentFinding.getIsRIE());
    patientGraphicAssessmentFinding.setAreaName(doPatientGraphicAssessmentFinding.getAreaName());
    patientGraphicAssessmentFinding.setGraphicFinding(DrawingGraphicFindingVoAssembler.create(doPatientGraphicAssessmentFinding.getGraphicFinding()));
    patientGraphicAssessmentFinding.setAreaDrawn(doPatientGraphicAssessmentFinding.getAreaDrawn());
    patientGraphicAssessmentFinding.setAuthoringInformation(AuthoringInformationVoAssembler.create(doPatientGraphicAssessmentFinding.getAuthoringInformation()));
    patientGraphicAssessmentFinding.setAreaDetails(doPatientGraphicAssessmentFinding.getAreaDetails());

    if(doPatientGraphicAssessmentFinding.getStage() != null)
    {
        patientGraphicAssessmentFinding.setStage(new Patient_GraphicalAssessmentStageVoCollection());

        for(Object next : doPatientGraphicAssessmentFinding.getStage())
        {
            if(next instanceof PatientGraphicalAssessmentStage)
            {
                patientGraphicAssessmentFinding.getStage().add(assemblePatientGraphicalAssessmentStage((PatientGraphicalAssessmentStage) next));
            }
        }
    }

    return patientGraphicAssessmentFinding;
}
项目:openmaxims-linux    文件:FindingQuestionsImpl.java   
public ims.core.vo.DrawingGraphicFindingVo saveFinding(ims.core.vo.DrawingGraphicFindingVo voDrawingGraphicFinding) throws ims.domain.exceptions.StaleObjectException
{
    if(voDrawingGraphicFinding == null)
        throw new RuntimeException("Cannot save null value for DrawingGraphicFindingVo");
    if(voDrawingGraphicFinding.isValidated() == false)
        throw new CodingRuntimeException("DrawingGraphicFinding Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DrawingGraphicFinding doDrawingGraphicFinding = DrawingGraphicFindingVoAssembler.extractDrawingGraphicFinding(factory, voDrawingGraphicFinding);
    factory.save(doDrawingGraphicFinding);
    return DrawingGraphicFindingVoAssembler.create(doDrawingGraphicFinding);
}
项目:AvoinApotti    文件:FindingQuestionsImpl.java   
/**
* list Drawing Graphic Findings
*/
public ims.core.vo.DrawingGraphicFindingVoCollection listFindings(String findingName, PreActiveActiveInactiveStatus status)
{
    /*
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from DrawingGraphicFinding dgf ");
    ArrayList names  = new ArrayList();
    ArrayList values = new ArrayList();

    if(findingName != null && findingName.equals("") == false)
    {
        names.add("searchName");
        values.add(findingName.toUpperCase());
        names.add("STATUS");
        values.add(new Integer(PreActiveActiveInactiveStatus.ACTIVE.getId()));
        hql.append("where upper(dgf.displayText) like :searchName and dgf.activeStatus.id = :STATUS");
    }
    else
    {
        names.add("STATUS");
        values.add(new Integer(PreActiveActiveInactiveStatus.ACTIVE.getId()));
        hql.append("where dgf.activeStatus.id = :STATUS");
    }
*/

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from DrawingGraphicFinding dgf ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if(findingName != null && findingName.equals("") == false)
    {
        hql.append(andStr + " upper(dgf.displayText) like :searchName ");
        markers.add("searchName");
        values.add(findingName.toUpperCase());
        andStr = " and ";
    }
    if (status != null)
    {
        hql.append(andStr + " dgf.activeStatus.id = :STATUS ");
        markers.add("STATUS");
        values.add(new Integer(status.getId()));
        andStr = " and ";
    }

    if (markers.size() > 0)
        query += " where ";

    query += hql.toString();

    List findingsList = factory.find(query, markers, values);
    return DrawingGraphicFindingVoAssembler.createDrawingGraphicFindingVoCollectionFromDrawingGraphicFinding(findingsList);
}
项目:openMAXIMS    文件:FindingQuestionsImpl.java   
/**
* list Drawing Graphic Findings
*/
public ims.core.vo.DrawingGraphicFindingVoCollection listFindings(String findingName, PreActiveActiveInactiveStatus status)
{
    /*
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from DrawingGraphicFinding dgf ");
    ArrayList names  = new ArrayList();
    ArrayList values = new ArrayList();

    if(findingName != null && findingName.equals("") == false)
    {
        names.add("searchName");
        values.add(findingName.toUpperCase());
        names.add("STATUS");
        values.add(new Integer(PreActiveActiveInactiveStatus.ACTIVE.getId()));
        hql.append("where upper(dgf.displayText) like :searchName and dgf.activeStatus.id = :STATUS");
    }
    else
    {
        names.add("STATUS");
        values.add(new Integer(PreActiveActiveInactiveStatus.ACTIVE.getId()));
        hql.append("where dgf.activeStatus.id = :STATUS");
    }
*/

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from DrawingGraphicFinding dgf ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if(findingName != null && findingName.equals("") == false)
    {
        hql.append(andStr + " upper(dgf.displayText) like :searchName ");
        markers.add("searchName");
        values.add(findingName.toUpperCase());
        andStr = " and ";
    }
    if (status != null)
    {
        hql.append(andStr + " dgf.activeStatus.id = :STATUS ");
        markers.add("STATUS");
        values.add(new Integer(status.getId()));
        andStr = " and ";
    }

    if (markers.size() > 0)
        query += " where ";

    query += hql.toString();

    List findingsList = factory.find(query, markers, values);
    return DrawingGraphicFindingVoAssembler.createDrawingGraphicFindingVoCollectionFromDrawingGraphicFinding(findingsList);
}
项目:openMAXIMS    文件:FindingQuestionsImpl.java   
/**
* list Drawing Graphic Findings
*/
public ims.core.vo.DrawingGraphicFindingVoCollection listFindings(String findingName, PreActiveActiveInactiveStatus status)
{
    /*
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from DrawingGraphicFinding dgf ");
    ArrayList names  = new ArrayList();
    ArrayList values = new ArrayList();

    if(findingName != null && findingName.equals("") == false)
    {
        names.add("searchName");
        values.add(findingName.toUpperCase());
        names.add("STATUS");
        values.add(new Integer(PreActiveActiveInactiveStatus.ACTIVE.getId()));
        hql.append("where upper(dgf.displayText) like :searchName and dgf.activeStatus.id = :STATUS");
    }
    else
    {
        names.add("STATUS");
        values.add(new Integer(PreActiveActiveInactiveStatus.ACTIVE.getId()));
        hql.append("where dgf.activeStatus.id = :STATUS");
    }
*/

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from DrawingGraphicFinding dgf ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if(findingName != null && findingName.equals("") == false)
    {
        hql.append(andStr + " upper(dgf.displayText) like :searchName ");
        markers.add("searchName");
        values.add(findingName.toUpperCase());
        andStr = " and ";
    }
    if (status != null)
    {
        hql.append(andStr + " dgf.activeStatus.id = :STATUS ");
        markers.add("STATUS");
        values.add(new Integer(status.getId()));
        andStr = " and ";
    }

    if (markers.size() > 0)
        query += " where ";

    query += hql.toString();

    List findingsList = factory.find(query, markers, values);
    return DrawingGraphicFindingVoAssembler.createDrawingGraphicFindingVoCollectionFromDrawingGraphicFinding(findingsList);
}
项目:openmaxims-linux    文件:FindingQuestionsImpl.java   
/**
* list Drawing Graphic Findings
*/
public ims.core.vo.DrawingGraphicFindingVoCollection listFindings(String findingName, PreActiveActiveInactiveStatus status)
{
    /*
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from DrawingGraphicFinding dgf ");
    ArrayList names  = new ArrayList();
    ArrayList values = new ArrayList();

    if(findingName != null && findingName.equals("") == false)
    {
        names.add("searchName");
        values.add(findingName.toUpperCase());
        names.add("STATUS");
        values.add(new Integer(PreActiveActiveInactiveStatus.ACTIVE.getId()));
        hql.append("where upper(dgf.displayText) like :searchName and dgf.activeStatus.id = :STATUS");
    }
    else
    {
        names.add("STATUS");
        values.add(new Integer(PreActiveActiveInactiveStatus.ACTIVE.getId()));
        hql.append("where dgf.activeStatus.id = :STATUS");
    }
*/

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from DrawingGraphicFinding dgf ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if(findingName != null && findingName.equals("") == false)
    {
        hql.append(andStr + " upper(dgf.displayText) like :searchName ");
        markers.add("searchName");
        values.add(findingName.toUpperCase());
        andStr = " and ";
    }
    if (status != null)
    {
        hql.append(andStr + " dgf.activeStatus.id = :STATUS ");
        markers.add("STATUS");
        values.add(new Integer(status.getId()));
        andStr = " and ";
    }

    if (markers.size() > 0)
        query += " where ";

    query += hql.toString();

    List findingsList = factory.find(query, markers, values);
    return DrawingGraphicFindingVoAssembler.createDrawingGraphicFindingVoCollectionFromDrawingGraphicFinding(findingsList);
}