Java 类ims.therapies.vo.domain.AdaptationsVoAssembler 实例源码

项目:AvoinApotti    文件:AdaptationsImpl.java   
/**
* save an adaptation
*/
public ims.therapies.vo.AdaptationsVo save(ims.therapies.vo.AdaptationsVo voAdaptation) throws ims.domain.exceptions.StaleObjectException
{
    if(!voAdaptation.isValidated())
    {
        throw new DomainRuntimeException("Adaptation Value Object has not been validated");
    }

    DomainFactory factory = getDomainFactory();     
    ims.therapies.domain.objects.Adaptations adaptBo = AdaptationsVoAssembler.extractAdaptations(factory,voAdaptation);

    factory.save(adaptBo);

    return AdaptationsVoAssembler.create(adaptBo);      

}
项目:AvoinApotti    文件:AdaptationsImpl.java   
public AdaptationsVoCollection listByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();
    String query = "from Adaptations ad ";
    ArrayList markers= new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if(voCareContextRef != null)
    {
        hql.append(andStr + " ad.careContext.id = :cc");
        markers.add("cc");
        values.add(voCareContextRef.getID_CareContext());
    }

    if (markers.size() > 0) query += " where ";
    query += hql.toString();    

    java.util.List Adaptations = factory.find(query,markers,values);
    AdaptationsVoCollection voAdaptationsColl = AdaptationsVoAssembler.createAdaptationsVoCollectionFromAdaptations(Adaptations);

    return voAdaptationsColl;

}
项目:openMAXIMS    文件:AdaptationsImpl.java   
/**
* save an adaptation
*/
public ims.therapies.vo.AdaptationsVo save(ims.therapies.vo.AdaptationsVo voAdaptation) throws ims.domain.exceptions.StaleObjectException
{
    if(!voAdaptation.isValidated())
    {
        throw new DomainRuntimeException("Adaptation Value Object has not been validated");
    }

    DomainFactory factory = getDomainFactory();     
    ims.therapies.domain.objects.Adaptations adaptBo = AdaptationsVoAssembler.extractAdaptations(factory,voAdaptation);

    factory.save(adaptBo);

    return AdaptationsVoAssembler.create(adaptBo);      

}
项目:openMAXIMS    文件:AdaptationsImpl.java   
public AdaptationsVoCollection listByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();
    String query = "from Adaptations ad ";
    ArrayList markers= new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if(voCareContextRef != null)
    {
        hql.append(andStr + " ad.careContext.id = :cc");
        markers.add("cc");
        values.add(voCareContextRef.getID_CareContext());
    }

    if (markers.size() > 0) query += " where ";
    query += hql.toString();    

    java.util.List Adaptations = factory.find(query,markers,values);
    AdaptationsVoCollection voAdaptationsColl = AdaptationsVoAssembler.createAdaptationsVoCollectionFromAdaptations(Adaptations);

    return voAdaptationsColl;

}
项目:openMAXIMS    文件:AdaptationsImpl.java   
/**
* save an adaptation
*/
public ims.therapies.vo.AdaptationsVo save(ims.therapies.vo.AdaptationsVo voAdaptation) throws ims.domain.exceptions.StaleObjectException
{
    if(!voAdaptation.isValidated())
    {
        throw new DomainRuntimeException("Adaptation Value Object has not been validated");
    }

    DomainFactory factory = getDomainFactory();     
    ims.therapies.domain.objects.Adaptations adaptBo = AdaptationsVoAssembler.extractAdaptations(factory,voAdaptation);

    factory.save(adaptBo);

    return AdaptationsVoAssembler.create(adaptBo);      

}
项目:openMAXIMS    文件:AdaptationsImpl.java   
public AdaptationsVoCollection listByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();
    String query = "from Adaptations ad ";
    ArrayList markers= new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if(voCareContextRef != null)
    {
        hql.append(andStr + " ad.careContext.id = :cc");
        markers.add("cc");
        values.add(voCareContextRef.getID_CareContext());
    }

    if (markers.size() > 0) query += " where ";
    query += hql.toString();    

    java.util.List Adaptations = factory.find(query,markers,values);
    AdaptationsVoCollection voAdaptationsColl = AdaptationsVoAssembler.createAdaptationsVoCollectionFromAdaptations(Adaptations);

    return voAdaptationsColl;

}
项目:openmaxims-linux    文件:AdaptationsImpl.java   
/**
* save an adaptation
*/
public ims.therapies.vo.AdaptationsVo save(ims.therapies.vo.AdaptationsVo voAdaptation) throws ims.domain.exceptions.StaleObjectException
{
    if(!voAdaptation.isValidated())
    {
        throw new DomainRuntimeException("Adaptation Value Object has not been validated");
    }

    DomainFactory factory = getDomainFactory();     
    ims.therapies.domain.objects.Adaptations adaptBo = AdaptationsVoAssembler.extractAdaptations(factory,voAdaptation);

    factory.save(adaptBo);

    return AdaptationsVoAssembler.create(adaptBo);      

}
项目:openmaxims-linux    文件:AdaptationsImpl.java   
public AdaptationsVoCollection listByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();
    String query = "from Adaptations ad ";
    ArrayList markers= new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if(voCareContextRef != null)
    {
        hql.append(andStr + " ad.careContext.id = :cc");
        markers.add("cc");
        values.add(voCareContextRef.getID_CareContext());
    }

    if (markers.size() > 0) query += " where ";
    query += hql.toString();    

    java.util.List Adaptations = factory.find(query,markers,values);
    AdaptationsVoCollection voAdaptationsColl = AdaptationsVoAssembler.createAdaptationsVoCollectionFromAdaptations(Adaptations);

    return voAdaptationsColl;

}