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

项目:AvoinApotti    文件:GoalPlanningImpl.java   
/**
 *  Function used to save a PatientGoalTarget to database
 */
public PatientGoalTargetVo savePatientGoalTarget(PatientGoalTargetVo patientGoalTarget) throws StaleObjectException, ForeignKeyViolationException, UniqueKeyViolationException
{
    // Check if PatientGoalTargetVo was validated
    if (patientGoalTarget == null || !patientGoalTarget.isValidated())
    {
        throw new DomainRuntimeException("Logical error - PatientGoalTargetVo has not been validated");
    }

    // Extract a domain object from PatientGoalTargetVo
    DomainFactory factory = getDomainFactory();
    PatientGoalTarget doPatientGoalTarget = PatientGoalTargetVoAssembler.extractPatientGoalTarget(factory, patientGoalTarget);

    // Save to database
    factory.save(doPatientGoalTarget);

    // Return saved PatientGoalTargetVo (with ID from database)
    return PatientGoalTargetVoAssembler.create(doPatientGoalTarget);
}
项目:openMAXIMS    文件:GoalPlanningImpl.java   
/**
 *  Function used to save a PatientGoalTarget to database
 */
public PatientGoalTargetVo savePatientGoalTarget(PatientGoalTargetVo patientGoalTarget) throws StaleObjectException, ForeignKeyViolationException, UniqueKeyViolationException
{
    // Check if PatientGoalTargetVo was validated
    if (patientGoalTarget == null || !patientGoalTarget.isValidated())
    {
        throw new DomainRuntimeException("Logical error - PatientGoalTargetVo has not been validated");
    }

    // Extract a domain object from PatientGoalTargetVo
    DomainFactory factory = getDomainFactory();
    PatientGoalTarget doPatientGoalTarget = PatientGoalTargetVoAssembler.extractPatientGoalTarget(factory, patientGoalTarget);

    // Save to database
    factory.save(doPatientGoalTarget);

    // Return saved PatientGoalTargetVo (with ID from database)
    return PatientGoalTargetVoAssembler.create(doPatientGoalTarget);
}
项目:openMAXIMS    文件:GoalPlanningImpl.java   
/**
 *  Function used to save a PatientGoalTarget to database
 */
public PatientGoalTargetVo savePatientGoalTarget(PatientGoalTargetVo patientGoalTarget) throws StaleObjectException, ForeignKeyViolationException, UniqueKeyViolationException
{
    // Check if PatientGoalTargetVo was validated
    if (patientGoalTarget == null || !patientGoalTarget.isValidated())
    {
        throw new DomainRuntimeException("Logical error - PatientGoalTargetVo has not been validated");
    }

    // Extract a domain object from PatientGoalTargetVo
    DomainFactory factory = getDomainFactory();
    PatientGoalTarget doPatientGoalTarget = PatientGoalTargetVoAssembler.extractPatientGoalTarget(factory, patientGoalTarget);

    // Save to database
    factory.save(doPatientGoalTarget);

    // Return saved PatientGoalTargetVo (with ID from database)
    return PatientGoalTargetVoAssembler.create(doPatientGoalTarget);
}
项目:openmaxims-linux    文件:GoalPlanningImpl.java   
/**
 *  Function used to save a PatientGoalTarget to database
 */
public PatientGoalTargetVo savePatientGoalTarget(PatientGoalTargetVo patientGoalTarget) throws StaleObjectException, ForeignKeyViolationException, UniqueKeyViolationException
{
    // Check if PatientGoalTargetVo was validated
    if (patientGoalTarget == null || !patientGoalTarget.isValidated())
    {
        throw new DomainRuntimeException("Logical error - PatientGoalTargetVo has not been validated");
    }

    // Extract a domain object from PatientGoalTargetVo
    DomainFactory factory = getDomainFactory();
    PatientGoalTarget doPatientGoalTarget = PatientGoalTargetVoAssembler.extractPatientGoalTarget(factory, patientGoalTarget);

    // Save to database
    factory.save(doPatientGoalTarget);

    // Return saved PatientGoalTargetVo (with ID from database)
    return PatientGoalTargetVoAssembler.create(doPatientGoalTarget);
}
项目:AvoinApotti    文件:GoalPlanningImpl.java   
/**
 * Function used to get a PatientGoalTarget from database
 */
public PatientGoalTargetVo getPatientGoalTarget(PatientGoalTargetRefVo patientGoalTargetRef)
{
    // If no PatientGoalTargetRefVo is provided or no ID is present return null
    if (patientGoalTargetRef == null || !patientGoalTargetRef.getID_PatientGoalTargetIsNotNull())
        return null;

    // Return PatientGoalTarget based on ID
    return PatientGoalTargetVoAssembler.create((PatientGoalTarget) getDomainFactory().getDomainObject(PatientGoalTarget.class, patientGoalTargetRef.getID_PatientGoalTarget()));
}
项目:openMAXIMS    文件:GoalPlanningImpl.java   
/**
 * Function used to get a PatientGoalTarget from database
 */
public PatientGoalTargetVo getPatientGoalTarget(PatientGoalTargetRefVo patientGoalTargetRef)
{
    // If no PatientGoalTargetRefVo is provided or no ID is present return null
    if (patientGoalTargetRef == null || !patientGoalTargetRef.getID_PatientGoalTargetIsNotNull())
        return null;

    // Return PatientGoalTarget based on ID
    return PatientGoalTargetVoAssembler.create((PatientGoalTarget) getDomainFactory().getDomainObject(PatientGoalTarget.class, patientGoalTargetRef.getID_PatientGoalTarget()));
}
项目:openMAXIMS    文件:GoalPlanningImpl.java   
/**
 * Function used to get a PatientGoalTarget from database
 */
public PatientGoalTargetVo getPatientGoalTarget(PatientGoalTargetRefVo patientGoalTargetRef)
{
    // If no PatientGoalTargetRefVo is provided or no ID is present return null
    if (patientGoalTargetRef == null || !patientGoalTargetRef.getID_PatientGoalTargetIsNotNull())
        return null;

    // Return PatientGoalTarget based on ID
    return PatientGoalTargetVoAssembler.create((PatientGoalTarget) getDomainFactory().getDomainObject(PatientGoalTarget.class, patientGoalTargetRef.getID_PatientGoalTarget()));
}
项目:openmaxims-linux    文件:GoalPlanningImpl.java   
/**
 * Function used to get a PatientGoalTarget from database
 */
public PatientGoalTargetVo getPatientGoalTarget(PatientGoalTargetRefVo patientGoalTargetRef)
{
    // If no PatientGoalTargetRefVo is provided or no ID is present return null
    if (patientGoalTargetRef == null || !patientGoalTargetRef.getID_PatientGoalTargetIsNotNull())
        return null;

    // Return PatientGoalTarget based on ID
    return PatientGoalTargetVoAssembler.create((PatientGoalTarget) getDomainFactory().getDomainObject(PatientGoalTarget.class, patientGoalTargetRef.getID_PatientGoalTarget()));
}