Java 类ims.core.vo.domain.AdviceLeafletsVoAssembler 实例源码

项目:AvoinApotti    文件:AdviceLeafletsImpl.java   
public AdviceLeafletsVoCollection listAdviceLeaflets(CareContextRefVo refCareContext) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from AdviceLeaflets t ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List adviceList = factory.find(query, markers, values);                         
    return AdviceLeafletsVoAssembler.createAdviceLeafletsVoCollectionFromAdviceLeaflets(adviceList);

}
项目:openMAXIMS    文件:AdviceLeafletsImpl.java   
public AdviceLeafletsVoCollection listAdviceLeaflets(CareContextRefVo refCareContext) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from AdviceLeaflets t ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List adviceList = factory.find(query, markers, values);                         
    return AdviceLeafletsVoAssembler.createAdviceLeafletsVoCollectionFromAdviceLeaflets(adviceList);

}
项目:openMAXIMS    文件:AdviceLeafletsImpl.java   
public AdviceLeafletsVoCollection listAdviceLeaflets(CareContextRefVo refCareContext) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from AdviceLeaflets t ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List adviceList = factory.find(query, markers, values);                         
    return AdviceLeafletsVoAssembler.createAdviceLeafletsVoCollectionFromAdviceLeaflets(adviceList);

}
项目:openmaxims-linux    文件:AdviceLeafletsImpl.java   
public AdviceLeafletsVoCollection listAdviceLeaflets(CareContextRefVo refCareContext) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from AdviceLeaflets t ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List adviceList = factory.find(query, markers, values);                         
    return AdviceLeafletsVoAssembler.createAdviceLeafletsVoCollectionFromAdviceLeaflets(adviceList);

}
项目:AvoinApotti    文件:AdviceLeafletsImpl.java   
public AdviceLeafletsVo getAdviceLeaflets(AdviceLeafletsRefVo record)
{
    if(record == null || record.getID_AdviceLeaflets() == null)
        throw new CodingRuntimeException("Can not get AdviceLeaflet on null Id.");

    DomainFactory factory = getDomainFactory();
    AdviceLeaflets doLeaflet = (AdviceLeaflets) factory.getDomainObject(AdviceLeaflets.class, record.getID_AdviceLeaflets());

    return AdviceLeafletsVoAssembler.create(doLeaflet);
}
项目:openMAXIMS    文件:AdviceLeafletsImpl.java   
public AdviceLeafletsVo getAdviceLeaflets(AdviceLeafletsRefVo record)
{
    if(record == null || record.getID_AdviceLeaflets() == null)
        throw new CodingRuntimeException("Can not get AdviceLeaflet on null Id.");

    DomainFactory factory = getDomainFactory();
    AdviceLeaflets doLeaflet = (AdviceLeaflets) factory.getDomainObject(AdviceLeaflets.class, record.getID_AdviceLeaflets());

    return AdviceLeafletsVoAssembler.create(doLeaflet);
}
项目:openMAXIMS    文件:AdviceLeafletsImpl.java   
public AdviceLeafletsVo getAdviceLeaflets(AdviceLeafletsRefVo record)
{
    if(record == null || record.getID_AdviceLeaflets() == null)
        throw new CodingRuntimeException("Can not get AdviceLeaflet on null Id.");

    DomainFactory factory = getDomainFactory();
    AdviceLeaflets doLeaflet = (AdviceLeaflets) factory.getDomainObject(AdviceLeaflets.class, record.getID_AdviceLeaflets());

    return AdviceLeafletsVoAssembler.create(doLeaflet);
}
项目:openmaxims-linux    文件:AdviceLeafletsImpl.java   
public AdviceLeafletsVo getAdviceLeaflets(AdviceLeafletsRefVo record)
{
    if(record == null || record.getID_AdviceLeaflets() == null)
        throw new CodingRuntimeException("Can not get AdviceLeaflet on null Id.");

    DomainFactory factory = getDomainFactory();
    AdviceLeaflets doLeaflet = (AdviceLeaflets) factory.getDomainObject(AdviceLeaflets.class, record.getID_AdviceLeaflets());

    return AdviceLeafletsVoAssembler.create(doLeaflet);
}
项目:AvoinApotti    文件:AdviceLeafletsImpl.java   
public AdviceLeafletsVo saveAdviceLeafletsDetails(AdviceLeafletsVo adviceleaflets) throws StaleObjectException
{
    if(adviceleaflets == null)
        throw new RuntimeException("Cannot save null value for AdviceLeafletsVo ");

    if (!adviceleaflets.isValidated())
        throw new DomainRuntimeException("Advice leaflets has not been validated");

    DomainFactory factory = getDomainFactory();

    ims.core.clinical.domain.objects.AdviceLeaflets doAdviceLeaflets = AdviceLeafletsVoAssembler.extractAdviceLeaflets(factory, adviceleaflets);

    factory.save(doAdviceLeaflets);

    return AdviceLeafletsVoAssembler.create(doAdviceLeaflets);
}
项目:openMAXIMS    文件:AdviceLeafletsImpl.java   
public AdviceLeafletsVo saveAdviceLeafletsDetails(AdviceLeafletsVo adviceleaflets) throws StaleObjectException
{
    if(adviceleaflets == null)
        throw new RuntimeException("Cannot save null value for AdviceLeafletsVo ");

    if (!adviceleaflets.isValidated())
        throw new DomainRuntimeException("Advice leaflets has not been validated");

    DomainFactory factory = getDomainFactory();

    ims.core.clinical.domain.objects.AdviceLeaflets doAdviceLeaflets = AdviceLeafletsVoAssembler.extractAdviceLeaflets(factory, adviceleaflets);

    factory.save(doAdviceLeaflets);

    return AdviceLeafletsVoAssembler.create(doAdviceLeaflets);
}
项目:openMAXIMS    文件:AdviceLeafletsImpl.java   
public AdviceLeafletsVo saveAdviceLeafletsDetails(AdviceLeafletsVo adviceleaflets) throws StaleObjectException
{
    if(adviceleaflets == null)
        throw new RuntimeException("Cannot save null value for AdviceLeafletsVo ");

    if (!adviceleaflets.isValidated())
        throw new DomainRuntimeException("Advice leaflets has not been validated");

    DomainFactory factory = getDomainFactory();

    ims.core.clinical.domain.objects.AdviceLeaflets doAdviceLeaflets = AdviceLeafletsVoAssembler.extractAdviceLeaflets(factory, adviceleaflets);

    factory.save(doAdviceLeaflets);

    return AdviceLeafletsVoAssembler.create(doAdviceLeaflets);
}
项目:openmaxims-linux    文件:AdviceLeafletsImpl.java   
public AdviceLeafletsVo saveAdviceLeafletsDetails(AdviceLeafletsVo adviceleaflets) throws StaleObjectException
{
    if(adviceleaflets == null)
        throw new RuntimeException("Cannot save null value for AdviceLeafletsVo ");

    if (!adviceleaflets.isValidated())
        throw new DomainRuntimeException("Advice leaflets has not been validated");

    DomainFactory factory = getDomainFactory();

    ims.core.clinical.domain.objects.AdviceLeaflets doAdviceLeaflets = AdviceLeafletsVoAssembler.extractAdviceLeaflets(factory, adviceleaflets);

    factory.save(doAdviceLeaflets);

    return AdviceLeafletsVoAssembler.create(doAdviceLeaflets);
}