Java 类ims.therapies.vo.domain.StandingSessionVoAssembler 实例源码

项目:AvoinApotti    文件:StandingImpl.java   
/**
* saves Standing
*/
public StandingSessionVo save(ims.therapies.vo.StandingSessionVo voStandingSession) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException 
{
    if(!voStandingSession.isValidated())
        throw new DomainRuntimeException("This Standing Session has not been validated");

    if (voStandingSession.getID_StandingSession() == null && getStandingSessionByClinicalContact(voStandingSession.getClinicalContact()) != null)
        throw new UniqueKeyViolationException("The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();
    StandingSession doStanding = StandingSessionVoAssembler.extractStandingSession(factory, voStandingSession);

    factory.save(doStanding);

    return StandingSessionVoAssembler.create(doStanding);
}
项目:openMAXIMS    文件:StandingImpl.java   
/**
* saves Standing
*/
public StandingSessionVo save(ims.therapies.vo.StandingSessionVo voStandingSession) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException 
{
    if(!voStandingSession.isValidated())
        throw new DomainRuntimeException("This Standing Session has not been validated");

    if (voStandingSession.getID_StandingSession() == null && getStandingSessionByClinicalContact(voStandingSession.getClinicalContact()) != null)
        throw new UniqueKeyViolationException("The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();
    StandingSession doStanding = StandingSessionVoAssembler.extractStandingSession(factory, voStandingSession);

    factory.save(doStanding);

    return StandingSessionVoAssembler.create(doStanding);
}
项目:openMAXIMS    文件:StandingImpl.java   
/**
* saves Standing
*/
public StandingSessionVo save(ims.therapies.vo.StandingSessionVo voStandingSession) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException 
{
    if(!voStandingSession.isValidated())
        throw new DomainRuntimeException("This Standing Session has not been validated");

    if (voStandingSession.getID_StandingSession() == null && getStandingSessionByClinicalContact(voStandingSession.getClinicalContact()) != null)
        throw new UniqueKeyViolationException("The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();
    StandingSession doStanding = StandingSessionVoAssembler.extractStandingSession(factory, voStandingSession);

    factory.save(doStanding);

    return StandingSessionVoAssembler.create(doStanding);
}
项目:openmaxims-linux    文件:StandingImpl.java   
/**
* saves Standing
*/
public StandingSessionVo save(ims.therapies.vo.StandingSessionVo voStandingSession) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException 
{
    if(!voStandingSession.isValidated())
        throw new DomainRuntimeException("This Standing Session has not been validated");

    if (voStandingSession.getID_StandingSession() == null && getStandingSessionByClinicalContact(voStandingSession.getClinicalContact()) != null)
        throw new UniqueKeyViolationException("The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();
    StandingSession doStanding = StandingSessionVoAssembler.extractStandingSession(factory, voStandingSession);

    factory.save(doStanding);

    return StandingSessionVoAssembler.create(doStanding);
}
项目:AvoinApotti    文件:StandingImpl.java   
public StandingSessionVo getStandingSessionByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if(voClinicalContactRef == null)
        throw new CodingRuntimeException("Standing Session Filter not provided for get call. ");

    String hql = new String("from StandingSession s where s.clinicalContact.id = :CLINICAL_CONTACT_ID");

    java.util.List list = getDomainFactory().find(hql, "CLINICAL_CONTACT_ID", voClinicalContactRef.getID_ClinicalContact());

    StandingSessionVoCollection vo = StandingSessionVoAssembler.createStandingSessionVoCollectionFromStandingSession(list);
    if(vo!=null && vo.size()>0 )
        return vo.get(0);
    else
        return null;
}
项目:AvoinApotti    文件:StandingImpl.java   
public StandingSessionVo getStanding(StandingSessionRefVo standing)
{
    if(standing == null || standing.getID_StandingSession() == null)
        throw new CodingRuntimeException("Cannot get StandingSession on null Id.");

    return StandingSessionVoAssembler.create((StandingSession) getDomainFactory().getDomainObject(StandingSession.class, standing.getID_StandingSession()));
}
项目:openMAXIMS    文件:StandingImpl.java   
public StandingSessionVo getStandingSessionByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if(voClinicalContactRef == null)
        throw new CodingRuntimeException("Standing Session Filter not provided for get call. ");

    String hql = new String("from StandingSession s where s.clinicalContact.id = :CLINICAL_CONTACT_ID");

    java.util.List list = getDomainFactory().find(hql, "CLINICAL_CONTACT_ID", voClinicalContactRef.getID_ClinicalContact());

    StandingSessionVoCollection vo = StandingSessionVoAssembler.createStandingSessionVoCollectionFromStandingSession(list);
    if(vo!=null && vo.size()>0 )
        return vo.get(0);
    else
        return null;
}
项目:openMAXIMS    文件:StandingImpl.java   
public StandingSessionVo getStanding(StandingSessionRefVo standing)
{
    if(standing == null || standing.getID_StandingSession() == null)
        throw new CodingRuntimeException("Cannot get StandingSession on null Id.");

    return StandingSessionVoAssembler.create((StandingSession) getDomainFactory().getDomainObject(StandingSession.class, standing.getID_StandingSession()));
}
项目:openMAXIMS    文件:StandingImpl.java   
public StandingSessionVo getStandingSessionByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if(voClinicalContactRef == null)
        throw new CodingRuntimeException("Standing Session Filter not provided for get call. ");

    String hql = new String("from StandingSession s where s.clinicalContact.id = :CLINICAL_CONTACT_ID");

    java.util.List list = getDomainFactory().find(hql, "CLINICAL_CONTACT_ID", voClinicalContactRef.getID_ClinicalContact());

    StandingSessionVoCollection vo = StandingSessionVoAssembler.createStandingSessionVoCollectionFromStandingSession(list);
    if(vo!=null && vo.size()>0 )
        return vo.get(0);
    else
        return null;
}
项目:openMAXIMS    文件:StandingImpl.java   
public StandingSessionVo getStanding(StandingSessionRefVo standing)
{
    if(standing == null || standing.getID_StandingSession() == null)
        throw new CodingRuntimeException("Cannot get StandingSession on null Id.");

    return StandingSessionVoAssembler.create((StandingSession) getDomainFactory().getDomainObject(StandingSession.class, standing.getID_StandingSession()));
}
项目:openmaxims-linux    文件:StandingImpl.java   
public StandingSessionVo getStandingSessionByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if(voClinicalContactRef == null)
        throw new CodingRuntimeException("Standing Session Filter not provided for get call. ");

    String hql = new String("from StandingSession s where s.clinicalContact.id = :CLINICAL_CONTACT_ID");

    java.util.List list = getDomainFactory().find(hql, "CLINICAL_CONTACT_ID", voClinicalContactRef.getID_ClinicalContact());

    StandingSessionVoCollection vo = StandingSessionVoAssembler.createStandingSessionVoCollectionFromStandingSession(list);
    if(vo!=null && vo.size()>0 )
        return vo.get(0);
    else
        return null;
}
项目:openmaxims-linux    文件:StandingImpl.java   
public StandingSessionVo getStanding(StandingSessionRefVo standing)
{
    if(standing == null || standing.getID_StandingSession() == null)
        throw new CodingRuntimeException("Cannot get StandingSession on null Id.");

    return StandingSessionVoAssembler.create((StandingSession) getDomainFactory().getDomainObject(StandingSession.class, standing.getID_StandingSession()));
}