Java 类ims.clinical.vo.domain.DischargeFuturePlanSthkVoAssembler 实例源码

项目:AvoinApotti    文件:EDischargeFuturePlanSthkComponentImpl.java   
public ims.clinical.vo.DischargeFuturePlanSthkVo getFuturePlan(ims.core.admin.vo.CareContextRefVo careContext)
{
    // Check passed care context
    if (careContext == null || !careContext.getID_CareContextIsNotNull())
        throw new DomainRuntimeException("DOMAIN getFuturePlan() - Selected care context is null");

    // Build query and parameter to retrieve the record from database
    String query = "from FuturePlan as futurePlan where futurePlan.careContext.id = :ID";
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("ID");
    paramValues.add(careContext.getID_CareContext());

    // Query database for the record
    // Create the VO form the record database
    return DischargeFuturePlanSthkVoAssembler.create((FuturePlan) getDomainFactory().findFirst(query, paramNames, paramValues));
}
项目:openMAXIMS    文件:EDischargeFuturePlanSthkComponentImpl.java   
public ims.clinical.vo.DischargeFuturePlanSthkVo getFuturePlan(ims.core.admin.vo.CareContextRefVo careContext)
{
    // Check passed care context
    if (careContext == null || !careContext.getID_CareContextIsNotNull())
        throw new DomainRuntimeException("DOMAIN getFuturePlan() - Selected care context is null");

    // Build query and parameter to retrieve the record from database
    String query = "from FuturePlan as futurePlan where futurePlan.careContext.id = :ID";
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("ID");
    paramValues.add(careContext.getID_CareContext());

    // Query database for the record
    // Create the VO form the record database
    return DischargeFuturePlanSthkVoAssembler.create((FuturePlan) getDomainFactory().findFirst(query, paramNames, paramValues));
}
项目:openMAXIMS    文件:EDischargeFuturePlanSthkComponentImpl.java   
public ims.clinical.vo.DischargeFuturePlanSthkVo getFuturePlan(ims.core.admin.vo.CareContextRefVo careContext)
{
    // Check passed care context
    if (careContext == null || !careContext.getID_CareContextIsNotNull())
        throw new DomainRuntimeException("DOMAIN getFuturePlan() - Selected care context is null");

    // Build query and parameter to retrieve the record from database
    String query = "from FuturePlan as futurePlan where futurePlan.careContext.id = :ID";
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("ID");
    paramValues.add(careContext.getID_CareContext());

    // Query database for the record
    // Create the VO form the record database
    return DischargeFuturePlanSthkVoAssembler.create((FuturePlan) getDomainFactory().findFirst(query, paramNames, paramValues));
}
项目:openmaxims-linux    文件:EDischargeFuturePlanSthkComponentImpl.java   
public ims.clinical.vo.DischargeFuturePlanSthkVo getFuturePlan(ims.core.admin.vo.CareContextRefVo careContext)
{
    // Check passed care context
    if (careContext == null || !careContext.getID_CareContextIsNotNull())
        throw new DomainRuntimeException("DOMAIN getFuturePlan() - Selected care context is null");

    // Build query and parameter to retrieve the record from database
    String query = "from FuturePlan as futurePlan where futurePlan.careContext.id = :ID";
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("ID");
    paramValues.add(careContext.getID_CareContext());

    // Query database for the record
    // Create the VO form the record database
    return DischargeFuturePlanSthkVoAssembler.create((FuturePlan) getDomainFactory().findFirst(query, paramNames, paramValues));
}
项目:AvoinApotti    文件:EDischargeFuturePlanSthkComponentImpl.java   
public DischargeFuturePlanSthkVo saveFuturePlan(DischargeFuturePlanSthkVo futurePlan, EDischargeSTHKSummaryVo dischargeSummary)
                                                                                                                throws  StaleObjectException,
                                                                                                                        ForeignKeyViolationException,
                                                                                                                        UniqueKeyViolationException
{
    // Check for null VO passed to save
    if (futurePlan == null)
        throw new DomainRuntimeException("DOMAIN saveFuturePlan() - Can not save a null object");

    // Check if the VO is validated
    if (!futurePlan.isValidated())
        throw new DomainRuntimeException("DOMAIN saveFuturePlan() - Value object to save is not validated");


    // Extract domain object needed
    DomainFactory domainFactory = getDomainFactory();
    FuturePlan futurePlanDomObj = DischargeFuturePlanSthkVoAssembler.extractFuturePlan(domainFactory, futurePlan);

    // Save domain object
    domainFactory.save(futurePlanDomObj);

    futurePlan = DischargeFuturePlanSthkVoAssembler.create(futurePlanDomObj);

    IEDischargeHelper impl = (IEDischargeHelper) getDomainImpl(EDischargeHelper.class);
    impl.updateSummaryIfRequired(futurePlan, dischargeSummary, getDomainFactory());

    // Return a refreshed version of the VO
    return futurePlan;
}
项目:openMAXIMS    文件:EDischargeFuturePlanSthkComponentImpl.java   
public DischargeFuturePlanSthkVo saveFuturePlan(DischargeFuturePlanSthkVo futurePlan, EDischargeSTHKSummaryVo dischargeSummary)
                                                                                                                throws  StaleObjectException,
                                                                                                                        ForeignKeyViolationException,
                                                                                                                        UniqueKeyViolationException
{
    // Check for null VO passed to save
    if (futurePlan == null)
        throw new DomainRuntimeException("DOMAIN saveFuturePlan() - Can not save a null object");

    // Check if the VO is validated
    if (!futurePlan.isValidated())
        throw new DomainRuntimeException("DOMAIN saveFuturePlan() - Value object to save is not validated");


    // Extract domain object needed
    DomainFactory domainFactory = getDomainFactory();
    FuturePlan futurePlanDomObj = DischargeFuturePlanSthkVoAssembler.extractFuturePlan(domainFactory, futurePlan);

    // Save domain object
    domainFactory.save(futurePlanDomObj);

    futurePlan = DischargeFuturePlanSthkVoAssembler.create(futurePlanDomObj);

    IEDischargeHelper impl = (IEDischargeHelper) getDomainImpl(EDischargeHelper.class);
    impl.updateSummaryIfRequired(futurePlan, dischargeSummary, getDomainFactory());

    // Return a refreshed version of the VO
    return futurePlan;
}
项目:openMAXIMS    文件:EDischargeFuturePlanSthkComponentImpl.java   
public DischargeFuturePlanSthkVo saveFuturePlan(DischargeFuturePlanSthkVo futurePlan, EDischargeSTHKSummaryVo dischargeSummary)
                                                                                                                throws  StaleObjectException,
                                                                                                                        ForeignKeyViolationException,
                                                                                                                        UniqueKeyViolationException
{
    // Check for null VO passed to save
    if (futurePlan == null)
        throw new DomainRuntimeException("DOMAIN saveFuturePlan() - Can not save a null object");

    // Check if the VO is validated
    if (!futurePlan.isValidated())
        throw new DomainRuntimeException("DOMAIN saveFuturePlan() - Value object to save is not validated");


    // Extract domain object needed
    DomainFactory domainFactory = getDomainFactory();
    FuturePlan futurePlanDomObj = DischargeFuturePlanSthkVoAssembler.extractFuturePlan(domainFactory, futurePlan);

    // Save domain object
    domainFactory.save(futurePlanDomObj);

    futurePlan = DischargeFuturePlanSthkVoAssembler.create(futurePlanDomObj);

    IEDischargeHelper impl = (IEDischargeHelper) getDomainImpl(EDischargeHelper.class);
    impl.updateSummaryIfRequired(futurePlan, dischargeSummary, getDomainFactory());

    // Return a refreshed version of the VO
    return futurePlan;
}
项目:openmaxims-linux    文件:EDischargeFuturePlanSthkComponentImpl.java   
public DischargeFuturePlanSthkVo saveFuturePlan(DischargeFuturePlanSthkVo futurePlan, EDischargeSTHKSummaryVo dischargeSummary)
                                                                                                                throws  StaleObjectException,
                                                                                                                        ForeignKeyViolationException,
                                                                                                                        UniqueKeyViolationException
{
    // Check for null VO passed to save
    if (futurePlan == null)
        throw new DomainRuntimeException("DOMAIN saveFuturePlan() - Can not save a null object");

    // Check if the VO is validated
    if (!futurePlan.isValidated())
        throw new DomainRuntimeException("DOMAIN saveFuturePlan() - Value object to save is not validated");


    // Extract domain object needed
    DomainFactory domainFactory = getDomainFactory();
    FuturePlan futurePlanDomObj = DischargeFuturePlanSthkVoAssembler.extractFuturePlan(domainFactory, futurePlan);

    // Save domain object
    domainFactory.save(futurePlanDomObj);

    futurePlan = DischargeFuturePlanSthkVoAssembler.create(futurePlanDomObj);

    IEDischargeHelper impl = (IEDischargeHelper) getDomainImpl(EDischargeHelper.class);
    impl.updateSummaryIfRequired(futurePlan, dischargeSummary, getDomainFactory());

    // Return a refreshed version of the VO
    return futurePlan;
}