Java 类ims.therapies.vo.domain.WheelchairDetailsVoAssembler 实例源码

项目:AvoinApotti    文件:WheelchairDetailsImpl.java   
public WheelchairDetailsVoCollection listByPatient(Integer idPatient) {
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from WheelchairDetails w ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (idPatient != null)
    {
        hql.append(andStr + " w.careContext.episodeOfCare.careSpell.patient.id = :id_Patient");
        markers.add("id_Patient");
        values.add(idPatient);          
        andStr = " and ";
    }

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


    List details = factory.find(query, markers, values);    
    WheelchairDetailsVoCollection collWheelchairDetails = WheelchairDetailsVoAssembler.createWheelchairDetailsVoCollectionFromWheelchairDetails(details);
    return collWheelchairDetails;

}
项目:openMAXIMS    文件:WheelchairDetailsImpl.java   
public WheelchairDetailsVoCollection listByPatient(Integer idPatient) {
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from WheelchairDetails w ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (idPatient != null)
    {
        hql.append(andStr + " w.careContext.episodeOfCare.careSpell.patient.id = :id_Patient");
        markers.add("id_Patient");
        values.add(idPatient);          
        andStr = " and ";
    }

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


    List details = factory.find(query, markers, values);    
    WheelchairDetailsVoCollection collWheelchairDetails = WheelchairDetailsVoAssembler.createWheelchairDetailsVoCollectionFromWheelchairDetails(details);
    return collWheelchairDetails;

}
项目:openMAXIMS    文件:WheelchairDetailsImpl.java   
public WheelchairDetailsVoCollection listByPatient(Integer idPatient) {
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from WheelchairDetails w ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (idPatient != null)
    {
        hql.append(andStr + " w.careContext.episodeOfCare.careSpell.patient.id = :id_Patient");
        markers.add("id_Patient");
        values.add(idPatient);          
        andStr = " and ";
    }

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


    List details = factory.find(query, markers, values);    
    WheelchairDetailsVoCollection collWheelchairDetails = WheelchairDetailsVoAssembler.createWheelchairDetailsVoCollectionFromWheelchairDetails(details);
    return collWheelchairDetails;

}
项目:openmaxims-linux    文件:WheelchairDetailsImpl.java   
public WheelchairDetailsVoCollection listByPatient(Integer idPatient) {
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from WheelchairDetails w ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (idPatient != null)
    {
        hql.append(andStr + " w.careContext.episodeOfCare.careSpell.patient.id = :id_Patient");
        markers.add("id_Patient");
        values.add(idPatient);          
        andStr = " and ";
    }

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


    List details = factory.find(query, markers, values);    
    WheelchairDetailsVoCollection collWheelchairDetails = WheelchairDetailsVoAssembler.createWheelchairDetailsVoCollectionFromWheelchairDetails(details);
    return collWheelchairDetails;

}
项目:AvoinApotti    文件:WheelchairDetailsImpl.java   
public WheelchairDetailsVo save(WheelchairDetailsVo voWheelchairDetails) throws StaleObjectException {
    DomainFactory factory = getDomainFactory(); 

    if (!voWheelchairDetails.isValidated())
    {
        throw new DomainRuntimeException("This WheelchairDetailsVo has not been validated");
    }

    WheelchairDetails domWheelchairDetail = WheelchairDetailsVoAssembler.extractWheelchairDetails(factory, voWheelchairDetails);


    factory.save(domWheelchairDetail);


    return WheelchairDetailsVoAssembler.create(domWheelchairDetail);
}
项目:openMAXIMS    文件:WheelchairDetailsImpl.java   
public WheelchairDetailsVo save(WheelchairDetailsVo voWheelchairDetails) throws StaleObjectException {
    DomainFactory factory = getDomainFactory(); 

    if (!voWheelchairDetails.isValidated())
    {
        throw new DomainRuntimeException("This WheelchairDetailsVo has not been validated");
    }

    WheelchairDetails domWheelchairDetail = WheelchairDetailsVoAssembler.extractWheelchairDetails(factory, voWheelchairDetails);


    factory.save(domWheelchairDetail);


    return WheelchairDetailsVoAssembler.create(domWheelchairDetail);
}
项目:openMAXIMS    文件:WheelchairDetailsImpl.java   
public WheelchairDetailsVo save(WheelchairDetailsVo voWheelchairDetails) throws StaleObjectException {
    DomainFactory factory = getDomainFactory(); 

    if (!voWheelchairDetails.isValidated())
    {
        throw new DomainRuntimeException("This WheelchairDetailsVo has not been validated");
    }

    WheelchairDetails domWheelchairDetail = WheelchairDetailsVoAssembler.extractWheelchairDetails(factory, voWheelchairDetails);


    factory.save(domWheelchairDetail);


    return WheelchairDetailsVoAssembler.create(domWheelchairDetail);
}
项目:openmaxims-linux    文件:WheelchairDetailsImpl.java   
public WheelchairDetailsVo save(WheelchairDetailsVo voWheelchairDetails) throws StaleObjectException {
    DomainFactory factory = getDomainFactory(); 

    if (!voWheelchairDetails.isValidated())
    {
        throw new DomainRuntimeException("This WheelchairDetailsVo has not been validated");
    }

    WheelchairDetails domWheelchairDetail = WheelchairDetailsVoAssembler.extractWheelchairDetails(factory, voWheelchairDetails);


    factory.save(domWheelchairDetail);


    return WheelchairDetailsVoAssembler.create(domWheelchairDetail);
}