Java 类ims.ocrr.vo.domain.ResultCommentsVoAssembler 实例源码

项目:AvoinApotti    文件:ResultCommentsDialogImpl.java   
public ResultCommentsVo saveEdit(ResultCommentsVo comment) throws ims.domain.exceptions.StaleObjectException
{
    if (comment == null)
        throw new DomainRuntimeException("Can not save empty record.");

    if (!comment.isValidated())
        throw new DomainRuntimeException("Record to save is not validated.");

    DomainFactory factory = getDomainFactory();

    ResultConclusionAndActionComment domComment = ResultCommentsVoAssembler.extractResultConclusionAndActionComment(factory, comment);

    // Check for stale comment (deleted)
    if (domComment == null)
        throw new StaleObjectException(domComment);

    factory.save(domComment);

    return ResultCommentsVoAssembler.create(domComment);
}
项目:openMAXIMS    文件:ResultCommentsDialogImpl.java   
public ResultCommentsVo saveEdit(ResultCommentsVo comment) throws ims.domain.exceptions.StaleObjectException
{
    if (comment == null)
        throw new DomainRuntimeException("Can not save empty record.");

    if (!comment.isValidated())
        throw new DomainRuntimeException("Record to save is not validated.");

    DomainFactory factory = getDomainFactory();

    ResultConclusionAndActionComment domComment = ResultCommentsVoAssembler.extractResultConclusionAndActionComment(factory, comment);

    // Check for stale comment (deleted)
    if (domComment == null)
        throw new StaleObjectException(domComment);

    factory.save(domComment);

    return ResultCommentsVoAssembler.create(domComment);
}
项目:openMAXIMS    文件:ResultCommentsDialogImpl.java   
public ResultCommentsVo saveEdit(ResultCommentsVo comment) throws ims.domain.exceptions.StaleObjectException
{
    if (comment == null)
        throw new DomainRuntimeException("Can not save empty record.");

    if (!comment.isValidated())
        throw new DomainRuntimeException("Record to save is not validated.");

    DomainFactory factory = getDomainFactory();

    ResultConclusionAndActionComment domComment = ResultCommentsVoAssembler.extractResultConclusionAndActionComment(factory, comment);

    // Check for stale comment (deleted)
    if (domComment == null)
        throw new StaleObjectException(domComment);

    factory.save(domComment);

    return ResultCommentsVoAssembler.create(domComment);
}
项目:openmaxims-linux    文件:ResultCommentsDialogImpl.java   
public ResultCommentsVo saveEdit(ResultCommentsVo comment) throws ims.domain.exceptions.StaleObjectException
{
    if (comment == null)
        throw new DomainRuntimeException("Can not save empty record.");

    if (!comment.isValidated())
        throw new DomainRuntimeException("Record to save is not validated.");

    DomainFactory factory = getDomainFactory();

    ResultConclusionAndActionComment domComment = ResultCommentsVoAssembler.extractResultConclusionAndActionComment(factory, comment);

    // Check for stale comment (deleted)
    if (domComment == null)
        throw new StaleObjectException(domComment);

    factory.save(domComment);

    return ResultCommentsVoAssembler.create(domComment);
}
项目:AvoinApotti    文件:ResultCommentsDialogImpl.java   
private ResultCommentsVoCollection listCommentsFromOrderInvestigation(OcsPathRadResultVo result)
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();
    query.append("SELECT comm FROM OrderInvestigation AS inv LEFT JOIN inv.resultConclusionComments AS comm ");
    query.append("WHERE inv.id = :INV_ID");
    query.append(" order by comm.authoringInformation.authoringDateTime desc"); //WDEV-14077 

    return ResultCommentsVoAssembler.createResultCommentsVoCollectionFromResultConclusionAndActionComment(getDomainFactory().find(query.toString(), "INV_ID", result.getOrderInvestigation().getID_OrderInvestigation()));
}
项目:AvoinApotti    文件:ResultCommentsDialogImpl.java   
private ResultCommentsVoCollection listCommentsFromOrderSpeciment(OcsPathRadResultVo result)
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();
    query.append("SELECT comm FROM OrderInvestigation AS inv LEFT JOIN inv.specimen AS spec LEFT JOIN spec.resultConclusionComments AS comm ");
    query.append("WHERE inv.id = :INV_ID");
    query.append(" order by comm.authoringInformation.authoringDateTime desc"); //WDEV-14077 

    return ResultCommentsVoAssembler.createResultCommentsVoCollectionFromResultConclusionAndActionComment(getDomainFactory().find(query.toString(), "INV_ID", result.getOrderInvestigation().getID_OrderInvestigation()));
}
项目:AvoinApotti    文件:ResultCommentsDialogImpl.java   
public ResultCommentsVo getComment(ResultConclusionAndActionCommentRefVo comment)
{
    if (comment == null || !comment.getID_ResultConclusionAndActionCommentIsNotNull())
        return null;

    return ResultCommentsVoAssembler.create((ResultConclusionAndActionComment) getDomainFactory().getDomainObject(ResultConclusionAndActionComment.class, comment.getID_ResultConclusionAndActionComment()));
}
项目:AvoinApotti    文件:ResultCommentsDialogImpl.java   
@SuppressWarnings("unchecked")
private ResultCommentsVo saveNewCommentToOrderInvestigation(OcsPathRadResultVo result, ResultCommentsVo comment) throws StaleObjectException
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        throw new DomainRuntimeException("Can not add comment to null parent.");

    if (comment == null)
        throw new DomainRuntimeException("Can not save null comment record.");

    if (!comment.isValidated())
        throw new DomainRuntimeException("Comment record is not validated.");


    DomainFactory factory = getDomainFactory();

    // Extract comment domain object
    ResultConclusionAndActionComment domainComment = ResultCommentsVoAssembler.extractResultConclusionAndActionComment(factory, comment);
    // Commit comment to data base
    factory.save(domainComment);
    // Get order investigation from data base
    OrderInvestigation domOrderInvestigation = (OrderInvestigation) factory.getDomainObject(OrderInvestigation.class, result.getOrderInvestigation().getID_OrderInvestigation());
    domOrderInvestigation.getResultConclusionComments().add(domainComment);
    factory.save(domOrderInvestigation);

    // Return saved comment
    return ResultCommentsVoAssembler.create(domainComment);
}
项目:AvoinApotti    文件:ResultCommentsDialogImpl.java   
@SuppressWarnings("unchecked")
private ResultCommentsVo saveNewCommentToOrderSpecimen(OcsPathRadResultVo result, ResultCommentsVo comment) throws StaleObjectException
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        throw new DomainRuntimeException("Can not add comment to null parent");

    if (comment == null)
        throw new DomainRuntimeException("Can not save null comment record.");

    if (!comment.isValidated())
        throw new DomainRuntimeException("Comment record is not validated");

    DomainFactory factory = getDomainFactory();

    // Extract comment domain object
    ResultConclusionAndActionComment domComment = ResultCommentsVoAssembler.extractResultConclusionAndActionComment(factory, comment);
    // Commit comment to data base
    factory.save(domComment);

    // Get order investigation from data base
    OrderInvestigation domOrderInvestigation = (OrderInvestigation) factory.getDomainObject(OrderInvestigation.class, result.getOrderInvestigation().getID_OrderInvestigation());
    // Get specimen domain object
    OrderSpecimen domSpecimen = (OrderSpecimen) domOrderInvestigation.getSpecimen().get(0);
    domSpecimen.getResultConclusionComments().add(domComment);
    factory.save(domSpecimen);

    // Return saved comment
    return ResultCommentsVoAssembler.create(domComment);
}
项目:openMAXIMS    文件:ResultCommentsDialogImpl.java   
private ResultCommentsVoCollection listCommentsFromOrderInvestigation(OcsPathRadResultVo result)
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();
    query.append("SELECT comm FROM OrderInvestigation AS inv LEFT JOIN inv.resultConclusionComments AS comm ");
    query.append("WHERE inv.id = :INV_ID");
    query.append(" order by comm.authoringInformation.authoringDateTime desc"); //WDEV-14077 

    return ResultCommentsVoAssembler.createResultCommentsVoCollectionFromResultConclusionAndActionComment(getDomainFactory().find(query.toString(), "INV_ID", result.getOrderInvestigation().getID_OrderInvestigation()));
}
项目:openMAXIMS    文件:ResultCommentsDialogImpl.java   
private ResultCommentsVoCollection listCommentsFromOrderSpeciment(OcsPathRadResultVo result)
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();
    query.append("SELECT comm FROM OrderInvestigation AS inv LEFT JOIN inv.specimen AS spec LEFT JOIN spec.resultConclusionComments AS comm ");
    query.append("WHERE inv.id = :INV_ID");
    query.append(" order by comm.authoringInformation.authoringDateTime desc"); //WDEV-14077 

    return ResultCommentsVoAssembler.createResultCommentsVoCollectionFromResultConclusionAndActionComment(getDomainFactory().find(query.toString(), "INV_ID", result.getOrderInvestigation().getID_OrderInvestigation()));
}
项目:openMAXIMS    文件:ResultCommentsDialogImpl.java   
public ResultCommentsVo getComment(ResultConclusionAndActionCommentRefVo comment)
{
    if (comment == null || !comment.getID_ResultConclusionAndActionCommentIsNotNull())
        return null;

    return ResultCommentsVoAssembler.create((ResultConclusionAndActionComment) getDomainFactory().getDomainObject(ResultConclusionAndActionComment.class, comment.getID_ResultConclusionAndActionComment()));
}
项目:openMAXIMS    文件:ResultCommentsDialogImpl.java   
@SuppressWarnings("unchecked")
private ResultCommentsVo saveNewCommentToOrderInvestigation(OcsPathRadResultVo result, ResultCommentsVo comment) throws StaleObjectException
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        throw new DomainRuntimeException("Can not add comment to null parent.");

    if (comment == null)
        throw new DomainRuntimeException("Can not save null comment record.");

    if (!comment.isValidated())
        throw new DomainRuntimeException("Comment record is not validated.");


    DomainFactory factory = getDomainFactory();

    // Extract comment domain object
    ResultConclusionAndActionComment domainComment = ResultCommentsVoAssembler.extractResultConclusionAndActionComment(factory, comment);
    // Commit comment to data base
    factory.save(domainComment);
    // Get order investigation from data base
    OrderInvestigation domOrderInvestigation = (OrderInvestigation) factory.getDomainObject(OrderInvestigation.class, result.getOrderInvestigation().getID_OrderInvestigation());
    domOrderInvestigation.getResultConclusionComments().add(domainComment);
    factory.save(domOrderInvestigation);

    // Return saved comment
    return ResultCommentsVoAssembler.create(domainComment);
}
项目:openMAXIMS    文件:ResultCommentsDialogImpl.java   
@SuppressWarnings("unchecked")
private ResultCommentsVo saveNewCommentToOrderSpecimen(OcsPathRadResultVo result, ResultCommentsVo comment) throws StaleObjectException
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        throw new DomainRuntimeException("Can not add comment to null parent");

    if (comment == null)
        throw new DomainRuntimeException("Can not save null comment record.");

    if (!comment.isValidated())
        throw new DomainRuntimeException("Comment record is not validated");

    DomainFactory factory = getDomainFactory();

    // Extract comment domain object
    ResultConclusionAndActionComment domComment = ResultCommentsVoAssembler.extractResultConclusionAndActionComment(factory, comment);
    // Commit comment to data base
    factory.save(domComment);

    // Get order investigation from data base
    OrderInvestigation domOrderInvestigation = (OrderInvestigation) factory.getDomainObject(OrderInvestigation.class, result.getOrderInvestigation().getID_OrderInvestigation());
    // Get specimen domain object
    OrderSpecimen domSpecimen = (OrderSpecimen) domOrderInvestigation.getSpecimen().get(0);
    domSpecimen.getResultConclusionComments().add(domComment);
    factory.save(domSpecimen);

    // Return saved comment
    return ResultCommentsVoAssembler.create(domComment);
}
项目:openMAXIMS    文件:ResultCommentsDialogImpl.java   
private ResultCommentsVoCollection listCommentsFromOrderInvestigation(OcsPathRadResultVo result)
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();
    query.append("SELECT comm FROM OrderInvestigation AS inv LEFT JOIN inv.resultConclusionComments AS comm ");
    query.append("WHERE inv.id = :INV_ID");
    query.append(" order by comm.authoringInformation.authoringDateTime desc"); //WDEV-14077 

    return ResultCommentsVoAssembler.createResultCommentsVoCollectionFromResultConclusionAndActionComment(getDomainFactory().find(query.toString(), "INV_ID", result.getOrderInvestigation().getID_OrderInvestigation()));
}
项目:openMAXIMS    文件:ResultCommentsDialogImpl.java   
private ResultCommentsVoCollection listCommentsFromOrderSpeciment(OcsPathRadResultVo result)
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();
    query.append("SELECT comm FROM OrderInvestigation AS inv LEFT JOIN inv.specimen AS spec LEFT JOIN spec.resultConclusionComments AS comm ");
    query.append("WHERE inv.id = :INV_ID");
    query.append(" order by comm.authoringInformation.authoringDateTime desc"); //WDEV-14077 

    return ResultCommentsVoAssembler.createResultCommentsVoCollectionFromResultConclusionAndActionComment(getDomainFactory().find(query.toString(), "INV_ID", result.getOrderInvestigation().getID_OrderInvestigation()));
}
项目:openMAXIMS    文件:ResultCommentsDialogImpl.java   
public ResultCommentsVo getComment(ResultConclusionAndActionCommentRefVo comment)
{
    if (comment == null || !comment.getID_ResultConclusionAndActionCommentIsNotNull())
        return null;

    return ResultCommentsVoAssembler.create((ResultConclusionAndActionComment) getDomainFactory().getDomainObject(ResultConclusionAndActionComment.class, comment.getID_ResultConclusionAndActionComment()));
}
项目:openMAXIMS    文件:ResultCommentsDialogImpl.java   
@SuppressWarnings("unchecked")
private ResultCommentsVo saveNewCommentToOrderInvestigation(OcsPathRadResultVo result, ResultCommentsVo comment) throws StaleObjectException
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        throw new DomainRuntimeException("Can not add comment to null parent.");

    if (comment == null)
        throw new DomainRuntimeException("Can not save null comment record.");

    if (!comment.isValidated())
        throw new DomainRuntimeException("Comment record is not validated.");


    DomainFactory factory = getDomainFactory();

    // Extract comment domain object
    ResultConclusionAndActionComment domainComment = ResultCommentsVoAssembler.extractResultConclusionAndActionComment(factory, comment);
    // Commit comment to data base
    factory.save(domainComment);
    // Get order investigation from data base
    OrderInvestigation domOrderInvestigation = (OrderInvestigation) factory.getDomainObject(OrderInvestigation.class, result.getOrderInvestigation().getID_OrderInvestigation());
    domOrderInvestigation.getResultConclusionComments().add(domainComment);
    factory.save(domOrderInvestigation);

    // Return saved comment
    return ResultCommentsVoAssembler.create(domainComment);
}
项目:openMAXIMS    文件:ResultCommentsDialogImpl.java   
@SuppressWarnings("unchecked")
private ResultCommentsVo saveNewCommentToOrderSpecimen(OcsPathRadResultVo result, ResultCommentsVo comment) throws StaleObjectException
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        throw new DomainRuntimeException("Can not add comment to null parent");

    if (comment == null)
        throw new DomainRuntimeException("Can not save null comment record.");

    if (!comment.isValidated())
        throw new DomainRuntimeException("Comment record is not validated");

    DomainFactory factory = getDomainFactory();

    // Extract comment domain object
    ResultConclusionAndActionComment domComment = ResultCommentsVoAssembler.extractResultConclusionAndActionComment(factory, comment);
    // Commit comment to data base
    factory.save(domComment);

    // Get order investigation from data base
    OrderInvestigation domOrderInvestigation = (OrderInvestigation) factory.getDomainObject(OrderInvestigation.class, result.getOrderInvestigation().getID_OrderInvestigation());
    // Get specimen domain object
    OrderSpecimen domSpecimen = (OrderSpecimen) domOrderInvestigation.getSpecimen().get(0);
    domSpecimen.getResultConclusionComments().add(domComment);
    factory.save(domSpecimen);

    // Return saved comment
    return ResultCommentsVoAssembler.create(domComment);
}
项目:openmaxims-linux    文件:ResultCommentsDialogImpl.java   
private ResultCommentsVoCollection listCommentsFromOrderInvestigation(OcsPathRadResultVo result)
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();
    query.append("SELECT comm FROM OrderInvestigation AS inv LEFT JOIN inv.resultConclusionComments AS comm ");
    query.append("WHERE inv.id = :INV_ID");
    query.append(" order by comm.authoringInformation.authoringDateTime desc"); //WDEV-14077 

    return ResultCommentsVoAssembler.createResultCommentsVoCollectionFromResultConclusionAndActionComment(getDomainFactory().find(query.toString(), "INV_ID", result.getOrderInvestigation().getID_OrderInvestigation()));
}
项目:openmaxims-linux    文件:ResultCommentsDialogImpl.java   
private ResultCommentsVoCollection listCommentsFromOrderSpeciment(OcsPathRadResultVo result)
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();
    query.append("SELECT comm FROM OrderInvestigation AS inv LEFT JOIN inv.specimen AS spec LEFT JOIN spec.resultConclusionComments AS comm ");
    query.append("WHERE inv.id = :INV_ID");
    query.append(" order by comm.authoringInformation.authoringDateTime desc"); //WDEV-14077 

    return ResultCommentsVoAssembler.createResultCommentsVoCollectionFromResultConclusionAndActionComment(getDomainFactory().find(query.toString(), "INV_ID", result.getOrderInvestigation().getID_OrderInvestigation()));
}
项目:openmaxims-linux    文件:ResultCommentsDialogImpl.java   
public ResultCommentsVo getComment(ResultConclusionAndActionCommentRefVo comment)
{
    if (comment == null || !comment.getID_ResultConclusionAndActionCommentIsNotNull())
        return null;

    return ResultCommentsVoAssembler.create((ResultConclusionAndActionComment) getDomainFactory().getDomainObject(ResultConclusionAndActionComment.class, comment.getID_ResultConclusionAndActionComment()));
}
项目:openmaxims-linux    文件:ResultCommentsDialogImpl.java   
@SuppressWarnings("unchecked")
private ResultCommentsVo saveNewCommentToOrderInvestigation(OcsPathRadResultVo result, ResultCommentsVo comment) throws StaleObjectException
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        throw new DomainRuntimeException("Can not add comment to null parent.");

    if (comment == null)
        throw new DomainRuntimeException("Can not save null comment record.");

    if (!comment.isValidated())
        throw new DomainRuntimeException("Comment record is not validated.");


    DomainFactory factory = getDomainFactory();

    // Extract comment domain object
    ResultConclusionAndActionComment domainComment = ResultCommentsVoAssembler.extractResultConclusionAndActionComment(factory, comment);
    // Commit comment to data base
    factory.save(domainComment);
    // Get order investigation from data base
    OrderInvestigation domOrderInvestigation = (OrderInvestigation) factory.getDomainObject(OrderInvestigation.class, result.getOrderInvestigation().getID_OrderInvestigation());
    domOrderInvestigation.getResultConclusionComments().add(domainComment);
    factory.save(domOrderInvestigation);

    // Return saved comment
    return ResultCommentsVoAssembler.create(domainComment);
}
项目:openmaxims-linux    文件:ResultCommentsDialogImpl.java   
@SuppressWarnings("unchecked")
private ResultCommentsVo saveNewCommentToOrderSpecimen(OcsPathRadResultVo result, ResultCommentsVo comment) throws StaleObjectException
{
    if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull())
        throw new DomainRuntimeException("Can not add comment to null parent");

    if (comment == null)
        throw new DomainRuntimeException("Can not save null comment record.");

    if (!comment.isValidated())
        throw new DomainRuntimeException("Comment record is not validated");

    DomainFactory factory = getDomainFactory();

    // Extract comment domain object
    ResultConclusionAndActionComment domComment = ResultCommentsVoAssembler.extractResultConclusionAndActionComment(factory, comment);
    // Commit comment to data base
    factory.save(domComment);

    // Get order investigation from data base
    OrderInvestigation domOrderInvestigation = (OrderInvestigation) factory.getDomainObject(OrderInvestigation.class, result.getOrderInvestigation().getID_OrderInvestigation());
    // Get specimen domain object
    OrderSpecimen domSpecimen = (OrderSpecimen) domOrderInvestigation.getSpecimen().get(0);
    domSpecimen.getResultConclusionComments().add(domComment);
    factory.save(domSpecimen);

    // Return saved comment
    return ResultCommentsVoAssembler.create(domComment);
}