Java 类ims.admin.vo.domain.AppFormListVoAssembler 实例源码

项目:AvoinApotti    文件:ApplicationFormsImpl.java   
public AppFormListVo getAppFormListByTaxonomyType(String extId, TaxonomyType taxonomyType) 
{
    if (extId == null || taxonomyType == null)
        return null;

    DomainFactory factory = (DomainFactory) this.getDomainFactory();
    String hql = " from AppForm af join af.codeMappings as cm where cm.taxonomyName = :taxType and cm.taxonomyCode = :extId ";
    List appFormList = factory.find(hql,new String[]{"taxType", "extId"}, new Object[]{getDomLookup(taxonomyType),extId});

    if (appFormList != null && appFormList.size() == 1)
         return AppFormListVoAssembler.create((AppForm) appFormList.get(0));
    else if (appFormList != null && appFormList.size() > 1)     
        throw new DomainRuntimeException("Non unique hit on AppForm by TaxonomyType " + taxonomyType.getText() + " and code " + extId);         

    return null;
}
项目:openMAXIMS    文件:ApplicationFormsImpl.java   
public AppFormListVo getAppFormListByTaxonomyType(String extId, TaxonomyType taxonomyType) 
{
    if (extId == null || taxonomyType == null)
        return null;

    DomainFactory factory = (DomainFactory) this.getDomainFactory();
    String hql = " from AppForm af join af.codeMappings as cm where cm.taxonomyName = :taxType and cm.taxonomyCode = :extId ";
    List appFormList = factory.find(hql,new String[]{"taxType", "extId"}, new Object[]{getDomLookup(taxonomyType),extId});

    if (appFormList != null && appFormList.size() == 1)
         return AppFormListVoAssembler.create((AppForm) appFormList.get(0));
    else if (appFormList != null && appFormList.size() > 1)     
        throw new DomainRuntimeException("Non unique hit on AppForm by TaxonomyType " + taxonomyType.getText() + " and code " + extId);         

    return null;
}
项目:openMAXIMS    文件:ApplicationFormsImpl.java   
public AppFormListVo getAppFormListByTaxonomyType(String extId, TaxonomyType taxonomyType) 
{
    if (extId == null || taxonomyType == null)
        return null;

    DomainFactory factory = (DomainFactory) this.getDomainFactory();
    String hql = " from AppForm af join af.codeMappings as cm where cm.taxonomyName = :taxType and cm.taxonomyCode = :extId ";
    List appFormList = factory.find(hql,new String[]{"taxType", "extId"}, new Object[]{getDomLookup(taxonomyType),extId});

    if (appFormList != null && appFormList.size() == 1)
         return AppFormListVoAssembler.create((AppForm) appFormList.get(0));
    else if (appFormList != null && appFormList.size() > 1)     
        throw new DomainRuntimeException("Non unique hit on AppForm by TaxonomyType " + taxonomyType.getText() + " and code " + extId);         

    return null;
}
项目:openmaxims-linux    文件:ApplicationFormsImpl.java   
public AppFormListVo getAppFormListByTaxonomyType(String extId, TaxonomyType taxonomyType) 
{
    if (extId == null || taxonomyType == null)
        return null;

    DomainFactory factory = (DomainFactory) this.getDomainFactory();
    String hql = " from AppForm af join af.codeMappings as cm where cm.taxonomyName = :taxType and cm.taxonomyCode = :extId ";
    List appFormList = factory.find(hql,new String[]{"taxType", "extId"}, new Object[]{getDomLookup(taxonomyType),extId});

    if (appFormList != null && appFormList.size() == 1)
         return AppFormListVoAssembler.create((AppForm) appFormList.get(0));
    else if (appFormList != null && appFormList.size() > 1)     
        throw new DomainRuntimeException("Non unique hit on AppForm by TaxonomyType " + taxonomyType.getText() + " and code " + extId);         

    return null;
}
项目:AvoinApotti    文件:ApplicationFormsImpl.java   
public AppFormListVo getAppFormList(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("AppForm id is null");

    DomainFactory factory = (DomainFactory) getDomainFactory();             
    return AppFormListVoAssembler.create((AppForm)factory.getDomainObject(AppForm.class,id));
}
项目:AvoinApotti    文件:ApplicationFormsImpl.java   
public AppFormListVo saveForm(AppFormListVo listFormVo) throws StaleObjectException 
{       
    if (Boolean.FALSE.equals(listFormVo.isValidated()))
        throw new DomainRuntimeException("AppFormListVo was not validated!");

    DomainFactory factory = (DomainFactory) this.getDomainFactory();        
    AppForm dom = AppFormListVoAssembler.extractAppForm(factory, listFormVo);
    factory.save(dom);

    return AppFormListVoAssembler.create(dom);
}
项目:openMAXIMS    文件:ApplicationFormsImpl.java   
public AppFormListVo getAppFormList(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("AppForm id is null");

    DomainFactory factory = (DomainFactory) getDomainFactory();             
    return AppFormListVoAssembler.create((AppForm)factory.getDomainObject(AppForm.class,id));
}
项目:openMAXIMS    文件:ApplicationFormsImpl.java   
public AppFormListVo saveForm(AppFormListVo listFormVo) throws StaleObjectException 
{       
    if (Boolean.FALSE.equals(listFormVo.isValidated()))
        throw new DomainRuntimeException("AppFormListVo was not validated!");

    DomainFactory factory = (DomainFactory) this.getDomainFactory();        
    AppForm dom = AppFormListVoAssembler.extractAppForm(factory, listFormVo);
    factory.save(dom);

    return AppFormListVoAssembler.create(dom);
}
项目:openMAXIMS    文件:ApplicationFormsImpl.java   
public AppFormListVo getAppFormList(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("AppForm id is null");

    DomainFactory factory = (DomainFactory) getDomainFactory();             
    return AppFormListVoAssembler.create((AppForm)factory.getDomainObject(AppForm.class,id));
}
项目:openMAXIMS    文件:ApplicationFormsImpl.java   
public AppFormListVo saveForm(AppFormListVo listFormVo) throws StaleObjectException 
{       
    if (Boolean.FALSE.equals(listFormVo.isValidated()))
        throw new DomainRuntimeException("AppFormListVo was not validated!");

    DomainFactory factory = (DomainFactory) this.getDomainFactory();        
    AppForm dom = AppFormListVoAssembler.extractAppForm(factory, listFormVo);
    factory.save(dom);

    return AppFormListVoAssembler.create(dom);
}
项目:openmaxims-linux    文件:ApplicationFormsImpl.java   
public AppFormListVo getAppFormList(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("AppForm id is null");

    DomainFactory factory = (DomainFactory) getDomainFactory();             
    return AppFormListVoAssembler.create((AppForm)factory.getDomainObject(AppForm.class,id));
}
项目:openmaxims-linux    文件:ApplicationFormsImpl.java   
public AppFormListVo saveForm(AppFormListVo listFormVo) throws StaleObjectException 
{       
    if (Boolean.FALSE.equals(listFormVo.isValidated()))
        throw new DomainRuntimeException("AppFormListVo was not validated!");

    DomainFactory factory = (DomainFactory) this.getDomainFactory();        
    AppForm dom = AppFormListVoAssembler.extractAppForm(factory, listFormVo);
    factory.save(dom);

    return AppFormListVoAssembler.create(dom);
}