Java 类ims.therapies.vo.SportsActivitySessionShortVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void fillRecordBrowser()
{
    SportsActivitySessionShortVoCollection voSportsActivityShortColl = domain.listSportsActivityByCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    boolean currentClinicalContactFound = false;
    loadCurrentCareContext();

    if(voSportsActivityShortColl != null)
    {
        for(int i=0; i<voSportsActivityShortColl.size(); i++)
        {
            SportsActivitySessionShortVo voSportsActivitySessionShort = voSportsActivityShortColl.get(i);
            ClinicalContactShortVo voClinicalContact = voSportsActivitySessionShort.getClinicalContact();
            if(voCurrentClinicalContact != null && voClinicalContact.getID_ClinicalContact().equals(voCurrentClinicalContact.getID_ClinicalContact()))
            {
                currentClinicalContactFound = true;
                form.recbrSports().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime()+" - "+ voClinicalContact.getSeenBy(), Color.Green);
                form.recbrSports().setValue(voClinicalContact);
            }
            else
            {
                form.recbrSports().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime()+" - "+ voClinicalContact.getSeenBy());
            }
        }
    }

    if(!currentClinicalContactFound && voCurrentClinicalContact != null)
        loadCurrentClinicalContact();

    browseRecord();
}
项目:AvoinApotti    文件:SportsActivitiesImpl.java   
public SportsActivitySessionShortVoCollection listSportsActivityByCareContext(CareContextRefVo voCareContextRef)
{

    DomainFactory factory = getDomainFactory();

    String query = " from SportsActivitySession sas ";
    StringBuffer hql = new StringBuffer();
    String andStr = " ";

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


    if(voCareContextRef != null)
    {
        hql.append(andStr + " sas.clinicalContact.careContext.id = :cc");
        markers.add("cc");
        values.add(voCareContextRef.getID_CareContext());
        andStr = " and ";
    }

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

    java.util.List sasList = factory.find(query,markers,values);
    SportsActivitySessionShortVoCollection voSportsActivitySessionColl = SportsActivitySessionShortVoAssembler.createSportsActivitySessionShortVoCollectionFromSportsActivitySession(sasList);

    //if(voSportsActivitySessionColl != null && voSportsActivitySessionColl.size()>0)
        return voSportsActivitySessionColl;
    //else
    //  return null;
}
项目:openMAXIMS    文件:Logic.java   
private void fillRecordBrowser()
{
    SportsActivitySessionShortVoCollection voSportsActivityShortColl = domain.listSportsActivityByCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    boolean currentClinicalContactFound = false;
    loadCurrentCareContext();

    if(voSportsActivityShortColl != null)
    {
        for(int i=0; i<voSportsActivityShortColl.size(); i++)
        {
            SportsActivitySessionShortVo voSportsActivitySessionShort = voSportsActivityShortColl.get(i);
            ClinicalContactShortVo voClinicalContact = voSportsActivitySessionShort.getClinicalContact();
            if(voCurrentClinicalContact != null && voClinicalContact.getID_ClinicalContact().equals(voCurrentClinicalContact.getID_ClinicalContact()))
            {
                currentClinicalContactFound = true;
                form.recbrSports().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime()+" - "+ voClinicalContact.getSeenBy(), Color.Green);
                form.recbrSports().setValue(voClinicalContact);
            }
            else
            {
                form.recbrSports().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime()+" - "+ voClinicalContact.getSeenBy());
            }
        }
    }

    if(!currentClinicalContactFound && voCurrentClinicalContact != null)
        loadCurrentClinicalContact();

    browseRecord();
}
项目:openMAXIMS    文件:SportsActivitiesImpl.java   
public SportsActivitySessionShortVoCollection listSportsActivityByCareContext(CareContextRefVo voCareContextRef)
{

    DomainFactory factory = getDomainFactory();

    String query = " from SportsActivitySession sas ";
    StringBuffer hql = new StringBuffer();
    String andStr = " ";

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


    if(voCareContextRef != null)
    {
        hql.append(andStr + " sas.clinicalContact.careContext.id = :cc");
        markers.add("cc");
        values.add(voCareContextRef.getID_CareContext());
        andStr = " and ";
    }

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

    java.util.List sasList = factory.find(query,markers,values);
    SportsActivitySessionShortVoCollection voSportsActivitySessionColl = SportsActivitySessionShortVoAssembler.createSportsActivitySessionShortVoCollectionFromSportsActivitySession(sasList);

    //if(voSportsActivitySessionColl != null && voSportsActivitySessionColl.size()>0)
        return voSportsActivitySessionColl;
    //else
    //  return null;
}
项目:openMAXIMS    文件:Logic.java   
private void fillRecordBrowser()
{
    SportsActivitySessionShortVoCollection voSportsActivityShortColl = domain.listSportsActivityByCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    boolean currentClinicalContactFound = false;
    loadCurrentCareContext();

    if(voSportsActivityShortColl != null)
    {
        for(int i=0; i<voSportsActivityShortColl.size(); i++)
        {
            SportsActivitySessionShortVo voSportsActivitySessionShort = voSportsActivityShortColl.get(i);
            ClinicalContactShortVo voClinicalContact = voSportsActivitySessionShort.getClinicalContact();
            if(voCurrentClinicalContact != null && voClinicalContact.getID_ClinicalContact().equals(voCurrentClinicalContact.getID_ClinicalContact()))
            {
                currentClinicalContactFound = true;
                form.recbrSports().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime()+" - "+ voClinicalContact.getSeenBy(), Color.Green);
                form.recbrSports().setValue(voClinicalContact);
            }
            else
            {
                form.recbrSports().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime()+" - "+ voClinicalContact.getSeenBy());
            }
        }
    }

    if(!currentClinicalContactFound && voCurrentClinicalContact != null)
        loadCurrentClinicalContact();

    browseRecord();
}
项目:openMAXIMS    文件:SportsActivitiesImpl.java   
public SportsActivitySessionShortVoCollection listSportsActivityByCareContext(CareContextRefVo voCareContextRef)
{

    DomainFactory factory = getDomainFactory();

    String query = " from SportsActivitySession sas ";
    StringBuffer hql = new StringBuffer();
    String andStr = " ";

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


    if(voCareContextRef != null)
    {
        hql.append(andStr + " sas.clinicalContact.careContext.id = :cc");
        markers.add("cc");
        values.add(voCareContextRef.getID_CareContext());
        andStr = " and ";
    }

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

    java.util.List sasList = factory.find(query,markers,values);
    SportsActivitySessionShortVoCollection voSportsActivitySessionColl = SportsActivitySessionShortVoAssembler.createSportsActivitySessionShortVoCollectionFromSportsActivitySession(sasList);

    //if(voSportsActivitySessionColl != null && voSportsActivitySessionColl.size()>0)
        return voSportsActivitySessionColl;
    //else
    //  return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void fillRecordBrowser()
{
    SportsActivitySessionShortVoCollection voSportsActivityShortColl = domain.listSportsActivityByCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    boolean currentClinicalContactFound = false;
    loadCurrentCareContext();

    if(voSportsActivityShortColl != null)
    {
        for(int i=0; i<voSportsActivityShortColl.size(); i++)
        {
            SportsActivitySessionShortVo voSportsActivitySessionShort = voSportsActivityShortColl.get(i);
            ClinicalContactShortVo voClinicalContact = voSportsActivitySessionShort.getClinicalContact();
            if(voCurrentClinicalContact != null && voClinicalContact.getID_ClinicalContact().equals(voCurrentClinicalContact.getID_ClinicalContact()))
            {
                currentClinicalContactFound = true;
                form.recbrSports().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime()+" - "+ voClinicalContact.getSeenBy(), Color.Green);
                form.recbrSports().setValue(voClinicalContact);
            }
            else
            {
                form.recbrSports().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime()+" - "+ voClinicalContact.getSeenBy());
            }
        }
    }

    if(!currentClinicalContactFound && voCurrentClinicalContact != null)
        loadCurrentClinicalContact();

    browseRecord();
}
项目:openmaxims-linux    文件:SportsActivitiesImpl.java   
public SportsActivitySessionShortVoCollection listSportsActivityByCareContext(CareContextRefVo voCareContextRef)
{

    DomainFactory factory = getDomainFactory();

    String query = " from SportsActivitySession sas ";
    StringBuffer hql = new StringBuffer();
    String andStr = " ";

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


    if(voCareContextRef != null)
    {
        hql.append(andStr + " sas.clinicalContact.careContext.id = :cc");
        markers.add("cc");
        values.add(voCareContextRef.getID_CareContext());
        andStr = " and ";
    }

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

    java.util.List sasList = factory.find(query,markers,values);
    SportsActivitySessionShortVoCollection voSportsActivitySessionColl = SportsActivitySessionShortVoAssembler.createSportsActivitySessionShortVoCollectionFromSportsActivitySession(sasList);

    //if(voSportsActivitySessionColl != null && voSportsActivitySessionColl.size()>0)
        return voSportsActivitySessionColl;
    //else
    //  return null;
}