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

项目:AvoinApotti    文件:DrawingConfigurationImpl.java   
/**
* Saves a Drawing Image Record
*/
public ims.core.vo.DrawingImageVo saveDrawingImage(ims.core.vo.DrawingImageVo drawingImage) throws StaleObjectException
{
    if(!drawingImage.isValidated())
        throw new DomainRuntimeException("Drawing Image Value Object not validated");

    DomainFactory factory = getDomainFactory();
    DrawingImage doDrawingImage = DrawingImageVoAssembler.extractDrawingImage(factory, drawingImage);

    if(doDrawingImage.getVersionNumber() == null)
        doDrawingImage.setVersionNumber(new Integer(1));
    else
        doDrawingImage.setVersionNumber(new Integer(drawingImage.getVersionNumber().intValue() + 1));

    try {
        factory.save(doDrawingImage);
    } catch (DomainException e) {
        throw new DomainRuntimeException("DomainException occurred " + e.getMessage());
    }

    drawingImage.setID_DrawingImage(doDrawingImage.getId());
    drawingImage.setVersionNumber(doDrawingImage.getVersionNumber());

    return drawingImage;
}
项目:openMAXIMS    文件:DrawingConfigurationImpl.java   
/**
* Saves a Drawing Image Record
*/
public ims.core.vo.DrawingImageVo saveDrawingImage(ims.core.vo.DrawingImageVo drawingImage) throws StaleObjectException
{
    if(!drawingImage.isValidated())
        throw new DomainRuntimeException("Drawing Image Value Object not validated");

    DomainFactory factory = getDomainFactory();
    DrawingImage doDrawingImage = DrawingImageVoAssembler.extractDrawingImage(factory, drawingImage);

    if(doDrawingImage.getVersionNumber() == null)
        doDrawingImage.setVersionNumber(new Integer(1));
    else
        doDrawingImage.setVersionNumber(new Integer(drawingImage.getVersionNumber().intValue() + 1));

    try {
        factory.save(doDrawingImage);
    } catch (DomainException e) {
        throw new DomainRuntimeException("DomainException occurred " + e.getMessage());
    }

    drawingImage.setID_DrawingImage(doDrawingImage.getId());
    drawingImage.setVersionNumber(doDrawingImage.getVersionNumber());

    return drawingImage;
}
项目:openMAXIMS    文件:DrawingConfigurationImpl.java   
/**
* Saves a Drawing Image Record
*/
public ims.core.vo.DrawingImageVo saveDrawingImage(ims.core.vo.DrawingImageVo drawingImage) throws StaleObjectException
{
    if(!drawingImage.isValidated())
        throw new DomainRuntimeException("Drawing Image Value Object not validated");

    DomainFactory factory = getDomainFactory();
    DrawingImage doDrawingImage = DrawingImageVoAssembler.extractDrawingImage(factory, drawingImage);

    if(doDrawingImage.getVersionNumber() == null)
        doDrawingImage.setVersionNumber(new Integer(1));
    else
        doDrawingImage.setVersionNumber(new Integer(drawingImage.getVersionNumber().intValue() + 1));

    try {
        factory.save(doDrawingImage);
    } catch (DomainException e) {
        throw new DomainRuntimeException("DomainException occurred " + e.getMessage());
    }

    drawingImage.setID_DrawingImage(doDrawingImage.getId());
    drawingImage.setVersionNumber(doDrawingImage.getVersionNumber());

    return drawingImage;
}
项目:openmaxims-linux    文件:DrawingConfigurationImpl.java   
/**
* Saves a Drawing Image Record
*/
public ims.core.vo.DrawingImageVo saveDrawingImage(ims.core.vo.DrawingImageVo drawingImage) throws StaleObjectException
{
    if(!drawingImage.isValidated())
        throw new DomainRuntimeException("Drawing Image Value Object not validated");

    DomainFactory factory = getDomainFactory();
    DrawingImage doDrawingImage = DrawingImageVoAssembler.extractDrawingImage(factory, drawingImage);

    if(doDrawingImage.getVersionNumber() == null)
        doDrawingImage.setVersionNumber(new Integer(1));
    else
        doDrawingImage.setVersionNumber(new Integer(drawingImage.getVersionNumber().intValue() + 1));

    try {
        factory.save(doDrawingImage);
    } catch (DomainException e) {
        throw new DomainRuntimeException("DomainException occurred " + e.getMessage());
    }

    drawingImage.setID_DrawingImage(doDrawingImage.getId());
    drawingImage.setVersionNumber(doDrawingImage.getVersionNumber());

    return drawingImage;
}