Java 类ims.nursing.vo.domain.AdmissionDetailsVoAssembler 实例源码

项目:AvoinApotti    文件:NursingAdmissionImpl.java   
public AdmissionDetailsVo getNursingAdmission(CareContextLiteVo voCareContextLite) 
    {
    if(voCareContextLite == null)
        throw new CodingRuntimeException("Contact not Provided");

    DomainFactory factory = getDomainFactory();

    //the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
    List admisDetails =   factory.find(" from AdmissionDetails ad where ad.careContext.id = :idCareContext )",
            new String[]{"idCareContext" },
            new Object[]{ voCareContextLite.getID_CareContext()});

    AdmissionDetailsVoCollection voAdmisDetails = AdmissionDetailsVoAssembler.createAdmissionDetailsVoCollectionFromAdmissionDetails(admisDetails); 

    if(voAdmisDetails.size()>0)
        return voAdmisDetails.get(0);
    else 
        return null;
}
项目:AvoinApotti    文件:NursingAdmissionImpl.java   
public AdmissionDetailsVo saveNursingAdmission(AdmissionDetailsVo voAdmissionDetails) throws StaleObjectException 
{
    if (!voAdmissionDetails.isValidated())
    {
        throw new DomainRuntimeException("AdmissionDetails has not been validated");
    }
    DomainFactory factory = getDomainFactory();

    AdmissionDetails domAdmisDetails = AdmissionDetailsVoAssembler.extractAdmissionDetails(factory, voAdmissionDetails);

    factory.save(domAdmisDetails);

    AdmissionDetailsVo voAdmisDetails = AdmissionDetailsVoAssembler.create(domAdmisDetails); 

    return voAdmisDetails;
}
项目:openMAXIMS    文件:NursingAdmissionImpl.java   
public AdmissionDetailsVo getNursingAdmission(CareContextLiteVo voCareContextLite) 
    {
    if(voCareContextLite == null)
        throw new CodingRuntimeException("Contact not Provided");

    DomainFactory factory = getDomainFactory();

    //the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
    List admisDetails =   factory.find(" from AdmissionDetails ad where ad.careContext.id = :idCareContext )",
            new String[]{"idCareContext" },
            new Object[]{ voCareContextLite.getID_CareContext()});

    AdmissionDetailsVoCollection voAdmisDetails = AdmissionDetailsVoAssembler.createAdmissionDetailsVoCollectionFromAdmissionDetails(admisDetails); 

    if(voAdmisDetails.size()>0)
        return voAdmisDetails.get(0);
    else 
        return null;
}
项目:openMAXIMS    文件:NursingAdmissionImpl.java   
public AdmissionDetailsVo saveNursingAdmission(AdmissionDetailsVo voAdmissionDetails) throws StaleObjectException 
{
    if (!voAdmissionDetails.isValidated())
    {
        throw new DomainRuntimeException("AdmissionDetails has not been validated");
    }
    DomainFactory factory = getDomainFactory();

    AdmissionDetails domAdmisDetails = AdmissionDetailsVoAssembler.extractAdmissionDetails(factory, voAdmissionDetails);

    factory.save(domAdmisDetails);

    AdmissionDetailsVo voAdmisDetails = AdmissionDetailsVoAssembler.create(domAdmisDetails); 

    return voAdmisDetails;
}
项目:openMAXIMS    文件:NursingAdmissionImpl.java   
public AdmissionDetailsVo getNursingAdmission(CareContextLiteVo voCareContextLite) 
    {
    if(voCareContextLite == null)
        throw new CodingRuntimeException("Contact not Provided");

    DomainFactory factory = getDomainFactory();

    //the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
    List admisDetails =   factory.find(" from AdmissionDetails ad where ad.careContext.id = :idCareContext )",
            new String[]{"idCareContext" },
            new Object[]{ voCareContextLite.getID_CareContext()});

    AdmissionDetailsVoCollection voAdmisDetails = AdmissionDetailsVoAssembler.createAdmissionDetailsVoCollectionFromAdmissionDetails(admisDetails); 

    if(voAdmisDetails.size()>0)
        return voAdmisDetails.get(0);
    else 
        return null;
}
项目:openMAXIMS    文件:NursingAdmissionImpl.java   
public AdmissionDetailsVo saveNursingAdmission(AdmissionDetailsVo voAdmissionDetails) throws StaleObjectException 
{
    if (!voAdmissionDetails.isValidated())
    {
        throw new DomainRuntimeException("AdmissionDetails has not been validated");
    }
    DomainFactory factory = getDomainFactory();

    AdmissionDetails domAdmisDetails = AdmissionDetailsVoAssembler.extractAdmissionDetails(factory, voAdmissionDetails);

    factory.save(domAdmisDetails);

    AdmissionDetailsVo voAdmisDetails = AdmissionDetailsVoAssembler.create(domAdmisDetails); 

    return voAdmisDetails;
}
项目:openmaxims-linux    文件:NursingAdmissionImpl.java   
public AdmissionDetailsVo getNursingAdmission(CareContextLiteVo voCareContextLite) 
    {
    if(voCareContextLite == null)
        throw new CodingRuntimeException("Contact not Provided");

    DomainFactory factory = getDomainFactory();

    //the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
    List admisDetails =   factory.find(" from AdmissionDetails ad where ad.careContext.id = :idCareContext )",
            new String[]{"idCareContext" },
            new Object[]{ voCareContextLite.getID_CareContext()});

    AdmissionDetailsVoCollection voAdmisDetails = AdmissionDetailsVoAssembler.createAdmissionDetailsVoCollectionFromAdmissionDetails(admisDetails); 

    if(voAdmisDetails.size()>0)
        return voAdmisDetails.get(0);
    else 
        return null;
}
项目:openmaxims-linux    文件:NursingAdmissionImpl.java   
public AdmissionDetailsVo saveNursingAdmission(AdmissionDetailsVo voAdmissionDetails) throws StaleObjectException 
{
    if (!voAdmissionDetails.isValidated())
    {
        throw new DomainRuntimeException("AdmissionDetails has not been validated");
    }
    DomainFactory factory = getDomainFactory();

    AdmissionDetails domAdmisDetails = AdmissionDetailsVoAssembler.extractAdmissionDetails(factory, voAdmissionDetails);

    factory.save(domAdmisDetails);

    AdmissionDetailsVo voAdmisDetails = AdmissionDetailsVoAssembler.create(domAdmisDetails); 

    return voAdmisDetails;
}