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

项目:AvoinApotti    文件:ClinicalTeamAdministrationImpl.java   
public ims.core.vo.ClinicalTeamVo saveClinicalTeam(ims.core.vo.ClinicalTeamVo voClinicalTeam) throws ims.domain.exceptions.StaleObjectException
{
    if (voClinicalTeam == null)
        throw new CodingRuntimeException("SaveClinicalTeam called with a null Clinical Team Vo passed");
    if (!voClinicalTeam.isValidated())
        throw new CodingRuntimeException("ClinicalTeamVo has not been validated");                  

    DomainFactory factory = getDomainFactory();     
    ClinicalTeam domClinicalTeam = ClinicalTeamVoAssembler.extractClinicalTeam(factory, voClinicalTeam);
    factory.save(domClinicalTeam);

    return ClinicalTeamVoAssembler.create(domClinicalTeam);                     
}
项目:AvoinApotti    文件:TeamMemberSelectionImpl.java   
public ClinicalTeamVoCollection listTeamLeadsMembers(IHcp teamLead) 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from ClinicalTeam ct "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(teamLead.getIHcpId()!= null)
    {
        condStr.append(andStr + " ct.leadHCP.id = :id_Hcp"); 
        markers.add("id_Hcp");
        values.add(teamLead.getIHcpId());
        andStr = " and ";

        condStr.append(andStr + " ct.isActive = :isActive");
        markers.add("isActive");
        values.add(new Boolean(true));      
        andStr = " and ";
    }   

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();

    ClinicalTeamVoCollection voClinicalTeamColl = new ClinicalTeamVoCollection();

    voClinicalTeamColl = ClinicalTeamVoAssembler.createClinicalTeamVoCollectionFromClinicalTeam(factory.find(hql, markers, values));

    if(voClinicalTeamColl == null)
        return null;
    else
        return voClinicalTeamColl;
}
项目:openMAXIMS    文件:ClinicalTeamAdministrationImpl.java   
public ims.core.vo.ClinicalTeamVo saveClinicalTeam(ims.core.vo.ClinicalTeamVo voClinicalTeam) throws ims.domain.exceptions.StaleObjectException
{
    if (voClinicalTeam == null)
        throw new CodingRuntimeException("SaveClinicalTeam called with a null Clinical Team Vo passed");
    if (!voClinicalTeam.isValidated())
        throw new CodingRuntimeException("ClinicalTeamVo has not been validated");                  

    DomainFactory factory = getDomainFactory();     
    ClinicalTeam domClinicalTeam = ClinicalTeamVoAssembler.extractClinicalTeam(factory, voClinicalTeam);
    factory.save(domClinicalTeam);

    return ClinicalTeamVoAssembler.create(domClinicalTeam);                     
}
项目:openMAXIMS    文件:TeamMemberSelectionImpl.java   
public ClinicalTeamVoCollection listTeamLeadsMembers(IHcp teamLead) 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from ClinicalTeam ct "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(teamLead.getIHcpId()!= null)
    {
        condStr.append(andStr + " ct.leadHCP.id = :id_Hcp"); 
        markers.add("id_Hcp");
        values.add(teamLead.getIHcpId());
        andStr = " and ";

        condStr.append(andStr + " ct.isActive = :isActive");
        markers.add("isActive");
        values.add(new Boolean(true));      
        andStr = " and ";
    }   

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();

    ClinicalTeamVoCollection voClinicalTeamColl = new ClinicalTeamVoCollection();

    voClinicalTeamColl = ClinicalTeamVoAssembler.createClinicalTeamVoCollectionFromClinicalTeam(factory.find(hql, markers, values));

    if(voClinicalTeamColl == null)
        return null;
    else
        return voClinicalTeamColl;
}
项目:openMAXIMS    文件:ClinicalTeamAdministrationImpl.java   
public ims.core.vo.ClinicalTeamVo saveClinicalTeam(ims.core.vo.ClinicalTeamVo voClinicalTeam) throws ims.domain.exceptions.StaleObjectException
{
    if (voClinicalTeam == null)
        throw new CodingRuntimeException("SaveClinicalTeam called with a null Clinical Team Vo passed");
    if (!voClinicalTeam.isValidated())
        throw new CodingRuntimeException("ClinicalTeamVo has not been validated");                  

    DomainFactory factory = getDomainFactory();     
    ClinicalTeam domClinicalTeam = ClinicalTeamVoAssembler.extractClinicalTeam(factory, voClinicalTeam);
    factory.save(domClinicalTeam);

    return ClinicalTeamVoAssembler.create(domClinicalTeam);                     
}
项目:openMAXIMS    文件:TeamMemberSelectionImpl.java   
public ClinicalTeamVoCollection listTeamLeadsMembers(IHcp teamLead) 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from ClinicalTeam ct "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(teamLead.getIHcpId()!= null)
    {
        condStr.append(andStr + " ct.leadHCP.id = :id_Hcp"); 
        markers.add("id_Hcp");
        values.add(teamLead.getIHcpId());
        andStr = " and ";

        condStr.append(andStr + " ct.isActive = :isActive");
        markers.add("isActive");
        values.add(new Boolean(true));      
        andStr = " and ";
    }   

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();

    ClinicalTeamVoCollection voClinicalTeamColl = new ClinicalTeamVoCollection();

    voClinicalTeamColl = ClinicalTeamVoAssembler.createClinicalTeamVoCollectionFromClinicalTeam(factory.find(hql, markers, values));

    if(voClinicalTeamColl == null)
        return null;
    else
        return voClinicalTeamColl;
}
项目:openmaxims-linux    文件:ClinicalTeamAdministrationImpl.java   
public ims.core.vo.ClinicalTeamVo saveClinicalTeam(ims.core.vo.ClinicalTeamVo voClinicalTeam) throws ims.domain.exceptions.StaleObjectException
{
    if (voClinicalTeam == null)
        throw new CodingRuntimeException("SaveClinicalTeam called with a null Clinical Team Vo passed");
    if (!voClinicalTeam.isValidated())
        throw new CodingRuntimeException("ClinicalTeamVo has not been validated");                  

    DomainFactory factory = getDomainFactory();     
    ClinicalTeam domClinicalTeam = ClinicalTeamVoAssembler.extractClinicalTeam(factory, voClinicalTeam);
    factory.save(domClinicalTeam);

    return ClinicalTeamVoAssembler.create(domClinicalTeam);                     
}
项目:openmaxims-linux    文件:TeamMemberSelectionImpl.java   
public ClinicalTeamVoCollection listTeamLeadsMembers(IHcp teamLead) 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from ClinicalTeam ct "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(teamLead.getIHcpId()!= null)
    {
        condStr.append(andStr + " ct.leadHCP.id = :id_Hcp"); 
        markers.add("id_Hcp");
        values.add(teamLead.getIHcpId());
        andStr = " and ";

        condStr.append(andStr + " ct.isActive = :isActive");
        markers.add("isActive");
        values.add(new Boolean(true));      
        andStr = " and ";
    }   

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();

    ClinicalTeamVoCollection voClinicalTeamColl = new ClinicalTeamVoCollection();

    voClinicalTeamColl = ClinicalTeamVoAssembler.createClinicalTeamVoCollectionFromClinicalTeam(factory.find(hql, markers, values));

    if(voClinicalTeamColl == null)
        return null;
    else
        return voClinicalTeamColl;
}
项目:AvoinApotti    文件:ClinicalTeamAdministrationImpl.java   
public ClinicalTeamVoCollection listClinicalTeams(ClinicalTeamSearchCriteriaVo voFilter)
{
    DomainFactory factory = getDomainFactory();
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList(); 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    String sHQL = " from ClinicalTeam c ";

    if (voFilter.getActive() != null)
    {
        condStr.append(andStr + " c.isActive = :Active");
        markers.add("Active");
        values.add(voFilter.getActive());           
        andStr = " and ";
    }

    if (voFilter.getTeamName() != null)
    {
        condStr.append(andStr + " c.teamName = :TeamName");
        markers.add("TeamName");
        values.add(voFilter.getTeamName());         
        andStr = " and ";           
    }

    if (voFilter.getTeamType() != null)
    {
        condStr.append(andStr + " c.teamType = :TeamType");
        markers.add("TeamType");
        values.add(getDomLookup(voFilter.getTeamType()));           
        andStr = " and ";           
    }



    if (andStr.equals(" and "))
        sHQL += " where ";

    sHQL += condStr.toString();
    List lstClinicalTeams = factory.find(sHQL, markers, values);                
    return ClinicalTeamVoAssembler.createClinicalTeamVoCollectionFromClinicalTeam(lstClinicalTeams);        
}
项目:openMAXIMS    文件:ClinicalTeamAdministrationImpl.java   
public ClinicalTeamVoCollection listClinicalTeams(ClinicalTeamSearchCriteriaVo voFilter)
{
    DomainFactory factory = getDomainFactory();
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList(); 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    String sHQL = " from ClinicalTeam c ";

    if (voFilter.getActive() != null)
    {
        condStr.append(andStr + " c.isActive = :Active");
        markers.add("Active");
        values.add(voFilter.getActive());           
        andStr = " and ";
    }

    if (voFilter.getTeamName() != null)
    {
        condStr.append(andStr + " c.teamName = :TeamName");
        markers.add("TeamName");
        values.add(voFilter.getTeamName());         
        andStr = " and ";           
    }

    if (voFilter.getTeamType() != null)
    {
        condStr.append(andStr + " c.teamType = :TeamType");
        markers.add("TeamType");
        values.add(getDomLookup(voFilter.getTeamType()));           
        andStr = " and ";           
    }



    if (andStr.equals(" and "))
        sHQL += " where ";

    sHQL += condStr.toString();
    List lstClinicalTeams = factory.find(sHQL, markers, values);                
    return ClinicalTeamVoAssembler.createClinicalTeamVoCollectionFromClinicalTeam(lstClinicalTeams);        
}
项目:openMAXIMS    文件:ClinicalTeamAdministrationImpl.java   
public ClinicalTeamVoCollection listClinicalTeams(ClinicalTeamSearchCriteriaVo voFilter)
{
    DomainFactory factory = getDomainFactory();
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList(); 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    String sHQL = " from ClinicalTeam c ";

    if (voFilter.getActive() != null)
    {
        condStr.append(andStr + " c.isActive = :Active");
        markers.add("Active");
        values.add(voFilter.getActive());           
        andStr = " and ";
    }

    if (voFilter.getTeamName() != null)
    {
        condStr.append(andStr + " c.teamName = :TeamName");
        markers.add("TeamName");
        values.add(voFilter.getTeamName());         
        andStr = " and ";           
    }

    if (voFilter.getTeamType() != null)
    {
        condStr.append(andStr + " c.teamType = :TeamType");
        markers.add("TeamType");
        values.add(getDomLookup(voFilter.getTeamType()));           
        andStr = " and ";           
    }



    if (andStr.equals(" and "))
        sHQL += " where ";

    sHQL += condStr.toString();
    List lstClinicalTeams = factory.find(sHQL, markers, values);                
    return ClinicalTeamVoAssembler.createClinicalTeamVoCollectionFromClinicalTeam(lstClinicalTeams);        
}
项目:openmaxims-linux    文件:ClinicalTeamAdministrationImpl.java   
public ClinicalTeamVoCollection listClinicalTeams(ClinicalTeamSearchCriteriaVo voFilter)
{
    DomainFactory factory = getDomainFactory();
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList(); 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    String sHQL = " from ClinicalTeam c ";

    if (voFilter.getActive() != null)
    {
        condStr.append(andStr + " c.isActive = :Active");
        markers.add("Active");
        values.add(voFilter.getActive());           
        andStr = " and ";
    }

    if (voFilter.getTeamName() != null)
    {
        condStr.append(andStr + " c.teamName = :TeamName");
        markers.add("TeamName");
        values.add(voFilter.getTeamName());         
        andStr = " and ";           
    }

    if (voFilter.getTeamType() != null)
    {
        condStr.append(andStr + " c.teamType = :TeamType");
        markers.add("TeamType");
        values.add(getDomLookup(voFilter.getTeamType()));           
        andStr = " and ";           
    }



    if (andStr.equals(" and "))
        sHQL += " where ";

    sHQL += condStr.toString();
    List lstClinicalTeams = factory.find(sHQL, markers, values);                
    return ClinicalTeamVoAssembler.createClinicalTeamVoCollectionFromClinicalTeam(lstClinicalTeams);        
}