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

项目:AvoinApotti    文件:Logic.java   
private void cmbServiceValueChanged()
{
    form.lyrSupportServices().tabPageServices().cmbLocationServices().clear();
    clearServicesReadOnlyDetails();

    if (form.lyrSupportServices().tabPageServices().cmbService().getValue() == null)
        return;

    LocationServiceVoCollection voColl = domain.listLocationServices(form.lyrSupportServices().tabPageServices().cmbService().getValue());
    if (voColl == null)
        return;

    for (int i = 0; i < voColl.size(); i++)
    {
        if (voColl.get(i) != null
            && voColl.get(i).getLocationIsNotNull())
            form.lyrSupportServices().tabPageServices().cmbLocationServices().newRow(voColl.get(i), voColl.get(i).getLocation().getName());
    }
}
项目:AvoinApotti    文件:LocationServiceImpl.java   
/**
 * expects parameters returns null if the parameters are not set
 */
public LocationServiceVoCollection listServicesForLocation(LocationRefVo location, ServiceVo service)
{
    DomainFactory factory = getDomainFactory();

    if (location == null || service == null)
        return null;

    if (location.getID_LocationIsNotNull() && service.getID_ServiceIsNotNull())
    {
        java.util.List servactList = factory.find("from  LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{location.getID_Location(), service.getID_Service()});
        return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(servactList).sort();
    }

    return null;
}
项目:AvoinApotti    文件:ServiceImpl.java   
private String activeLocationServiceLinks(ims.core.vo.ServiceVo voService)
{
    LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
    LocationServiceVo voLocSer = new LocationServiceVo();
    voLocSer.setService(voService);
    voLocSer.setIsActive(new Boolean(true));
    LocationServiceVoCollection voColl = impl.listLocationService(voLocSer);
    if (voColl != null && voColl.size() > 0)
    {

        String activeMessage = "These " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(true) + " contain active records for the " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + voService.getServiceName();
        for (int i = 0; i < voColl.size(); i++)
        {
            activeMessage += "\r\n" + voColl.get(i).getLocation().getName();
        }

        return activeMessage;
    }
    else
        return null;
}
项目:openMAXIMS    文件:Logic.java   
private void cmbServiceValueChanged()
{
    form.lyrSupportServices().tabPageServices().cmbLocationServices().clear();
    clearServicesReadOnlyDetails();

    if (form.lyrSupportServices().tabPageServices().cmbService().getValue() == null)
        return;

    LocationServiceVoCollection voColl = domain.listLocationServices(form.lyrSupportServices().tabPageServices().cmbService().getValue());
    if (voColl == null)
        return;

    for (int i = 0; i < voColl.size(); i++)
    {
        if (voColl.get(i) != null
            && voColl.get(i).getLocationIsNotNull())
            form.lyrSupportServices().tabPageServices().cmbLocationServices().newRow(voColl.get(i), voColl.get(i).getLocation().getName());
    }
}
项目:openMAXIMS    文件:LocationServiceImpl.java   
/**
 * expects parameters returns null if the parameters are not set
 */
public LocationServiceVoCollection listServicesForLocation(LocationRefVo location, ServiceVo service)
{
    DomainFactory factory = getDomainFactory();

    if (location == null || service == null)
        return null;

    if (location.getID_LocationIsNotNull() && service.getID_ServiceIsNotNull())
    {
        java.util.List servactList = factory.find("from  LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{location.getID_Location(), service.getID_Service()});
        return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(servactList).sort();
    }

    return null;
}
项目:openMAXIMS    文件:ServiceImpl.java   
private String activeLocationServiceLinks(ims.core.vo.ServiceVo voService)
{
    LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
    LocationServiceVo voLocSer = new LocationServiceVo();
    voLocSer.setService(voService);
    voLocSer.setIsActive(new Boolean(true));
    LocationServiceVoCollection voColl = impl.listLocationService(voLocSer);
    if (voColl != null && voColl.size() > 0)
    {

        String activeMessage = "These " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(true) + " contain active records for the " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + voService.getServiceName();
        for (int i = 0; i < voColl.size(); i++)
        {
            activeMessage += "\r\n" + voColl.get(i).getLocation().getName();
        }

        return activeMessage;
    }
    else
        return null;
}
项目:openMAXIMS    文件:Logic.java   
private void cmbServiceValueChanged()
{
    form.lyrSupportServices().tabPageServices().cmbLocationServices().clear();
    clearServicesReadOnlyDetails();

    if (form.lyrSupportServices().tabPageServices().cmbService().getValue() == null)
        return;

    LocationServiceVoCollection voColl = domain.listLocationServices(form.lyrSupportServices().tabPageServices().cmbService().getValue());
    if (voColl == null)
        return;

    for (int i = 0; i < voColl.size(); i++)
    {
        if (voColl.get(i) != null
            && voColl.get(i).getLocationIsNotNull())
            form.lyrSupportServices().tabPageServices().cmbLocationServices().newRow(voColl.get(i), voColl.get(i).getLocation().getName());
    }
}
项目:openMAXIMS    文件:LocationServiceImpl.java   
/**
 * expects parameters returns null if the parameters are not set
 */
public LocationServiceVoCollection listServicesForLocation(LocationRefVo location, ServiceVo service)
{
    DomainFactory factory = getDomainFactory();

    if (location == null || service == null)
        return null;

    if (location.getID_LocationIsNotNull() && service.getID_ServiceIsNotNull())
    {
        java.util.List servactList = factory.find("from  LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{location.getID_Location(), service.getID_Service()});
        return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(servactList).sort();
    }

    return null;
}
项目:openMAXIMS    文件:ServiceImpl.java   
private String activeLocationServiceLinks(ims.core.vo.ServiceVo voService)
{
    LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
    LocationServiceVo voLocSer = new LocationServiceVo();
    voLocSer.setService(voService);
    voLocSer.setIsActive(new Boolean(true));
    LocationServiceVoCollection voColl = impl.listLocationService(voLocSer);
    if (voColl != null && voColl.size() > 0)
    {

        String activeMessage = "These " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(true) + " contain active records for the " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + voService.getServiceName();
        for (int i = 0; i < voColl.size(); i++)
        {
            activeMessage += "\r\n" + voColl.get(i).getLocation().getName();
        }

        return activeMessage;
    }
    else
        return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void cmbServiceValueChanged()
{
    form.lyrSupportServices().tabPageServices().cmbLocationServices().clear();
    clearServicesReadOnlyDetails();

    if (form.lyrSupportServices().tabPageServices().cmbService().getValue() == null)
        return;

    LocationServiceVoCollection voColl = domain.listLocationServices(form.lyrSupportServices().tabPageServices().cmbService().getValue());
    if (voColl == null)
        return;

    for (int i = 0; i < voColl.size(); i++)
    {
        if (voColl.get(i) != null
            && voColl.get(i).getLocationIsNotNull())
            form.lyrSupportServices().tabPageServices().cmbLocationServices().newRow(voColl.get(i), voColl.get(i).getLocation().getName());
    }
}
项目:openmaxims-linux    文件:LocationServiceImpl.java   
/**
 * expects parameters returns null if the parameters are not set
 */
public LocationServiceVoCollection listServicesForLocation(LocationRefVo location, ServiceVo service)
{
    DomainFactory factory = getDomainFactory();

    if (location == null || service == null)
        return null;

    if (location.getID_LocationIsNotNull() && service.getID_ServiceIsNotNull())
    {
        java.util.List servactList = factory.find("from  LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{location.getID_Location(), service.getID_Service()});
        return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(servactList).sort();
    }

    return null;
}
项目:openmaxims-linux    文件:ServiceImpl.java   
private String activeLocationServiceLinks(ims.core.vo.ServiceVo voService)
{
    LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
    LocationServiceVo voLocSer = new LocationServiceVo();
    voLocSer.setService(voService);
    voLocSer.setIsActive(new Boolean(true));
    LocationServiceVoCollection voColl = impl.listLocationService(voLocSer);
    if (voColl != null && voColl.size() > 0)
    {

        String activeMessage = "These " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(true) + " contain active records for the " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + voService.getServiceName();
        for (int i = 0; i < voColl.size(); i++)
        {
            activeMessage += "\r\n" + voColl.get(i).getLocation().getName();
        }

        return activeMessage;
    }
    else
        return null;
}
项目:AvoinApotti    文件:SupportNetworkProfessionalServicesImpl.java   
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service)
{
    if (locShort == null || service == null)
        throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

    DomainFactory factory = getDomainFactory();

    List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
    LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

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

    return null;
}
项目:AvoinApotti    文件:SupportServicesImpl.java   
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service) 
{
    if (locShort == null || service == null)
        throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

    DomainFactory factory = getDomainFactory();

    List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
    LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

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

    return null;
}
项目:AvoinApotti    文件:SupportServicesImpl.java   
public LocationServiceVoCollection listLocationServices(ServiceRefVo service)
{
    if (service == null)
        throw new CodingRuntimeException("Service was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hql = "from LocationService ls " + " where ls.service.id = :id and ls.isActive = :active";

    List services = factory.find(hql, new String[]{"id", "active"}, new Object[]{service.getID_Service(), Boolean.TRUE});
    return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(services).sort();
}
项目:AvoinApotti    文件:Logic.java   
private void populateServiceActivities(TreeNode node, LocationServiceVoCollection voLocationServices)
{
    TreeNode childActivityNode = null;
    TreeNode childFunctionNode = null;

    clearServiceNodes(node);

    for (int i = 0; i < voLocationServices.size(); i++)
    {
        if (voLocationServices.get(i).getServiceIsNotNull())
        {
            node.setValue(voLocationServices.get(i));
            for (int j = 0; j < voLocationServices.get(i).getActivities().size(); j++)
            {
                childActivityNode = node.getNodes().add(voLocationServices.get(i).getActivities().get(j), (voLocationServices.get(i).getActivities().get(j).getServiceActivityIsNotNull() ? voLocationServices.get(i).getActivities().get(j).getServiceActivity().getActivity().toString() : ""));
                childActivityNode.setExpandedImage(voLocationServices.get(i).getActivities().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getActivities().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childActivityNode.setCollapsedImage(voLocationServices.get(i).getActivities().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getActivities().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childActivityNode.setSelectedImage(voLocationServices.get(i).getActivities().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getActivities().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childActivityNode.setEnabled(false);
            }
            for (int j = 0; j < voLocationServices.get(i).getFunctions().size(); j++)
            {
                childFunctionNode = node.getNodes().add(voLocationServices.get(i).getFunctions().get(j), (voLocationServices.get(i).getFunctions().get(j).getServiceFunctionIsNotNull() ? voLocationServices.get(i).getFunctions().get(j).getServiceFunction().getFunction().getText() : ""));
                childFunctionNode.setExpandedImage(voLocationServices.get(i).getFunctions().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getFunctions().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childFunctionNode.setCollapsedImage(voLocationServices.get(i).getFunctions().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getFunctions().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childFunctionNode.setSelectedImage(voLocationServices.get(i).getFunctions().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getFunctions().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childFunctionNode.setEnabled(false);

            }
            node.sortChildrenByText();
            if (null != childActivityNode)
                childActivityNode.setExpanded(true);
            if (null != childFunctionNode)
                childFunctionNode.setExpanded(true);
        }
    }

    node.setExpanded(true);
    form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node.getParent()));
}
项目:AvoinApotti    文件:Logic.java   
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
    LocationServiceVoCollection voLocationServices = domain.listLocationService(voLocation);
    TreeNode childServiceNode = null;
    String service = "";
    String HtmlOut = "";
    node.getNodes().clear();
    for (int i = 0; i < voLocationServices.size(); i++)
    {
        if (voLocationServices.get(i).getServiceIsNotNull() && voLocationServices.get(i).getService().getServiceNameIsNotNull())
        {
            childServiceNode = node.getNodes().add(voLocationServices.get(i), voLocationServices.get(i).getService().getServiceName());
            service = formatServiceVo(voLocationServices.get(i));
            HtmlOut += service;
            childServiceNode.setTooltip(service);
            childServiceNode.setExpandedImage(form.getImages().Admin.Service);
            childServiceNode.setCollapsedImage(form.getImages().Admin.Service);
            childServiceNode.setSelectedImage(form.getImages().Admin.Service);
        }
    }

    node.setExpanded(true);

    String out = "";
    if (voLocation.getNameIsNotNull() && voLocationServices.size() > 0)
    {
        out = makeTextile("<CENTER>*" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(true) + ": " + voLocation.getName() + "*</CENTER>", "SlateBlue", "tahoma", "14");
        out += HtmlOut;
        form.htmProviderView().setHTML(new TextileString(out).toString());
    }
    else
        form.htmProviderView().setHTML("");

}
项目:AvoinApotti    文件:LocationServiceImpl.java   
public LocationServiceVoCollection listLocationService(LocationRefVo voLocation)
{
    DomainFactory factory = getDomainFactory();

    if (voLocation == null)
        return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(factory.listDomainObjects(LocationService.class)).sort();

    if (voLocation.getID_LocationIsNotNull())
    {
        java.util.List servactList = factory.find("from  LocationService locService where locService.location.id = :locationId", new String[]{"locationId"}, new Object[]{voLocation.getID_Location()});
        return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(servactList).sort();
    }

    return null;
}
项目:AvoinApotti    文件:DemoreferralDetailsImpl.java   
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service) {
    if (locShort == null || service == null)
        throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

    DomainFactory factory = getDomainFactory();

    List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
    LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

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

    return null;
}
项目:openMAXIMS    文件:SupportNetworkProfessionalServicesImpl.java   
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service)
{
    if (locShort == null || service == null)
        throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

    DomainFactory factory = getDomainFactory();

    List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
    LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

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

    return null;
}
项目:openMAXIMS    文件:SupportServicesImpl.java   
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service) 
{
    if (locShort == null || service == null)
        throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

    DomainFactory factory = getDomainFactory();

    List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
    LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

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

    return null;
}
项目:openMAXIMS    文件:SupportServicesImpl.java   
public LocationServiceVoCollection listLocationServices(ServiceRefVo service)
{
    if (service == null)
        throw new CodingRuntimeException("Service was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hql = "from LocationService ls " + " where ls.service.id = :id and ls.isActive = :active";

    List services = factory.find(hql, new String[]{"id", "active"}, new Object[]{service.getID_Service(), Boolean.TRUE});
    return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(services).sort();
}
项目:openMAXIMS    文件:Logic.java   
private void populateServiceActivities(TreeNode node, LocationServiceVoCollection voLocationServices)
{
    TreeNode childActivityNode = null;
    TreeNode childFunctionNode = null;

    clearServiceNodes(node);

    for (int i = 0; i < voLocationServices.size(); i++)
    {
        if (voLocationServices.get(i).getServiceIsNotNull())
        {
            node.setValue(voLocationServices.get(i));
            for (int j = 0; j < voLocationServices.get(i).getActivities().size(); j++)
            {
                childActivityNode = node.getNodes().add(voLocationServices.get(i).getActivities().get(j), (voLocationServices.get(i).getActivities().get(j).getServiceActivityIsNotNull() ? voLocationServices.get(i).getActivities().get(j).getServiceActivity().getActivity().toString() : ""));
                childActivityNode.setExpandedImage(voLocationServices.get(i).getActivities().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getActivities().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childActivityNode.setCollapsedImage(voLocationServices.get(i).getActivities().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getActivities().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childActivityNode.setSelectedImage(voLocationServices.get(i).getActivities().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getActivities().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childActivityNode.setEnabled(false);
            }
            for (int j = 0; j < voLocationServices.get(i).getFunctions().size(); j++)
            {
                childFunctionNode = node.getNodes().add(voLocationServices.get(i).getFunctions().get(j), (voLocationServices.get(i).getFunctions().get(j).getServiceFunctionIsNotNull() ? voLocationServices.get(i).getFunctions().get(j).getServiceFunction().getFunction().getText() : ""));
                childFunctionNode.setExpandedImage(voLocationServices.get(i).getFunctions().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getFunctions().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childFunctionNode.setCollapsedImage(voLocationServices.get(i).getFunctions().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getFunctions().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childFunctionNode.setSelectedImage(voLocationServices.get(i).getFunctions().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getFunctions().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childFunctionNode.setEnabled(false);

            }
            node.sortChildrenByText();
            if (null != childActivityNode)
                childActivityNode.setExpanded(true);
            if (null != childFunctionNode)
                childFunctionNode.setExpanded(true);
        }
    }

    node.setExpanded(true);
    form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node.getParent()));
}
项目:openMAXIMS    文件:Logic.java   
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
    LocationServiceVoCollection voLocationServices = domain.listLocationService(voLocation);
    TreeNode childServiceNode = null;
    String service = "";
    String HtmlOut = "";
    node.getNodes().clear();
    for (int i = 0; i < voLocationServices.size(); i++)
    {
        if (voLocationServices.get(i).getServiceIsNotNull() && voLocationServices.get(i).getService().getServiceNameIsNotNull())
        {
            childServiceNode = node.getNodes().add(voLocationServices.get(i), voLocationServices.get(i).getService().getServiceName());
            service = formatServiceVo(voLocationServices.get(i));
            HtmlOut += service;
            childServiceNode.setTooltip(service);
            childServiceNode.setExpandedImage(form.getImages().Admin.Service);
            childServiceNode.setCollapsedImage(form.getImages().Admin.Service);
            childServiceNode.setSelectedImage(form.getImages().Admin.Service);
        }
    }

    node.setExpanded(true);

    String out = "";
    if (voLocation.getNameIsNotNull() && voLocationServices.size() > 0)
    {
        out = makeTextile("<CENTER>*" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(true) + ": " + voLocation.getName() + "*</CENTER>", "SlateBlue", "tahoma", "14");
        out += HtmlOut;
        form.htmProviderView().setHTML(new TextileString(out).toString());
    }
    else
        form.htmProviderView().setHTML("");

}
项目:openMAXIMS    文件:LocationServiceImpl.java   
public LocationServiceVoCollection listLocationService(LocationRefVo voLocation)
{
    DomainFactory factory = getDomainFactory();

    if (voLocation == null)
        return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(factory.listDomainObjects(LocationService.class)).sort();

    if (voLocation.getID_LocationIsNotNull())
    {
        java.util.List servactList = factory.find("from  LocationService locService where locService.location.id = :locationId", new String[]{"locationId"}, new Object[]{voLocation.getID_Location()});
        return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(servactList).sort();
    }

    return null;
}
项目:openMAXIMS    文件:DemoreferralDetailsImpl.java   
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service) {
    if (locShort == null || service == null)
        throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

    DomainFactory factory = getDomainFactory();

    List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
    LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

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

    return null;
}
项目:openMAXIMS    文件:SupportNetworkProfessionalServicesImpl.java   
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service)
{
    if (locShort == null || service == null)
        throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

    DomainFactory factory = getDomainFactory();

    List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
    LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

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

    return null;
}
项目:openMAXIMS    文件:SupportServicesImpl.java   
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service) 
{
    if (locShort == null || service == null)
        throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

    DomainFactory factory = getDomainFactory();

    List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
    LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

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

    return null;
}
项目:openMAXIMS    文件:SupportServicesImpl.java   
public LocationServiceVoCollection listLocationServices(ServiceRefVo service)
{
    if (service == null)
        throw new CodingRuntimeException("Service was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hql = "from LocationService ls " + " where ls.service.id = :id and ls.isActive = :active";

    List services = factory.find(hql, new String[]{"id", "active"}, new Object[]{service.getID_Service(), Boolean.TRUE});
    return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(services).sort();
}
项目:openMAXIMS    文件:Logic.java   
private void populateServiceActivities(TreeNode node, LocationServiceVoCollection voLocationServices)
{
    TreeNode childActivityNode = null;
    TreeNode childFunctionNode = null;

    clearServiceNodes(node);

    for (int i = 0; i < voLocationServices.size(); i++)
    {
        if (voLocationServices.get(i).getServiceIsNotNull())
        {
            node.setValue(voLocationServices.get(i));
            for (int j = 0; j < voLocationServices.get(i).getActivities().size(); j++)
            {
                childActivityNode = node.getNodes().add(voLocationServices.get(i).getActivities().get(j), (voLocationServices.get(i).getActivities().get(j).getServiceActivityIsNotNull() ? voLocationServices.get(i).getActivities().get(j).getServiceActivity().getActivity().toString() : ""));
                childActivityNode.setExpandedImage(voLocationServices.get(i).getActivities().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getActivities().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childActivityNode.setCollapsedImage(voLocationServices.get(i).getActivities().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getActivities().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childActivityNode.setSelectedImage(voLocationServices.get(i).getActivities().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getActivities().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childActivityNode.setEnabled(false);
            }
            for (int j = 0; j < voLocationServices.get(i).getFunctions().size(); j++)
            {
                childFunctionNode = node.getNodes().add(voLocationServices.get(i).getFunctions().get(j), (voLocationServices.get(i).getFunctions().get(j).getServiceFunctionIsNotNull() ? voLocationServices.get(i).getFunctions().get(j).getServiceFunction().getFunction().getText() : ""));
                childFunctionNode.setExpandedImage(voLocationServices.get(i).getFunctions().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getFunctions().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childFunctionNode.setCollapsedImage(voLocationServices.get(i).getFunctions().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getFunctions().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childFunctionNode.setSelectedImage(voLocationServices.get(i).getFunctions().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getFunctions().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childFunctionNode.setEnabled(false);

            }
            node.sortChildrenByText();
            if (null != childActivityNode)
                childActivityNode.setExpanded(true);
            if (null != childFunctionNode)
                childFunctionNode.setExpanded(true);
        }
    }

    node.setExpanded(true);
    form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node.getParent()));
}
项目:openMAXIMS    文件:Logic.java   
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
    LocationServiceVoCollection voLocationServices = domain.listLocationService(voLocation);
    TreeNode childServiceNode = null;
    String service = "";
    String HtmlOut = "";
    node.getNodes().clear();
    for (int i = 0; i < voLocationServices.size(); i++)
    {
        if (voLocationServices.get(i).getServiceIsNotNull() && voLocationServices.get(i).getService().getServiceNameIsNotNull())
        {
            childServiceNode = node.getNodes().add(voLocationServices.get(i), voLocationServices.get(i).getService().getServiceName());
            service = formatServiceVo(voLocationServices.get(i));
            HtmlOut += service;
            childServiceNode.setTooltip(service);
            childServiceNode.setExpandedImage(form.getImages().Admin.Service);
            childServiceNode.setCollapsedImage(form.getImages().Admin.Service);
            childServiceNode.setSelectedImage(form.getImages().Admin.Service);
        }
    }

    node.setExpanded(true);

    String out = "";
    if (voLocation.getNameIsNotNull() && voLocationServices.size() > 0)
    {
        out = makeTextile("<CENTER>*" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(true) + ": " + voLocation.getName() + "*</CENTER>", "SlateBlue", "tahoma", "14");
        out += HtmlOut;
        form.htmProviderView().setHTML(new TextileString(out).toString());
    }
    else
        form.htmProviderView().setHTML("");

}
项目:openMAXIMS    文件:LocationServiceImpl.java   
public LocationServiceVoCollection listLocationService(LocationRefVo voLocation)
{
    DomainFactory factory = getDomainFactory();

    if (voLocation == null)
        return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(factory.listDomainObjects(LocationService.class)).sort();

    if (voLocation.getID_LocationIsNotNull())
    {
        java.util.List servactList = factory.find("from  LocationService locService where locService.location.id = :locationId", new String[]{"locationId"}, new Object[]{voLocation.getID_Location()});
        return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(servactList).sort();
    }

    return null;
}
项目:openMAXIMS    文件:DemoreferralDetailsImpl.java   
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service) {
    if (locShort == null || service == null)
        throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

    DomainFactory factory = getDomainFactory();

    List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
    LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

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

    return null;
}
项目:openmaxims-linux    文件:SupportNetworkProfessionalServicesImpl.java   
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service)
{
    if (locShort == null || service == null)
        throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

    DomainFactory factory = getDomainFactory();

    List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
    LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

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

    return null;
}
项目:openmaxims-linux    文件:SupportServicesImpl.java   
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service) 
{
    if (locShort == null || service == null)
        throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

    DomainFactory factory = getDomainFactory();

    List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
    LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

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

    return null;
}
项目:openmaxims-linux    文件:SupportServicesImpl.java   
public LocationServiceVoCollection listLocationServices(ServiceRefVo service)
{
    if (service == null)
        throw new CodingRuntimeException("Service was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hql = "from LocationService ls " + " where ls.service.id = :id and ls.isActive = :active";

    List services = factory.find(hql, new String[]{"id", "active"}, new Object[]{service.getID_Service(), Boolean.TRUE});
    return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(services).sort();
}
项目:openmaxims-linux    文件:Logic.java   
private void populateServiceActivities(TreeNode node, LocationServiceVoCollection voLocationServices)
{
    TreeNode childActivityNode = null;
    TreeNode childFunctionNode = null;

    clearServiceNodes(node);

    for (int i = 0; i < voLocationServices.size(); i++)
    {
        if (voLocationServices.get(i).getServiceIsNotNull())
        {
            node.setValue(voLocationServices.get(i));
            for (int j = 0; j < voLocationServices.get(i).getActivities().size(); j++)
            {
                childActivityNode = node.getNodes().add(voLocationServices.get(i).getActivities().get(j), (voLocationServices.get(i).getActivities().get(j).getServiceActivityIsNotNull() ? voLocationServices.get(i).getActivities().get(j).getServiceActivity().getActivity().toString() : ""));
                childActivityNode.setExpandedImage(voLocationServices.get(i).getActivities().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getActivities().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childActivityNode.setCollapsedImage(voLocationServices.get(i).getActivities().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getActivities().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childActivityNode.setSelectedImage(voLocationServices.get(i).getActivities().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getActivities().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childActivityNode.setEnabled(false);
            }
            for (int j = 0; j < voLocationServices.get(i).getFunctions().size(); j++)
            {
                childFunctionNode = node.getNodes().add(voLocationServices.get(i).getFunctions().get(j), (voLocationServices.get(i).getFunctions().get(j).getServiceFunctionIsNotNull() ? voLocationServices.get(i).getFunctions().get(j).getServiceFunction().getFunction().getText() : ""));
                childFunctionNode.setExpandedImage(voLocationServices.get(i).getFunctions().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getFunctions().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childFunctionNode.setCollapsedImage(voLocationServices.get(i).getFunctions().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getFunctions().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childFunctionNode.setSelectedImage(voLocationServices.get(i).getFunctions().get(j).getIsActiveIsNotNull() ? (voLocationServices.get(i).getFunctions().get(j).getIsActive().booleanValue() ? form.getImages().Admin.Activity : form.getImages().Admin.ActivityInactive) : form.getImages().Admin.Activity);
                childFunctionNode.setEnabled(false);

            }
            node.sortChildrenByText();
            if (null != childActivityNode)
                childActivityNode.setExpanded(true);
            if (null != childFunctionNode)
                childFunctionNode.setExpanded(true);
        }
    }

    node.setExpanded(true);
    form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node.getParent()));
}
项目:openmaxims-linux    文件:Logic.java   
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
    LocationServiceVoCollection voLocationServices = domain.listLocationService(voLocation);
    TreeNode childServiceNode = null;
    String service = "";
    String HtmlOut = "";
    node.getNodes().clear();
    for (int i = 0; i < voLocationServices.size(); i++)
    {
        if (voLocationServices.get(i).getServiceIsNotNull() && voLocationServices.get(i).getService().getServiceNameIsNotNull())
        {
            childServiceNode = node.getNodes().add(voLocationServices.get(i), voLocationServices.get(i).getService().getServiceName());
            service = formatServiceVo(voLocationServices.get(i));
            HtmlOut += service;
            childServiceNode.setTooltip(service);
            childServiceNode.setExpandedImage(form.getImages().Admin.Service);
            childServiceNode.setCollapsedImage(form.getImages().Admin.Service);
            childServiceNode.setSelectedImage(form.getImages().Admin.Service);
        }
    }

    node.setExpanded(true);

    String out = "";
    if (voLocation.getNameIsNotNull() && voLocationServices.size() > 0)
    {
        out = makeTextile("<CENTER>*" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(true) + ": " + voLocation.getName() + "*</CENTER>", "SlateBlue", "tahoma", "14");
        out += HtmlOut;
        form.htmProviderView().setHTML(new TextileString(out).toString());
    }
    else
        form.htmProviderView().setHTML("");

}
项目:openmaxims-linux    文件:LocationServiceImpl.java   
public LocationServiceVoCollection listLocationService(LocationRefVo voLocation)
{
    DomainFactory factory = getDomainFactory();

    if (voLocation == null)
        return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(factory.listDomainObjects(LocationService.class)).sort();

    if (voLocation.getID_LocationIsNotNull())
    {
        java.util.List servactList = factory.find("from  LocationService locService where locService.location.id = :locationId", new String[]{"locationId"}, new Object[]{voLocation.getID_Location()});
        return LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(servactList).sort();
    }

    return null;
}
项目:openmaxims-linux    文件:DemoreferralDetailsImpl.java   
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service) {
    if (locShort == null || service == null)
        throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

    DomainFactory factory = getDomainFactory();

    List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
    LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

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

    return null;
}