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

项目:AvoinApotti    文件:StretchingImpl.java   
/**
*   Save a stretching Record for a Clinical Contact
*/
public StretchingVo saveStretchingVo(StretchingVo stretching) throws StaleObjectException, ForeignKeyViolationException
{
    // Ensure the value object has been validated
    if (!stretching.isValidated())
        throw new DomainRuntimeException("Stretching has not been validated");

    // if a new Stretching record is created check if a Stretching record already exists for this SOAP clinical contact
    if (stretching != null && stretching.getID_Stretching() == null)
    {
        if (existsRecord(stretching.getClinicalContact()))
            throw new ForeignKeyViolationException("A Stretch record already exists for this SOAP clinical contact");
    }

    DomainFactory factory = getDomainFactory();
    Stretching doStretching = StretchingVoAssembler.extractStretching(factory, stretching);

    factory.save(doStretching);

    return StretchingVoAssembler.create(doStretching);
}
项目:openMAXIMS    文件:StretchingImpl.java   
/**
*   Save a stretching Record for a Clinical Contact
*/
public StretchingVo saveStretchingVo(StretchingVo stretching) throws StaleObjectException, ForeignKeyViolationException
{
    // Ensure the value object has been validated
    if (!stretching.isValidated())
        throw new DomainRuntimeException("Stretching has not been validated");

    // if a new Stretching record is created check if a Stretching record already exists for this SOAP clinical contact
    if (stretching != null && stretching.getID_Stretching() == null)
    {
        if (existsRecord(stretching.getClinicalContact()))
            throw new ForeignKeyViolationException("A Stretch record already exists for this SOAP clinical contact");
    }

    DomainFactory factory = getDomainFactory();
    Stretching doStretching = StretchingVoAssembler.extractStretching(factory, stretching);

    factory.save(doStretching);

    return StretchingVoAssembler.create(doStretching);
}
项目:openMAXIMS    文件:StretchingImpl.java   
/**
*   Save a stretching Record for a Clinical Contact
*/
public StretchingVo saveStretchingVo(StretchingVo stretching) throws StaleObjectException, ForeignKeyViolationException
{
    // Ensure the value object has been validated
    if (!stretching.isValidated())
        throw new DomainRuntimeException("Stretching has not been validated");

    // if a new Stretching record is created check if a Stretching record already exists for this SOAP clinical contact
    if (stretching != null && stretching.getID_Stretching() == null)
    {
        if (existsRecord(stretching.getClinicalContact()))
            throw new ForeignKeyViolationException("A Stretch record already exists for this SOAP clinical contact");
    }

    DomainFactory factory = getDomainFactory();
    Stretching doStretching = StretchingVoAssembler.extractStretching(factory, stretching);

    factory.save(doStretching);

    return StretchingVoAssembler.create(doStretching);
}
项目:openmaxims-linux    文件:StretchingImpl.java   
/**
*   Save a stretching Record for a Clinical Contact
*/
public StretchingVo saveStretchingVo(StretchingVo stretching) throws StaleObjectException, ForeignKeyViolationException
{
    // Ensure the value object has been validated
    if (!stretching.isValidated())
        throw new DomainRuntimeException("Stretching has not been validated");

    // if a new Stretching record is created check if a Stretching record already exists for this SOAP clinical contact
    if (stretching != null && stretching.getID_Stretching() == null)
    {
        if (existsRecord(stretching.getClinicalContact()))
            throw new ForeignKeyViolationException("A Stretch record already exists for this SOAP clinical contact");
    }

    DomainFactory factory = getDomainFactory();
    Stretching doStretching = StretchingVoAssembler.extractStretching(factory, stretching);

    factory.save(doStretching);

    return StretchingVoAssembler.create(doStretching);
}
项目:AvoinApotti    文件:StretchingImpl.java   
/**
*   Get the stretching 
*/
public StretchingVo getStretchingVo(StretchingRefVo stretchingRef)
{
    // Check for parameter
    if (stretchingRef == null || !stretchingRef.getID_StretchingIsNotNull())
        throw new DomainRuntimeException("Invalid parameter Stretching Ref");

    return StretchingVoAssembler.create((Stretching) getDomainFactory().getDomainObject(Stretching.class, stretchingRef.getID_Stretching()));
}
项目:openMAXIMS    文件:StretchingImpl.java   
/**
*   Get the stretching 
*/
public StretchingVo getStretchingVo(StretchingRefVo stretchingRef)
{
    // Check for parameter
    if (stretchingRef == null || !stretchingRef.getID_StretchingIsNotNull())
        throw new DomainRuntimeException("Invalid parameter Stretching Ref");

    return StretchingVoAssembler.create((Stretching) getDomainFactory().getDomainObject(Stretching.class, stretchingRef.getID_Stretching()));
}
项目:openMAXIMS    文件:StretchingImpl.java   
/**
*   Get the stretching 
*/
public StretchingVo getStretchingVo(StretchingRefVo stretchingRef)
{
    // Check for parameter
    if (stretchingRef == null || !stretchingRef.getID_StretchingIsNotNull())
        throw new DomainRuntimeException("Invalid parameter Stretching Ref");

    return StretchingVoAssembler.create((Stretching) getDomainFactory().getDomainObject(Stretching.class, stretchingRef.getID_Stretching()));
}
项目:openmaxims-linux    文件:StretchingImpl.java   
/**
*   Get the stretching 
*/
public StretchingVo getStretchingVo(StretchingRefVo stretchingRef)
{
    // Check for parameter
    if (stretchingRef == null || !stretchingRef.getID_StretchingIsNotNull())
        throw new DomainRuntimeException("Invalid parameter Stretching Ref");

    return StretchingVoAssembler.create((Stretching) getDomainFactory().getDomainObject(Stretching.class, stretchingRef.getID_Stretching()));
}