Java 类ims.core.vo.ServiceActivityVoCollection 实例源码

项目:AvoinApotti    文件:ProcedureListImpl.java   
public ServiceActivityVo checkForServiceActivityUsingChangedProcedure(ActivityRefVo activityRefVo)
{
    DomainFactory factory = getDomainFactory(); 

    if( activityRefVo == null )
        throw new DomainRuntimeException("checkForServiceActivityUsingChangedProcedure : activityRefVo is Null.");

    //wdev3999 - ignore inactive records in this check
    java.util.List servactList = factory.find("from ServiceActivity servact join servact.taxonomyMap tax where servact.activity.id = :activityid and tax.taxonomyName = :taxname and servact.isActive = :isActive", new String[]{"activityid", "taxname", "isActive"}, new Object[]{activityRefVo.getID_Activity(), getDomLookup(TaxonomyType.EXCH), Boolean.TRUE});
    ServiceActivityVoCollection coll = ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();

    if(coll != null && coll.size() > 0)
        return coll.get(0);

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private String formatActivityDetail(ServiceActivityVoCollection voColl)
{
    String out = "";

    if (voColl != null && voColl.size() > 0)
    {
        out += makeTextile("<CENTER>*" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(true) + "*</CENTER>", "SlateBlue", "tahoma", "14");
        for (int i = 0; i < voColl.size(); i++)
        {
            if ((voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue()) || (!form.chkActiveService().getValue() && voColl.get(i).getIsActiveIsNotNull() && !voColl.get(i).getIsActive().booleanValue()))
                out += makeTextileItem((voColl.get(i).getActivityIsNotNull() ? voColl.get(i).getActivity().toString() : "") + formatTaxonomy(voColl.get(i).getTaxonomyMap()), (voColl.get(i).getIsActiveIsNotNull() ? (voColl.get(i).getIsActive().booleanValue() ? "black" : "red") : "black"), "tahoma", "12");
        }
    }

    return out;
}
项目:AvoinApotti    文件:ServiceImpl.java   
public ServiceActivityVo getServiceActivity(ServiceRefVo serviceRefVo, ActivityRefVo activityRefVo)
    {
        DomainFactory factory = getDomainFactory();

        if ((serviceRefVo == null) || (activityRefVo == null))
            throw new DomainRuntimeException("getServiceActivity : Either serviceRefVo or activityRefVo are Null.");

//      java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid and servact.activity.id = :activityid", new String[]{"serviceid", "activityid"}, new Object[]{serviceRefVo.getID_Service(), activityRefVo.getID_Activity()});
        //entpf473 wdev-6344
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid and servact.activity.id = :activityid and servact.isActive = :isAct", new String[]{"serviceid", "activityid", "isAct"}, new Object[]{serviceRefVo.getID_Service(), activityRefVo.getID_Activity(), Boolean.TRUE});
        ServiceActivityVoCollection coll = ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();

        if (coll != null && coll.size() > 0)
            return coll.get(0);

        return null;
    }
项目:openMAXIMS    文件:ProcedureListImpl.java   
public ServiceActivityVo checkForServiceActivityUsingChangedProcedure(ActivityRefVo activityRefVo)
{
    DomainFactory factory = getDomainFactory(); 

    if( activityRefVo == null )
        throw new DomainRuntimeException("checkForServiceActivityUsingChangedProcedure : activityRefVo is Null.");

    //wdev3999 - ignore inactive records in this check
    java.util.List servactList = factory.find("from ServiceActivity servact join servact.taxonomyMap tax where servact.activity.id = :activityid and tax.taxonomyName = :taxname and servact.isActive = :isActive", new String[]{"activityid", "taxname", "isActive"}, new Object[]{activityRefVo.getID_Activity(), getDomLookup(TaxonomyType.EXCH), Boolean.TRUE});
    ServiceActivityVoCollection coll = ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();

    if(coll != null && coll.size() > 0)
        return coll.get(0);

    return null;
}
项目:openMAXIMS    文件:ServiceImpl.java   
public ServiceActivityVo getServiceActivity(ServiceRefVo serviceRefVo, ActivityRefVo activityRefVo)
    {
        DomainFactory factory = getDomainFactory();

        if ((serviceRefVo == null) || (activityRefVo == null))
            throw new DomainRuntimeException("getServiceActivity : Either serviceRefVo or activityRefVo are Null.");

//      java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid and servact.activity.id = :activityid", new String[]{"serviceid", "activityid"}, new Object[]{serviceRefVo.getID_Service(), activityRefVo.getID_Activity()});
        //entpf473 wdev-6344
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid and servact.activity.id = :activityid and servact.isActive = :isAct", new String[]{"serviceid", "activityid", "isAct"}, new Object[]{serviceRefVo.getID_Service(), activityRefVo.getID_Activity(), Boolean.TRUE});
        ServiceActivityVoCollection coll = ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();

        if (coll != null && coll.size() > 0)
            return coll.get(0);

        return null;
    }
项目:openMAXIMS    文件:ProcedureListImpl.java   
public ServiceActivityVo checkForServiceActivityUsingChangedProcedure(ActivityRefVo activityRefVo)
{
    DomainFactory factory = getDomainFactory(); 

    if( activityRefVo == null )
        throw new DomainRuntimeException("checkForServiceActivityUsingChangedProcedure : activityRefVo is Null.");

    //wdev3999 - ignore inactive records in this check
    java.util.List servactList = factory.find("from ServiceActivity servact join servact.taxonomyMap tax where servact.activity.id = :activityid and tax.taxonomyName = :taxname and servact.isActive = :isActive", new String[]{"activityid", "taxname", "isActive"}, new Object[]{activityRefVo.getID_Activity(), getDomLookup(TaxonomyType.EXCH), Boolean.TRUE});
    ServiceActivityVoCollection coll = ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();

    if(coll != null && coll.size() > 0)
        return coll.get(0);

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private String formatActivityDetail(ServiceActivityVoCollection voColl)
{
    String out = "";

    if (voColl != null && voColl.size() > 0)
    {
        out += makeTextile("<CENTER>*" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(true) + "*</CENTER>", "SlateBlue", "tahoma", "14");
        for (int i = 0; i < voColl.size(); i++)
        {
            if ((voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue()) || (!form.chkActiveService().getValue() && voColl.get(i).getIsActiveIsNotNull() && !voColl.get(i).getIsActive().booleanValue()))
                out += makeTextileItem((voColl.get(i).getActivityIsNotNull() ? voColl.get(i).getActivity().toString() : "") + formatTaxonomy(voColl.get(i).getTaxonomyMap()), (voColl.get(i).getIsActiveIsNotNull() ? (voColl.get(i).getIsActive().booleanValue() ? "black" : "red") : "black"), "tahoma", "12");
        }
    }

    return out;
}
项目:openMAXIMS    文件:ServiceImpl.java   
public ServiceActivityVo getServiceActivity(ServiceRefVo serviceRefVo, ActivityRefVo activityRefVo)
    {
        DomainFactory factory = getDomainFactory();

        if ((serviceRefVo == null) || (activityRefVo == null))
            throw new DomainRuntimeException("getServiceActivity : Either serviceRefVo or activityRefVo are Null.");

//      java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid and servact.activity.id = :activityid", new String[]{"serviceid", "activityid"}, new Object[]{serviceRefVo.getID_Service(), activityRefVo.getID_Activity()});
        //entpf473 wdev-6344
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid and servact.activity.id = :activityid and servact.isActive = :isAct", new String[]{"serviceid", "activityid", "isAct"}, new Object[]{serviceRefVo.getID_Service(), activityRefVo.getID_Activity(), Boolean.TRUE});
        ServiceActivityVoCollection coll = ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();

        if (coll != null && coll.size() > 0)
            return coll.get(0);

        return null;
    }
项目:openmaxims-linux    文件:ProcedureListImpl.java   
public ServiceActivityVo checkForServiceActivityUsingChangedProcedure(ActivityRefVo activityRefVo)
{
    DomainFactory factory = getDomainFactory(); 

    if( activityRefVo == null )
        throw new DomainRuntimeException("checkForServiceActivityUsingChangedProcedure : activityRefVo is Null.");

    //wdev3999 - ignore inactive records in this check
    java.util.List servactList = factory.find("from ServiceActivity servact join servact.taxonomyMap tax where servact.activity.id = :activityid and tax.taxonomyName = :taxname and servact.isActive = :isActive", new String[]{"activityid", "taxname", "isActive"}, new Object[]{activityRefVo.getID_Activity(), getDomLookup(TaxonomyType.EXCH), Boolean.TRUE});
    ServiceActivityVoCollection coll = ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();

    if(coll != null && coll.size() > 0)
        return coll.get(0);

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private String formatActivityDetail(ServiceActivityVoCollection voColl)
{
    String out = "";

    if (voColl != null && voColl.size() > 0)
    {
        out += makeTextile("<CENTER>*" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(true) + "*</CENTER>", "SlateBlue", "tahoma", "14");
        for (int i = 0; i < voColl.size(); i++)
        {
            if ((voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue()) || (!form.chkActiveService().getValue() && voColl.get(i).getIsActiveIsNotNull() && !voColl.get(i).getIsActive().booleanValue()))
                out += makeTextileItem((voColl.get(i).getActivityIsNotNull() ? voColl.get(i).getActivity().toString() : "") + formatTaxonomy(voColl.get(i).getTaxonomyMap()), (voColl.get(i).getIsActiveIsNotNull() ? (voColl.get(i).getIsActive().booleanValue() ? "black" : "red") : "black"), "tahoma", "12");
        }
    }

    return out;
}
项目:openmaxims-linux    文件:ServiceImpl.java   
public ServiceActivityVo getServiceActivity(ServiceRefVo serviceRefVo, ActivityRefVo activityRefVo)
    {
        DomainFactory factory = getDomainFactory();

        if ((serviceRefVo == null) || (activityRefVo == null))
            throw new DomainRuntimeException("getServiceActivity : Either serviceRefVo or activityRefVo are Null.");

//      java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid and servact.activity.id = :activityid", new String[]{"serviceid", "activityid"}, new Object[]{serviceRefVo.getID_Service(), activityRefVo.getID_Activity()});
        //entpf473 wdev-6344
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid and servact.activity.id = :activityid and servact.isActive = :isAct", new String[]{"serviceid", "activityid", "isAct"}, new Object[]{serviceRefVo.getID_Service(), activityRefVo.getID_Activity(), Boolean.TRUE});
        ServiceActivityVoCollection coll = ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();

        if (coll != null && coll.size() > 0)
            return coll.get(0);

        return null;
    }
项目:AvoinApotti    文件:Logic.java   
private boolean wasInactive(ActivityVo value, ServiceActivityVoCollection voCollActivity)
{
    if (voCollActivity != null && voCollActivity.size() > 0)
    {
        for (int i = 0; i < voCollActivity.size(); i++)
        {
            if (voCollActivity.get(i).getActivityIsNotNull() && voCollActivity.get(i).getActivity().equals(value) && voCollActivity.get(i).getIsActiveIsNotNull() && voCollActivity.get(i).getIsActive() == false)
                return true;
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean hadAnExchequer(ActivityVo value, ServiceActivityVoCollection voCollActivity)
{
    if (voCollActivity != null && voCollActivity.size() > 0)
    {
        for (int i = 0; i < voCollActivity.size(); i++)
        {
            if (voCollActivity.get(i).getActivityIsNotNull() && voCollActivity.get(i).getActivity().equals(value))
            {
                if (voCollActivity.get(i).getTaxonomyMapIsNotNull())
                {
                    for (int j = 0; j < voCollActivity.get(i).getTaxonomyMap().size(); j++)
                    {
                        if (voCollActivity.get(i).getTaxonomyMap().get(j).getTaxonomyNameIsNotNull() && voCollActivity.get(i).getTaxonomyMap().get(j).getTaxonomyName().equals(TaxonomyType.EXCH))
                        {
                            for (int k = 0; k < form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().size(); k++)
                            {
                                TaxonomyMap mp = form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().get(k).getValue();
                                if (mp != null && mp.getTaxonomyName() != null && mp.getTaxonomyName().equals(TaxonomyType.EXCH))
                                    return false;
                            }
                            return true;
                        }
                    }
                }
            }
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private ServiceActivityVo inActivityList(ActivityVo value, ServiceActivityVoCollection voVollActivity)
{
    if (voVollActivity != null && voVollActivity.size() > 0)
    {
        for (int i = 0; i < voVollActivity.size(); i++)
        {
            if (voVollActivity.get(i).getActivityIsNotNull() && voVollActivity.get(i).getActivity().equals(value))
                return voVollActivity.get(i);
        }
    }
    return null;
}
项目:AvoinApotti    文件:LocationServiceImpl.java   
public ServiceActivityVoCollection listServiceActivity(Integer voServiceId)
{
    DomainFactory factory = getDomainFactory();

    if (voServiceId != null)
    {
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voServiceId}, 1000);
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();
    }

    return null;
}
项目:AvoinApotti    文件:ServiceImpl.java   
public ServiceActivityVoCollection listServiceActivity(ServiceShortVo voService)
{
    DomainFactory factory = getDomainFactory();

    if (voService == null)
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(factory.listDomainObjects(ServiceActivity.class)).sort();

    if (voService.getID_ServiceIsNotNull())
    {
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voService.getID_Service()}, 1000);
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();
    }

    return null;
}
项目:openMAXIMS    文件:LocationServiceImpl.java   
public ServiceActivityVoCollection listServiceActivity(Integer voServiceId)
{
    DomainFactory factory = getDomainFactory();

    if (voServiceId != null)
    {
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voServiceId}, 1000);
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();
    }

    return null;
}
项目:openMAXIMS    文件:ServiceImpl.java   
public ServiceActivityVoCollection listServiceActivity(ServiceShortVo voService)
{
    DomainFactory factory = getDomainFactory();

    if (voService == null)
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(factory.listDomainObjects(ServiceActivity.class)).sort();

    if (voService.getID_ServiceIsNotNull())
    {
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voService.getID_Service()}, 1000);
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private boolean wasInactive(ActivityVo value, ServiceActivityVoCollection voCollActivity)
{
    if (voCollActivity != null && voCollActivity.size() > 0)
    {
        for (int i = 0; i < voCollActivity.size(); i++)
        {
            if (voCollActivity.get(i).getActivityIsNotNull() && voCollActivity.get(i).getActivity().equals(value) && voCollActivity.get(i).getIsActiveIsNotNull() && voCollActivity.get(i).getIsActive() == false)
                return true;
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean hadAnExchequer(ActivityVo value, ServiceActivityVoCollection voCollActivity)
{
    if (voCollActivity != null && voCollActivity.size() > 0)
    {
        for (int i = 0; i < voCollActivity.size(); i++)
        {
            if (voCollActivity.get(i).getActivityIsNotNull() && voCollActivity.get(i).getActivity().equals(value))
            {
                if (voCollActivity.get(i).getTaxonomyMapIsNotNull())
                {
                    for (int j = 0; j < voCollActivity.get(i).getTaxonomyMap().size(); j++)
                    {
                        if (voCollActivity.get(i).getTaxonomyMap().get(j).getTaxonomyNameIsNotNull() && voCollActivity.get(i).getTaxonomyMap().get(j).getTaxonomyName().equals(TaxonomyType.EXCH))
                        {
                            for (int k = 0; k < form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().size(); k++)
                            {
                                TaxonomyMap mp = form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().get(k).getValue();
                                if (mp != null && mp.getTaxonomyName() != null && mp.getTaxonomyName().equals(TaxonomyType.EXCH))
                                    return false;
                            }
                            return true;
                        }
                    }
                }
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private ServiceActivityVo inActivityList(ActivityVo value, ServiceActivityVoCollection voVollActivity)
{
    if (voVollActivity != null && voVollActivity.size() > 0)
    {
        for (int i = 0; i < voVollActivity.size(); i++)
        {
            if (voVollActivity.get(i).getActivityIsNotNull() && voVollActivity.get(i).getActivity().equals(value))
                return voVollActivity.get(i);
        }
    }
    return null;
}
项目:openMAXIMS    文件:LocationServiceImpl.java   
public ServiceActivityVoCollection listServiceActivity(Integer voServiceId)
{
    DomainFactory factory = getDomainFactory();

    if (voServiceId != null)
    {
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voServiceId}, 1000);
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();
    }

    return null;
}
项目:openMAXIMS    文件:ServiceImpl.java   
public ServiceActivityVoCollection listServiceActivity(ServiceShortVo voService)
{
    DomainFactory factory = getDomainFactory();

    if (voService == null)
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(factory.listDomainObjects(ServiceActivity.class)).sort();

    if (voService.getID_ServiceIsNotNull())
    {
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voService.getID_Service()}, 1000);
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();
    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean wasInactive(ActivityVo value, ServiceActivityVoCollection voCollActivity)
{
    if (voCollActivity != null && voCollActivity.size() > 0)
    {
        for (int i = 0; i < voCollActivity.size(); i++)
        {
            if (voCollActivity.get(i).getActivityIsNotNull() && voCollActivity.get(i).getActivity().equals(value) && voCollActivity.get(i).getIsActiveIsNotNull() && voCollActivity.get(i).getIsActive() == false)
                return true;
        }
    }
    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean hadAnExchequer(ActivityVo value, ServiceActivityVoCollection voCollActivity)
{
    if (voCollActivity != null && voCollActivity.size() > 0)
    {
        for (int i = 0; i < voCollActivity.size(); i++)
        {
            if (voCollActivity.get(i).getActivityIsNotNull() && voCollActivity.get(i).getActivity().equals(value))
            {
                if (voCollActivity.get(i).getTaxonomyMapIsNotNull())
                {
                    for (int j = 0; j < voCollActivity.get(i).getTaxonomyMap().size(); j++)
                    {
                        if (voCollActivity.get(i).getTaxonomyMap().get(j).getTaxonomyNameIsNotNull() && voCollActivity.get(i).getTaxonomyMap().get(j).getTaxonomyName().equals(TaxonomyType.EXCH))
                        {
                            for (int k = 0; k < form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().size(); k++)
                            {
                                TaxonomyMap mp = form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().get(k).getValue();
                                if (mp != null && mp.getTaxonomyName() != null && mp.getTaxonomyName().equals(TaxonomyType.EXCH))
                                    return false;
                            }
                            return true;
                        }
                    }
                }
            }
        }
    }
    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private ServiceActivityVo inActivityList(ActivityVo value, ServiceActivityVoCollection voVollActivity)
{
    if (voVollActivity != null && voVollActivity.size() > 0)
    {
        for (int i = 0; i < voVollActivity.size(); i++)
        {
            if (voVollActivity.get(i).getActivityIsNotNull() && voVollActivity.get(i).getActivity().equals(value))
                return voVollActivity.get(i);
        }
    }
    return null;
}
项目:openmaxims-linux    文件:LocationServiceImpl.java   
public ServiceActivityVoCollection listServiceActivity(Integer voServiceId)
{
    DomainFactory factory = getDomainFactory();

    if (voServiceId != null)
    {
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voServiceId}, 1000);
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();
    }

    return null;
}
项目:openmaxims-linux    文件:ServiceImpl.java   
public ServiceActivityVoCollection listServiceActivity(ServiceShortVo voService)
{
    DomainFactory factory = getDomainFactory();

    if (voService == null)
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(factory.listDomainObjects(ServiceActivity.class)).sort();

    if (voService.getID_ServiceIsNotNull())
    {
        java.util.List servactList = factory.find("from  ServiceActivity servact where servact.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voService.getID_Service()}, 1000);
        return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(servactList).sort();
    }

    return null;
}
项目:AvoinApotti    文件:ProcedureListImpl.java   
public ServiceActivityVoCollection listProcedureinServiceActivity(ActivityVo activityVo)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from ServiceActivity serActivity "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

    if(activityVo != null)
    {   
        if(activityVo.getIsActiveIsNotNull())
        {
            condStr.append(andStr + " serActivity.isActive = :isActive"); 
            markers.add("isActive");
            values.add(activityVo.getIsActive());
            andStr = " and ";
        }
        if(activityVo.getNameIsNotNull() && !activityVo.getID_ActivityIsNotNull())
        {
            condStr.append(andStr + " upper(serActivity.activity.name) like :activityName"); 
            markers.add("activityName");
            values.add("%" + activityVo.getName().toUpperCase() + "%");
            andStr = " and ";
        }
        else if(activityVo.getID_ActivityIsNotNull())
        {
            condStr.append(andStr + "serActivity.activity.id = :activityId"); 
            markers.add("activityId");
            values.add(activityVo.getID_Activity());
            andStr = " and ";
        }
    }

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

    hql += condStr.toString();
    return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(factory.find(hql, markers, values)).sort();
}
项目:AvoinApotti    文件:ServiceImpl.java   
private String checkActiveLSALinksForInactiveSA(ims.core.vo.ServiceActivityVoCollection voCollServiceActivity) throws DomainInterfaceException
{
    // for all inactive records, check that there are no active
    // LocationServiceActivity links
    for (int i = 0; i < voCollServiceActivity.size(); i++)
    {
        if (!voCollServiceActivity.get(i).getIsActive().booleanValue())
        {
            // check if an active Location Service Activity records
            LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
            LocationServiceActivityVo voLocSerAct = new LocationServiceActivityVo();
            voLocSerAct.setServiceActivity(voCollServiceActivity.get(i));
            voLocSerAct.setIsActive(new Boolean(true));
            LocationServiceVo voLocSer = new LocationServiceVo();
            ServiceVo voService = new ServiceVo();
            voService.setID_Service(voCollServiceActivity.get(i).getService().getID_Service());
            voService.setIsActive(voCollServiceActivity.get(i).getService().getIsActive());
            voLocSer.setService(voService);
            voLocSerAct.setLocationService(voLocSer);
            LocationServiceActivityVoCollection voColl = impl.listLocationServiceActivity(voLocSerAct.getLocationService(), voLocSerAct.getServiceActivity().getActivity());

            if (voColl != null && voColl.size() > 0 && voLocSerAct.getIsActiveIsNotNull())
            {
                String text = "The following " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " links are still used and active.\r\n";
                String activeMessage = null;

                for (int j = 0; j < voColl.size(); j++)
                {
                    if (voColl.get(j).getIsActiveIsNotNull() && voColl.get(j).getIsActive().booleanValue())
                    {
                        activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + " : " + (voColl.get(j).getLocationService().getLocation().getNameIsNotNull() ? voColl.get(j).getLocationService().getLocation().getName() : "");
                        activeMessage += "  " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + (voColl.get(j).getLocationService().getService().getServiceNameIsNotNull() ? voColl.get(j).getLocationService().getService().getServiceName() : "");
                        for (int k = 0; k < voColl.get(j).getLocationService().getActivities().size(); k++)
                        {
                            if (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivityIsNotNull() && voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().equals(voCollServiceActivity.get(i)) && voColl.get(j).getLocationService().getActivities().get(k).getLocationService().getActivities().get(k).getIsActive().booleanValue() && !voCollServiceActivity.get(i).getIsActive().booleanValue())
                            {
                                activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " : " + (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getNameIsNotNull() ? voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getName() : "");
                            }
                        }
                    }

                }
                if (activeMessage != null)
                    return text + activeMessage.replace("null", "");
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:ProcedureListImpl.java   
public ServiceActivityVoCollection listProcedureinServiceActivity(ActivityVo activityVo)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from ServiceActivity serActivity "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

    if(activityVo != null)
    {   
        if(activityVo.getIsActiveIsNotNull())
        {
            condStr.append(andStr + " serActivity.isActive = :isActive"); 
            markers.add("isActive");
            values.add(activityVo.getIsActive());
            andStr = " and ";
        }
        if(activityVo.getNameIsNotNull() && !activityVo.getID_ActivityIsNotNull())
        {
            condStr.append(andStr + " upper(serActivity.activity.name) like :activityName"); 
            markers.add("activityName");
            values.add("%" + activityVo.getName().toUpperCase() + "%");
            andStr = " and ";
        }
        else if(activityVo.getID_ActivityIsNotNull())
        {
            condStr.append(andStr + "serActivity.activity.id = :activityId"); 
            markers.add("activityId");
            values.add(activityVo.getID_Activity());
            andStr = " and ";
        }
    }

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

    hql += condStr.toString();
    return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(factory.find(hql, markers, values)).sort();
}
项目:openMAXIMS    文件:ServiceImpl.java   
private String checkActiveLSALinksForInactiveSA(ims.core.vo.ServiceActivityVoCollection voCollServiceActivity) throws DomainInterfaceException
{
    // for all inactive records, check that there are no active
    // LocationServiceActivity links
    for (int i = 0; i < voCollServiceActivity.size(); i++)
    {
        if (!voCollServiceActivity.get(i).getIsActive().booleanValue())
        {
            // check if an active Location Service Activity records
            LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
            LocationServiceActivityVo voLocSerAct = new LocationServiceActivityVo();
            voLocSerAct.setServiceActivity(voCollServiceActivity.get(i));
            voLocSerAct.setIsActive(new Boolean(true));
            LocationServiceVo voLocSer = new LocationServiceVo();
            ServiceVo voService = new ServiceVo();
            voService.setID_Service(voCollServiceActivity.get(i).getService().getID_Service());
            voService.setIsActive(voCollServiceActivity.get(i).getService().getIsActive());
            voLocSer.setService(voService);
            voLocSerAct.setLocationService(voLocSer);
            LocationServiceActivityVoCollection voColl = impl.listLocationServiceActivity(voLocSerAct.getLocationService(), voLocSerAct.getServiceActivity().getActivity());

            if (voColl != null && voColl.size() > 0 && voLocSerAct.getIsActiveIsNotNull())
            {
                String text = "The following " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " links are still used and active.\r\n";
                String activeMessage = null;

                for (int j = 0; j < voColl.size(); j++)
                {
                    if (voColl.get(j).getIsActiveIsNotNull() && voColl.get(j).getIsActive().booleanValue())
                    {
                        activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + " : " + (voColl.get(j).getLocationService().getLocation().getNameIsNotNull() ? voColl.get(j).getLocationService().getLocation().getName() : "");
                        activeMessage += "  " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + (voColl.get(j).getLocationService().getService().getServiceNameIsNotNull() ? voColl.get(j).getLocationService().getService().getServiceName() : "");
                        for (int k = 0; k < voColl.get(j).getLocationService().getActivities().size(); k++)
                        {
                            if (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivityIsNotNull() && voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().equals(voCollServiceActivity.get(i)) && voColl.get(j).getLocationService().getActivities().get(k).getLocationService().getActivities().get(k).getIsActive().booleanValue() && !voCollServiceActivity.get(i).getIsActive().booleanValue())
                            {
                                activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " : " + (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getNameIsNotNull() ? voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getName() : "");
                            }
                        }
                    }

                }
                if (activeMessage != null)
                    return text + activeMessage.replace("null", "");
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:ProcedureListImpl.java   
public ServiceActivityVoCollection listProcedureinServiceActivity(ActivityVo activityVo)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from ServiceActivity serActivity "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

    if(activityVo != null)
    {   
        if(activityVo.getIsActiveIsNotNull())
        {
            condStr.append(andStr + " serActivity.isActive = :isActive"); 
            markers.add("isActive");
            values.add(activityVo.getIsActive());
            andStr = " and ";
        }
        if(activityVo.getNameIsNotNull() && !activityVo.getID_ActivityIsNotNull())
        {
            condStr.append(andStr + " upper(serActivity.activity.name) like :activityName"); 
            markers.add("activityName");
            values.add("%" + activityVo.getName().toUpperCase() + "%");
            andStr = " and ";
        }
        else if(activityVo.getID_ActivityIsNotNull())
        {
            condStr.append(andStr + "serActivity.activity.id = :activityId"); 
            markers.add("activityId");
            values.add(activityVo.getID_Activity());
            andStr = " and ";
        }
    }

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

    hql += condStr.toString();
    return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(factory.find(hql, markers, values)).sort();
}
项目:openMAXIMS    文件:ServiceImpl.java   
private String checkActiveLSALinksForInactiveSA(ims.core.vo.ServiceActivityVoCollection voCollServiceActivity) throws DomainInterfaceException
{
    // for all inactive records, check that there are no active
    // LocationServiceActivity links
    for (int i = 0; i < voCollServiceActivity.size(); i++)
    {
        if (!voCollServiceActivity.get(i).getIsActive().booleanValue())
        {
            // check if an active Location Service Activity records
            LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
            LocationServiceActivityVo voLocSerAct = new LocationServiceActivityVo();
            voLocSerAct.setServiceActivity(voCollServiceActivity.get(i));
            voLocSerAct.setIsActive(new Boolean(true));
            LocationServiceVo voLocSer = new LocationServiceVo();
            ServiceVo voService = new ServiceVo();
            voService.setID_Service(voCollServiceActivity.get(i).getService().getID_Service());
            voService.setIsActive(voCollServiceActivity.get(i).getService().getIsActive());
            voLocSer.setService(voService);
            voLocSerAct.setLocationService(voLocSer);
            LocationServiceActivityVoCollection voColl = impl.listLocationServiceActivity(voLocSerAct.getLocationService(), voLocSerAct.getServiceActivity().getActivity());

            if (voColl != null && voColl.size() > 0 && voLocSerAct.getIsActiveIsNotNull())
            {
                String text = "The following " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " links are still used and active.\r\n";
                String activeMessage = null;

                for (int j = 0; j < voColl.size(); j++)
                {
                    if (voColl.get(j).getIsActiveIsNotNull() && voColl.get(j).getIsActive().booleanValue())
                    {
                        activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + " : " + (voColl.get(j).getLocationService().getLocation().getNameIsNotNull() ? voColl.get(j).getLocationService().getLocation().getName() : "");
                        activeMessage += "  " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + (voColl.get(j).getLocationService().getService().getServiceNameIsNotNull() ? voColl.get(j).getLocationService().getService().getServiceName() : "");
                        for (int k = 0; k < voColl.get(j).getLocationService().getActivities().size(); k++)
                        {
                            if (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivityIsNotNull() && voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().equals(voCollServiceActivity.get(i)) && voColl.get(j).getLocationService().getActivities().get(k).getLocationService().getActivities().get(k).getIsActive().booleanValue() && !voCollServiceActivity.get(i).getIsActive().booleanValue())
                            {
                                activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " : " + (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getNameIsNotNull() ? voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getName() : "");
                            }
                        }
                    }

                }
                if (activeMessage != null)
                    return text + activeMessage.replace("null", "");
            }
        }
    }
    return null;
}
项目:openmaxims-linux    文件:ProcedureListImpl.java   
public ServiceActivityVoCollection listProcedureinServiceActivity(ActivityVo activityVo)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from ServiceActivity serActivity "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

    if(activityVo != null)
    {   
        if(activityVo.getIsActiveIsNotNull())
        {
            condStr.append(andStr + " serActivity.isActive = :isActive"); 
            markers.add("isActive");
            values.add(activityVo.getIsActive());
            andStr = " and ";
        }
        if(activityVo.getNameIsNotNull() && !activityVo.getID_ActivityIsNotNull())
        {
            condStr.append(andStr + " upper(serActivity.activity.name) like :activityName"); 
            markers.add("activityName");
            values.add("%" + activityVo.getName().toUpperCase() + "%");
            andStr = " and ";
        }
        else if(activityVo.getID_ActivityIsNotNull())
        {
            condStr.append(andStr + "serActivity.activity.id = :activityId"); 
            markers.add("activityId");
            values.add(activityVo.getID_Activity());
            andStr = " and ";
        }
    }

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

    hql += condStr.toString();
    return ServiceActivityVoAssembler.createServiceActivityVoCollectionFromServiceActivity(factory.find(hql, markers, values)).sort();
}
项目:openmaxims-linux    文件:ServiceImpl.java   
private String checkActiveLSALinksForInactiveSA(ims.core.vo.ServiceActivityVoCollection voCollServiceActivity) throws DomainInterfaceException
{
    // for all inactive records, check that there are no active
    // LocationServiceActivity links
    for (int i = 0; i < voCollServiceActivity.size(); i++)
    {
        if (!voCollServiceActivity.get(i).getIsActive().booleanValue())
        {
            // check if an active Location Service Activity records
            LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
            LocationServiceActivityVo voLocSerAct = new LocationServiceActivityVo();
            voLocSerAct.setServiceActivity(voCollServiceActivity.get(i));
            voLocSerAct.setIsActive(new Boolean(true));
            LocationServiceVo voLocSer = new LocationServiceVo();
            ServiceVo voService = new ServiceVo();
            voService.setID_Service(voCollServiceActivity.get(i).getService().getID_Service());
            voService.setIsActive(voCollServiceActivity.get(i).getService().getIsActive());
            voLocSer.setService(voService);
            voLocSerAct.setLocationService(voLocSer);
            LocationServiceActivityVoCollection voColl = impl.listLocationServiceActivity(voLocSerAct.getLocationService(), voLocSerAct.getServiceActivity().getActivity());

            if (voColl != null && voColl.size() > 0 && voLocSerAct.getIsActiveIsNotNull())
            {
                String text = "The following " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " links are still used and active.\r\n";
                String activeMessage = null;

                for (int j = 0; j < voColl.size(); j++)
                {
                    if (voColl.get(j).getIsActiveIsNotNull() && voColl.get(j).getIsActive().booleanValue())
                    {
                        activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + " : " + (voColl.get(j).getLocationService().getLocation().getNameIsNotNull() ? voColl.get(j).getLocationService().getLocation().getName() : "");
                        activeMessage += "  " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + (voColl.get(j).getLocationService().getService().getServiceNameIsNotNull() ? voColl.get(j).getLocationService().getService().getServiceName() : "");
                        for (int k = 0; k < voColl.get(j).getLocationService().getActivities().size(); k++)
                        {
                            if (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivityIsNotNull() && voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().equals(voCollServiceActivity.get(i)) && voColl.get(j).getLocationService().getActivities().get(k).getLocationService().getActivities().get(k).getIsActive().booleanValue() && !voCollServiceActivity.get(i).getIsActive().booleanValue())
                            {
                                activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " : " + (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getNameIsNotNull() ? voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getName() : "");
                            }
                        }
                    }

                }
                if (activeMessage != null)
                    return text + activeMessage.replace("null", "");
            }
        }
    }
    return null;
}