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

项目:openMAXIMS    文件:ProfilesImpl.java   
public ActivityLiteVoCollection listActivityByService(ServiceRefVo serviceRef, Boolean isFlexible)
{

    if( serviceRef == null )
        return null;

    DomainFactory factory = getDomainFactory();
    String hql = null;
    if( Boolean.TRUE.equals(isFlexible))
    {
        hql = "select s1_1.activity from ServiceActivity as s1_1 left join s1_1.service as s2_1 left join s1_1.activity as a1_1 where (s1_1.isActive = 1 and s2_1.id = :serviceId  and s1_1.isFlexible = 1 and a1_1.isActive = 1)";   //wdev-20262
    }
    else
    {
        hql = "select s1_1.activity from ServiceActivity as s1_1 left join s1_1.service as s2_1 left join s1_1.activity as a1_1 where (s1_1.isActive = 1 and s2_1.id = :serviceId  and s1_1.isFlexible = 0 and a1_1.isActive = 1)";     //wdev-20262
    }
    List lst = factory.find(hql, new String[]{"serviceId"}, new Object[]{new Integer(serviceRef.getID_Service())});

    return (ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(lst));
}
项目:openMAXIMS    文件:ServiceConfigurationImpl.java   
public ActivityLiteVoCollection listActivities(String searchText)
{
    DomainFactory factory = getDomainFactory();
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    String hql = "select act from Activity as act left join act.activityType as actType where actType.id = :AppointmentType and act.isActive = 1 ";
    markers.add("AppointmentType");
    values.add(ActivityType.APPOINTMENTTYPES.getID());

    if(searchText != null)
    {
        hql += " and UPPER(act.name) like :ActivityName ";
        markers.add("ActivityName");
        values.add(searchText.toUpperCase() + "%");
    }

    hql += " order by UPPER(act.name) asc";

    List<?> list = factory.find(hql, markers, values);

    return ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(list);
}
项目:AvoinApotti    文件:ProfilesImpl.java   
public ActivityLiteVoCollection listActivity()
{
    DomainFactory factory = getDomainFactory();
    String hql = "from Activity act";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";
    StringBuffer condStr = new StringBuffer();

    condStr.append(andStr + " act.isActive = :active");
    markers.add("active");
    values.add(Boolean.TRUE);   
    andStr = " and ";

    condStr.append(andStr + " act.activityType != :investigation");
    markers.add("investigation");
    values.add(getDomLookup(ActivityType.INVESTIGATION));   
    andStr = " and ";

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

    hql += condStr.toString();  
    List activities =  factory.find(hql, markers, values);
    return ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(activities);
}
项目:openMAXIMS    文件:ProfilesImpl.java   
public ActivityLiteVoCollection listActivity()
{
    DomainFactory factory = getDomainFactory();
    String hql = "from Activity act";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";
    StringBuffer condStr = new StringBuffer();

    condStr.append(andStr + " act.isActive = :active");
    markers.add("active");
    values.add(Boolean.TRUE);   
    andStr = " and ";

    condStr.append(andStr + " act.activityType != :investigation");
    markers.add("investigation");
    values.add(getDomLookup(ActivityType.INVESTIGATION));   
    andStr = " and ";

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

    hql += condStr.toString();  
    List activities =  factory.find(hql, markers, values);
    return ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(activities);
}
项目:openMAXIMS    文件:ProfilesImpl.java   
public ActivityLiteVoCollection listActivity()
{
    DomainFactory factory = getDomainFactory();
    String hql = "from Activity act";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";
    StringBuffer condStr = new StringBuffer();

    condStr.append(andStr + " act.isActive = :active");
    markers.add("active");
    values.add(Boolean.TRUE);   
    andStr = " and ";

    condStr.append(andStr + " act.activityType != :investigation");
    markers.add("investigation");
    values.add(getDomLookup(ActivityType.INVESTIGATION));   
    andStr = " and ";

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

    hql += condStr.toString();  
    List activities =  factory.find(hql, markers, values);
    return ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(activities);
}
项目:openmaxims-linux    文件:ProfilesImpl.java   
public ActivityLiteVoCollection listActivity()
{
    DomainFactory factory = getDomainFactory();
    String hql = "from Activity act";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";
    StringBuffer condStr = new StringBuffer();

    condStr.append(andStr + " act.isActive = :active");
    markers.add("active");
    values.add(Boolean.TRUE);   
    andStr = " and ";

    condStr.append(andStr + " act.activityType != :investigation");
    markers.add("investigation");
    values.add(getDomLookup(ActivityType.INVESTIGATION));   
    andStr = " and ";

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

    hql += condStr.toString();  
    List activities =  factory.find(hql, markers, values);
    return ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(activities);
}
项目:AvoinApotti    文件:LinkActivitiesToPathwayEventsImpl.java   
public ActivityLiteVoCollection listActivities()
{
    ActivityLiteVoCollection activities = new ActivityLiteVoCollection(); 

    DomainFactory factory = getDomainFactory();

    List activityList = factory.find("from Activity");

    activities = ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(activityList);

    return activities;

}
项目:openMAXIMS    文件:LinkActivitiesToPathwayEventsImpl.java   
public ActivityLiteVoCollection listActivities()
{
    ActivityLiteVoCollection activities = new ActivityLiteVoCollection(); 

    DomainFactory factory = getDomainFactory();

    List activityList = factory.find("from Activity");

    activities = ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(activityList);

    return activities;

}
项目:openMAXIMS    文件:LinkActivitiesToPathwayEventsImpl.java   
public ActivityLiteVoCollection listActivities()
{
    ActivityLiteVoCollection activities = new ActivityLiteVoCollection(); 

    DomainFactory factory = getDomainFactory();

    List activityList = factory.find("from Activity");

    activities = ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(activityList);

    return activities;

}
项目:openmaxims-linux    文件:LinkActivitiesToPathwayEventsImpl.java   
public ActivityLiteVoCollection listActivities()
{
    ActivityLiteVoCollection activities = new ActivityLiteVoCollection(); 

    DomainFactory factory = getDomainFactory();

    List activityList = factory.find("from Activity");

    activities = ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(activityList);

    return activities;

}