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

项目:AvoinApotti    文件:ServiceImpl.java   
public void removeServiceFunction(ims.core.vo.ServiceFunctionVo voServiceFunction) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.ForeignKeyViolationException, ims.domain.exceptions.UniqueKeyViolationException
{
    DomainFactory factory = getDomainFactory();

    ServiceFunction doServiceFunction = ServiceFunctionVoAssembler.extractServiceFunction(factory, voServiceFunction);
    try
    {
        factory.delete(doServiceFunction);
    }
    catch (DomainRuntimeException e) // SN: catching
                                        // DomainRuntimeException here as
                                        // this is what Hib is returning
                                        // with e.getCause() =
                                        // ConstrainViolationException
    {
        throw new UniqueKeyViolationException(e.getMessage());
    }
}
项目:openMAXIMS    文件:DirectoryOfServiceAdminImpl.java   
/**
 * retrieve a list of functions for this service from ServiceFunction
 */
public ServiceFunctionVoCollection listServiceFunctions(ServiceShortVo serviceShort) 
{
    /*DomainFactory factory = getDomainFactory();

    List<?> funcs = factory.find("from ServiceFunction serviceFunc where serviceFunc.service.id = :serviceId",new String[]{"serviceId"},new Object[]{serviceShort.getID_Service()});
    return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(funcs);*/


    //wdev-20262
    if(serviceShort == null || serviceShort.getID_Service() == null)
        throw new CodingRuntimeException("service parameter is null or id not provided in method listServiceFunctionByService");

    DomainFactory factory = getDomainFactory();
    List servFuncs = factory.find("from ServiceFunction as servFunc where servFunc.service.id = :idService and servFunc.isActive = 1",new String[]{"idService"}, new Object[]{serviceShort.getID_Service()});
    return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(servFuncs);
}
项目:openMAXIMS    文件:ServiceImpl.java   
public void removeServiceFunction(ims.core.vo.ServiceFunctionVo voServiceFunction) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.ForeignKeyViolationException, ims.domain.exceptions.UniqueKeyViolationException
{
    DomainFactory factory = getDomainFactory();

    ServiceFunction doServiceFunction = ServiceFunctionVoAssembler.extractServiceFunction(factory, voServiceFunction);
    try
    {
        factory.delete(doServiceFunction);
    }
    catch (DomainRuntimeException e) // SN: catching
                                        // DomainRuntimeException here as
                                        // this is what Hib is returning
                                        // with e.getCause() =
                                        // ConstrainViolationException
    {
        throw new UniqueKeyViolationException(e.getMessage());
    }
}
项目:openMAXIMS    文件:ServiceImpl.java   
public void removeServiceFunction(ims.core.vo.ServiceFunctionVo voServiceFunction) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.ForeignKeyViolationException, ims.domain.exceptions.UniqueKeyViolationException
{
    DomainFactory factory = getDomainFactory();

    ServiceFunction doServiceFunction = ServiceFunctionVoAssembler.extractServiceFunction(factory, voServiceFunction);
    try
    {
        factory.delete(doServiceFunction);
    }
    catch (DomainRuntimeException e) // SN: catching
                                        // DomainRuntimeException here as
                                        // this is what Hib is returning
                                        // with e.getCause() =
                                        // ConstrainViolationException
    {
        throw new UniqueKeyViolationException(e.getMessage());
    }
}
项目:openmaxims-linux    文件:ServiceImpl.java   
public void removeServiceFunction(ims.core.vo.ServiceFunctionVo voServiceFunction) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.ForeignKeyViolationException, ims.domain.exceptions.UniqueKeyViolationException
{
    DomainFactory factory = getDomainFactory();

    ServiceFunction doServiceFunction = ServiceFunctionVoAssembler.extractServiceFunction(factory, voServiceFunction);
    try
    {
        factory.delete(doServiceFunction);
    }
    catch (DomainRuntimeException e) // SN: catching
                                        // DomainRuntimeException here as
                                        // this is what Hib is returning
                                        // with e.getCause() =
                                        // ConstrainViolationException
    {
        throw new UniqueKeyViolationException(e.getMessage());
    }
}
项目:AvoinApotti    文件:DirectoryOfServiceAdminImpl.java   
/**
 * retrieve a list of functions for this service from ServiceFunction
 */
public ServiceFunctionVoCollection listServiceFunctions(ServiceShortVo serviceShort) 
{
    DomainFactory factory = getDomainFactory();

    List<?> funcs = factory.find("from ServiceFunction serviceFunc where serviceFunc.service.id = :serviceId",new String[]{"serviceId"},new Object[]{serviceShort.getID_Service()});
    return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(funcs);
}
项目:AvoinApotti    文件:LocationServiceImpl.java   
public ServiceFunctionVoCollection listServiceFunction(Integer voServiceId)
{
    DomainFactory factory = getDomainFactory();

    if (voServiceId != null)
    {
        java.util.List servfuncList = factory.find("from ServiceFunction servfunc where servfunc.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voServiceId});
        return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(servfuncList).sort();
    }

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

    if (voService == null)
        return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(factory.listDomainObjects(ServiceFunction.class)).sort();

    if (voService.getID_ServiceIsNotNull())
    {
        java.util.List servfuncList = factory.find("from  ServiceFunction servfunc where servfunc.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voService.getID_Service()});
        return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(servfuncList).sort();
    }

    return null;
}
项目:openMAXIMS    文件:SessionSlotDialogImpl.java   
public ServiceFunctionVoCollection listServiceFunctionByService(SessionShortVo session)
{
    if (session == null || session.getID_Sch_Session() == null)
        throw new CodingRuntimeException("session parameter is null or id not provided in method listServiceFunctionByService");

    DomainFactory factory = getDomainFactory();
    List <?> servFuncs = factory.find("select funct from ServiceFunction as funct left join funct.function as f left join funct.service as serv where funct.isActive = :ACTIVE AND serv.id = :SERVICE_ID AND f.id IN (select l2_1.id from Sch_Session as s1_1 left join s1_1.sch_Profile as s2_1 left join s2_1.function as l1_1 left join l1_1.instance as l2_1 where s1_1.id = :SESSION_ID) ", new String[]{"ACTIVE", "SERVICE_ID", "SESSION_ID"}, new Object[]{Boolean.TRUE, session.getService().getID_Service(), session.getID_Sch_Session()});

    if (servFuncs == null || servFuncs.isEmpty())
        return null;

    return  ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(servFuncs);
}
项目:openMAXIMS    文件:LocationServiceImpl.java   
public ServiceFunctionVoCollection listServiceFunction(Integer voServiceId)
{
    DomainFactory factory = getDomainFactory();

    if (voServiceId != null)
    {
        java.util.List servfuncList = factory.find("from ServiceFunction servfunc where servfunc.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voServiceId});
        return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(servfuncList).sort();
    }

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

    if (voService == null)
        return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(factory.listDomainObjects(ServiceFunction.class)).sort();

    if (voService.getID_ServiceIsNotNull())
    {
        java.util.List servfuncList = factory.find("from  ServiceFunction servfunc where servfunc.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voService.getID_Service()});
        return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(servfuncList).sort();
    }

    return null;
}
项目:openMAXIMS    文件:DirectoryOfServiceAdminImpl.java   
/**
 * retrieve a list of functions for this service from ServiceFunction
 */
public ServiceFunctionVoCollection listServiceFunctions(ServiceShortVo serviceShort) 
{
    DomainFactory factory = getDomainFactory();

    List<?> funcs = factory.find("from ServiceFunction serviceFunc where serviceFunc.service.id = :serviceId",new String[]{"serviceId"},new Object[]{serviceShort.getID_Service()});
    return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(funcs);
}
项目:openMAXIMS    文件:LocationServiceImpl.java   
public ServiceFunctionVoCollection listServiceFunction(Integer voServiceId)
{
    DomainFactory factory = getDomainFactory();

    if (voServiceId != null)
    {
        java.util.List servfuncList = factory.find("from ServiceFunction servfunc where servfunc.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voServiceId});
        return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(servfuncList).sort();
    }

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

    if (voService == null)
        return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(factory.listDomainObjects(ServiceFunction.class)).sort();

    if (voService.getID_ServiceIsNotNull())
    {
        java.util.List servfuncList = factory.find("from  ServiceFunction servfunc where servfunc.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voService.getID_Service()});
        return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(servfuncList).sort();
    }

    return null;
}
项目:openmaxims-linux    文件:DirectoryOfServiceAdminImpl.java   
/**
 * retrieve a list of functions for this service from ServiceFunction
 */
public ServiceFunctionVoCollection listServiceFunctions(ServiceShortVo serviceShort) 
{
    DomainFactory factory = getDomainFactory();

    List<?> funcs = factory.find("from ServiceFunction serviceFunc where serviceFunc.service.id = :serviceId",new String[]{"serviceId"},new Object[]{serviceShort.getID_Service()});
    return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(funcs);
}
项目:openmaxims-linux    文件:LocationServiceImpl.java   
public ServiceFunctionVoCollection listServiceFunction(Integer voServiceId)
{
    DomainFactory factory = getDomainFactory();

    if (voServiceId != null)
    {
        java.util.List servfuncList = factory.find("from ServiceFunction servfunc where servfunc.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voServiceId});
        return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(servfuncList).sort();
    }

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

    if (voService == null)
        return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(factory.listDomainObjects(ServiceFunction.class)).sort();

    if (voService.getID_ServiceIsNotNull())
    {
        java.util.List servfuncList = factory.find("from  ServiceFunction servfunc where servfunc.service.id = :serviceid", new String[]{"serviceid"}, new Object[]{voService.getID_Service()});
        return ServiceFunctionVoAssembler.createServiceFunctionVoCollectionFromServiceFunction(servfuncList).sort();
    }

    return null;
}