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

项目:AvoinApotti    文件:NTPFBatchPriceSelectionDialogImpl.java   
/**
* Get
*/
public ims.core.vo.BatchPricingVo getBatch(ims.core.clinical.vo.BatchPricingRefVo batchRefVo)
{
    DomainFactory factory = getDomainFactory();
    BatchPricing domBatch = (BatchPricing) factory.getDomainObject(BatchPricing.class, batchRefVo.getID_BatchPricing());
    return BatchPricingVoAssembler.create(domBatch);
}
项目:AvoinApotti    文件:NTPFBatchPriceSelectionDialogImpl.java   
/**
* List
* 
*/
@SuppressWarnings("unchecked")
public ims.core.vo.BatchPricingVoCollection listBatches(ims.core.resource.place.vo.LocationRefVo location)
{
    DomainFactory factory = getDomainFactory();     

    String hql = " from BatchPricing bp "; 
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    condStr.append(andStr + " bp.location.id = :loc" );
    markers.add("loc");
    values.add(location.getID_Location());      
    andStr = " and ";

    condStr.append(andStr + " bp.status = :status" );
    markers.add("status");
    values.add(getDomLookup(BatchStatus.PREACTIVE));        
    andStr = " and ";

    if(andStr.equals( " and "))
        hql += " where ";

    hql += condStr.toString();
    List batches = factory.find(hql,markers,values);
    return BatchPricingVoAssembler.createBatchPricingVoCollectionFromBatchPricing(batches).sort();
}
项目:AvoinApotti    文件:NTPFBatchPriceSelectionDialogImpl.java   
/**
* Save
*/
public ims.core.vo.BatchPricingVo saveBatch(ims.core.vo.BatchPricingVo batchVo) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (!batchVo.isValidated())
    {
        throw new DomainRuntimeException("Batch has not been validated");
    }
    DomainFactory factory = getDomainFactory();
    BatchPricing domBatch = BatchPricingVoAssembler.extractBatchPricing(factory, batchVo);

    factory.save(domBatch);         
    return BatchPricingVoAssembler.create(domBatch);
}
项目:openMAXIMS    文件:NTPFBatchPriceSelectionDialogImpl.java   
/**
* Get
*/
public ims.core.vo.BatchPricingVo getBatch(ims.core.clinical.vo.BatchPricingRefVo batchRefVo)
{
    DomainFactory factory = getDomainFactory();
    BatchPricing domBatch = (BatchPricing) factory.getDomainObject(BatchPricing.class, batchRefVo.getID_BatchPricing());
    return BatchPricingVoAssembler.create(domBatch);
}
项目:openMAXIMS    文件:NTPFBatchPriceSelectionDialogImpl.java   
/**
* List
* 
*/
@SuppressWarnings("unchecked")
public ims.core.vo.BatchPricingVoCollection listBatches(ims.core.resource.place.vo.LocationRefVo location)
{
    DomainFactory factory = getDomainFactory();     

    String hql = " from BatchPricing bp "; 
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    condStr.append(andStr + " bp.location.id = :loc" );
    markers.add("loc");
    values.add(location.getID_Location());      
    andStr = " and ";

    condStr.append(andStr + " bp.status = :status" );
    markers.add("status");
    values.add(getDomLookup(BatchStatus.PREACTIVE));        
    andStr = " and ";

    if(andStr.equals( " and "))
        hql += " where ";

    hql += condStr.toString();
    List batches = factory.find(hql,markers,values);
    return BatchPricingVoAssembler.createBatchPricingVoCollectionFromBatchPricing(batches).sort();
}
项目:openMAXIMS    文件:NTPFBatchPriceSelectionDialogImpl.java   
/**
* Save
*/
public ims.core.vo.BatchPricingVo saveBatch(ims.core.vo.BatchPricingVo batchVo) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (!batchVo.isValidated())
    {
        throw new DomainRuntimeException("Batch has not been validated");
    }
    DomainFactory factory = getDomainFactory();
    BatchPricing domBatch = BatchPricingVoAssembler.extractBatchPricing(factory, batchVo);

    factory.save(domBatch);         
    return BatchPricingVoAssembler.create(domBatch);
}
项目:openMAXIMS    文件:NTPFBatchPriceSelectionDialogImpl.java   
/**
* Get
*/
public ims.core.vo.BatchPricingVo getBatch(ims.core.clinical.vo.BatchPricingRefVo batchRefVo)
{
    DomainFactory factory = getDomainFactory();
    BatchPricing domBatch = (BatchPricing) factory.getDomainObject(BatchPricing.class, batchRefVo.getID_BatchPricing());
    return BatchPricingVoAssembler.create(domBatch);
}
项目:openMAXIMS    文件:NTPFBatchPriceSelectionDialogImpl.java   
/**
* List
* 
*/
@SuppressWarnings("unchecked")
public ims.core.vo.BatchPricingVoCollection listBatches(ims.core.resource.place.vo.LocationRefVo location)
{
    DomainFactory factory = getDomainFactory();     

    String hql = " from BatchPricing bp "; 
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    condStr.append(andStr + " bp.location.id = :loc" );
    markers.add("loc");
    values.add(location.getID_Location());      
    andStr = " and ";

    condStr.append(andStr + " bp.status = :status" );
    markers.add("status");
    values.add(getDomLookup(BatchStatus.PREACTIVE));        
    andStr = " and ";

    if(andStr.equals( " and "))
        hql += " where ";

    hql += condStr.toString();
    List batches = factory.find(hql,markers,values);
    return BatchPricingVoAssembler.createBatchPricingVoCollectionFromBatchPricing(batches).sort();
}
项目:openMAXIMS    文件:NTPFBatchPriceSelectionDialogImpl.java   
/**
* Save
*/
public ims.core.vo.BatchPricingVo saveBatch(ims.core.vo.BatchPricingVo batchVo) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (!batchVo.isValidated())
    {
        throw new DomainRuntimeException("Batch has not been validated");
    }
    DomainFactory factory = getDomainFactory();
    BatchPricing domBatch = BatchPricingVoAssembler.extractBatchPricing(factory, batchVo);

    factory.save(domBatch);         
    return BatchPricingVoAssembler.create(domBatch);
}
项目:openmaxims-linux    文件:NTPFBatchPriceSelectionDialogImpl.java   
/**
* Get
*/
public ims.core.vo.BatchPricingVo getBatch(ims.core.clinical.vo.BatchPricingRefVo batchRefVo)
{
    DomainFactory factory = getDomainFactory();
    BatchPricing domBatch = (BatchPricing) factory.getDomainObject(BatchPricing.class, batchRefVo.getID_BatchPricing());
    return BatchPricingVoAssembler.create(domBatch);
}
项目:openmaxims-linux    文件:NTPFBatchPriceSelectionDialogImpl.java   
/**
* List
* 
*/
@SuppressWarnings("unchecked")
public ims.core.vo.BatchPricingVoCollection listBatches(ims.core.resource.place.vo.LocationRefVo location)
{
    DomainFactory factory = getDomainFactory();     

    String hql = " from BatchPricing bp "; 
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    condStr.append(andStr + " bp.location.id = :loc" );
    markers.add("loc");
    values.add(location.getID_Location());      
    andStr = " and ";

    condStr.append(andStr + " bp.status = :status" );
    markers.add("status");
    values.add(getDomLookup(BatchStatus.PREACTIVE));        
    andStr = " and ";

    if(andStr.equals( " and "))
        hql += " where ";

    hql += condStr.toString();
    List batches = factory.find(hql,markers,values);
    return BatchPricingVoAssembler.createBatchPricingVoCollectionFromBatchPricing(batches).sort();
}
项目:openmaxims-linux    文件:NTPFBatchPriceSelectionDialogImpl.java   
/**
* Save
*/
public ims.core.vo.BatchPricingVo saveBatch(ims.core.vo.BatchPricingVo batchVo) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (!batchVo.isValidated())
    {
        throw new DomainRuntimeException("Batch has not been validated");
    }
    DomainFactory factory = getDomainFactory();
    BatchPricing domBatch = BatchPricingVoAssembler.extractBatchPricing(factory, batchVo);

    factory.save(domBatch);         
    return BatchPricingVoAssembler.create(domBatch);
}