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

项目:AvoinApotti    文件:TransferImpl.java   
/**
 * List Transfer Notes
 */
public TransferNoteCollection listTransferNotes(CareContextShortVo careContextShortVo)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from TransferNote t ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

    if (markers.size() > 0)
        query += " where ";
    query += hql.toString();
    List procs = factory.find(query, markers, values);
    return TransferNoteAssembler.createTransferNoteCollectionFromTransferNote(procs).sort(SortOrder.DESCENDING);
}
项目:openMAXIMS    文件:TransferImpl.java   
/**
 * List Transfer Notes
 */
public TransferNoteCollection listTransferNotes(CareContextShortVo careContextShortVo)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from TransferNote t ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

    if (markers.size() > 0)
        query += " where ";
    query += hql.toString();
    List procs = factory.find(query, markers, values);
    return TransferNoteAssembler.createTransferNoteCollectionFromTransferNote(procs).sort(SortOrder.DESCENDING);
}
项目:openMAXIMS    文件:TransferImpl.java   
/**
 * List Transfer Notes
 */
public TransferNoteCollection listTransferNotes(CareContextShortVo careContextShortVo)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from TransferNote t ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

    if (markers.size() > 0)
        query += " where ";
    query += hql.toString();
    List procs = factory.find(query, markers, values);
    return TransferNoteAssembler.createTransferNoteCollectionFromTransferNote(procs).sort(SortOrder.DESCENDING);
}
项目:openmaxims-linux    文件:TransferImpl.java   
/**
 * List Transfer Notes
 */
public TransferNoteCollection listTransferNotes(CareContextShortVo careContextShortVo)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from TransferNote t ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

    if (markers.size() > 0)
        query += " where ";
    query += hql.toString();
    List procs = factory.find(query, markers, values);
    return TransferNoteAssembler.createTransferNoteCollectionFromTransferNote(procs).sort(SortOrder.DESCENDING);
}
项目:AvoinApotti    文件:TransferImpl.java   
/**
 * Save Transfer note
 */
public TransferNote saveTransferNote(TransferNote voTransferNote) throws StaleObjectException
{
    if (!voTransferNote.isValidated())
        throw new DomainRuntimeException("The transfer note value object has not been validated");

    DomainFactory factory = getDomainFactory();
    ims.nursing.domain.objects.TransferNote doTransferNote = TransferNoteAssembler.extractTransferNote(factory, voTransferNote);

    factory.save(doTransferNote);
    return (TransferNoteAssembler.create(doTransferNote));
}
项目:openMAXIMS    文件:TransferImpl.java   
/**
 * Save Transfer note
 */
public TransferNote saveTransferNote(TransferNote voTransferNote) throws StaleObjectException
{
    if (!voTransferNote.isValidated())
        throw new DomainRuntimeException("The transfer note value object has not been validated");

    DomainFactory factory = getDomainFactory();
    ims.nursing.domain.objects.TransferNote doTransferNote = TransferNoteAssembler.extractTransferNote(factory, voTransferNote);

    factory.save(doTransferNote);
    return (TransferNoteAssembler.create(doTransferNote));
}
项目:openMAXIMS    文件:TransferImpl.java   
/**
 * Save Transfer note
 */
public TransferNote saveTransferNote(TransferNote voTransferNote) throws StaleObjectException
{
    if (!voTransferNote.isValidated())
        throw new DomainRuntimeException("The transfer note value object has not been validated");

    DomainFactory factory = getDomainFactory();
    ims.nursing.domain.objects.TransferNote doTransferNote = TransferNoteAssembler.extractTransferNote(factory, voTransferNote);

    factory.save(doTransferNote);
    return (TransferNoteAssembler.create(doTransferNote));
}
项目:openmaxims-linux    文件:TransferImpl.java   
/**
 * Save Transfer note
 */
public TransferNote saveTransferNote(TransferNote voTransferNote) throws StaleObjectException
{
    if (!voTransferNote.isValidated())
        throw new DomainRuntimeException("The transfer note value object has not been validated");

    DomainFactory factory = getDomainFactory();
    ims.nursing.domain.objects.TransferNote doTransferNote = TransferNoteAssembler.extractTransferNote(factory, voTransferNote);

    factory.save(doTransferNote);
    return (TransferNoteAssembler.create(doTransferNote));
}