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

项目:AvoinApotti    文件:TaxonomyCodeAdminImpl.java   
public TaxonomyUploadVo saveCodeLoaderDef(TaxonomyUploadVo codeLoaderDef) throws DomainInterfaceException, StaleObjectException, ForeignKeyViolationException 
{
    if (!codeLoaderDef.isValidated())
    {
        throw new DomainRuntimeException("Column Map VO has not been validated.");
    }

    DomainFactory factory = getDomainFactory();

    TaxonomyUpload tmBo = TaxonomyUploadVoAssembler.extractTaxonomyUpload(factory, codeLoaderDef);

    if (codeLoaderDef.getID_TaxonomyUploadIsNotNull())
    {
        //update
        factory.update(tmBo);
    }
    else
    {
        //insert
        factory.save(tmBo);
    }

    return TaxonomyUploadVoAssembler.create(tmBo);
}
项目:openMAXIMS    文件:TaxonomyCodeAdminImpl.java   
public TaxonomyUploadVo saveCodeLoaderDef(TaxonomyUploadVo codeLoaderDef) throws DomainInterfaceException, StaleObjectException, ForeignKeyViolationException 
{
    if (!codeLoaderDef.isValidated())
    {
        throw new DomainRuntimeException("Column Map VO has not been validated.");
    }

    DomainFactory factory = getDomainFactory();

    TaxonomyUpload tmBo = TaxonomyUploadVoAssembler.extractTaxonomyUpload(factory, codeLoaderDef);

    if (codeLoaderDef.getID_TaxonomyUploadIsNotNull())
    {
        //update
        factory.update(tmBo);
    }
    else
    {
        //insert
        factory.save(tmBo);
    }

    return TaxonomyUploadVoAssembler.create(tmBo);
}
项目:openMAXIMS    文件:TaxonomyCodeAdminImpl.java   
public TaxonomyUploadVo saveCodeLoaderDef(TaxonomyUploadVo codeLoaderDef) throws DomainInterfaceException, StaleObjectException, ForeignKeyViolationException 
{
    if (!codeLoaderDef.isValidated())
    {
        throw new DomainRuntimeException("Column Map VO has not been validated.");
    }

    DomainFactory factory = getDomainFactory();

    TaxonomyUpload tmBo = TaxonomyUploadVoAssembler.extractTaxonomyUpload(factory, codeLoaderDef);

    if (codeLoaderDef.getID_TaxonomyUploadIsNotNull())
    {
        //update
        factory.update(tmBo);
    }
    else
    {
        //insert
        factory.save(tmBo);
    }

    return TaxonomyUploadVoAssembler.create(tmBo);
}
项目:openmaxims-linux    文件:TaxonomyCodeAdminImpl.java   
public TaxonomyUploadVo saveCodeLoaderDef(TaxonomyUploadVo codeLoaderDef) throws DomainInterfaceException, StaleObjectException, ForeignKeyViolationException 
{
    if (!codeLoaderDef.isValidated())
    {
        throw new DomainRuntimeException("Column Map VO has not been validated.");
    }

    DomainFactory factory = getDomainFactory();

    TaxonomyUpload tmBo = TaxonomyUploadVoAssembler.extractTaxonomyUpload(factory, codeLoaderDef);

    if (codeLoaderDef.getID_TaxonomyUploadIsNotNull())
    {
        //update
        factory.update(tmBo);
    }
    else
    {
        //insert
        factory.save(tmBo);
    }

    return TaxonomyUploadVoAssembler.create(tmBo);
}
项目:AvoinApotti    文件:TaxonomyCodeAdminImpl.java   
public TaxonomyUploadVo getCodeLoaderDef(TaxonomyUploadRefVo codeLoaderDefRef) throws DomainInterfaceException 
{
    if(codeLoaderDefRef == null || codeLoaderDefRef.getBoId() == null)
        throw new DomainInterfaceException("Invalid TaxonomyUpload reference");

    return TaxonomyUploadVoAssembler.create((TaxonomyUpload)getDomainFactory().getDomainObject(codeLoaderDefRef));
}
项目:AvoinApotti    文件:TaxonomyCodeAdminImpl.java   
public TaxonomyUploadVo getCodeLoaderDef(Integer externalCodeTypeId, Integer taxonomyElementId) throws DomainInterfaceException 
{
    if(externalCodeTypeId == null)
        throw new DomainInterfaceException("Invalid TaxonomyUpload reference");

    DomainFactory factory = getDomainFactory();
    String hql = " from TaxonomyUpload as ct where ct.taxonomyCode = " + externalCodeTypeId + " and ct.taxonomyElement = " + taxonomyElementId;
    List taxMap = factory.find(hql);

    if (taxMap != null && taxMap.size() > 0)
        return TaxonomyUploadVoAssembler.create((TaxonomyUpload)taxMap.get(0));

    return null;
}
项目:openMAXIMS    文件:TaxonomyCodeAdminImpl.java   
public TaxonomyUploadVo getCodeLoaderDef(TaxonomyUploadRefVo codeLoaderDefRef) throws DomainInterfaceException 
{
    if(codeLoaderDefRef == null || codeLoaderDefRef.getBoId() == null)
        throw new DomainInterfaceException("Invalid TaxonomyUpload reference");

    return TaxonomyUploadVoAssembler.create((TaxonomyUpload)getDomainFactory().getDomainObject(codeLoaderDefRef));
}
项目:openMAXIMS    文件:TaxonomyCodeAdminImpl.java   
public TaxonomyUploadVo getCodeLoaderDef(Integer externalCodeTypeId, Integer taxonomyElementId) throws DomainInterfaceException 
{
    if(externalCodeTypeId == null)
        throw new DomainInterfaceException("Invalid TaxonomyUpload reference");

    DomainFactory factory = getDomainFactory();
    String hql = " from TaxonomyUpload as ct where ct.taxonomyCode = " + externalCodeTypeId + " and ct.taxonomyElement = " + taxonomyElementId;
    List taxMap = factory.find(hql);

    if (taxMap != null && taxMap.size() > 0)
        return TaxonomyUploadVoAssembler.create((TaxonomyUpload)taxMap.get(0));

    return null;
}
项目:openMAXIMS    文件:TaxonomyCodeAdminImpl.java   
public TaxonomyUploadVo getCodeLoaderDef(TaxonomyUploadRefVo codeLoaderDefRef) throws DomainInterfaceException 
{
    if(codeLoaderDefRef == null || codeLoaderDefRef.getBoId() == null)
        throw new DomainInterfaceException("Invalid TaxonomyUpload reference");

    return TaxonomyUploadVoAssembler.create((TaxonomyUpload)getDomainFactory().getDomainObject(codeLoaderDefRef));
}
项目:openMAXIMS    文件:TaxonomyCodeAdminImpl.java   
public TaxonomyUploadVo getCodeLoaderDef(Integer externalCodeTypeId, Integer taxonomyElementId) throws DomainInterfaceException 
{
    if(externalCodeTypeId == null)
        throw new DomainInterfaceException("Invalid TaxonomyUpload reference");

    DomainFactory factory = getDomainFactory();
    String hql = " from TaxonomyUpload as ct where ct.taxonomyCode = " + externalCodeTypeId + " and ct.taxonomyElement = " + taxonomyElementId;
    List taxMap = factory.find(hql);

    if (taxMap != null && taxMap.size() > 0)
        return TaxonomyUploadVoAssembler.create((TaxonomyUpload)taxMap.get(0));

    return null;
}
项目:openmaxims-linux    文件:TaxonomyCodeAdminImpl.java   
public TaxonomyUploadVo getCodeLoaderDef(TaxonomyUploadRefVo codeLoaderDefRef) throws DomainInterfaceException 
{
    if(codeLoaderDefRef == null || codeLoaderDefRef.getBoId() == null)
        throw new DomainInterfaceException("Invalid TaxonomyUpload reference");

    return TaxonomyUploadVoAssembler.create((TaxonomyUpload)getDomainFactory().getDomainObject(codeLoaderDefRef));
}
项目:openmaxims-linux    文件:TaxonomyCodeAdminImpl.java   
public TaxonomyUploadVo getCodeLoaderDef(Integer externalCodeTypeId, Integer taxonomyElementId) throws DomainInterfaceException 
{
    if(externalCodeTypeId == null)
        throw new DomainInterfaceException("Invalid TaxonomyUpload reference");

    DomainFactory factory = getDomainFactory();
    String hql = " from TaxonomyUpload as ct where ct.taxonomyCode = " + externalCodeTypeId + " and ct.taxonomyElement = " + taxonomyElementId;
    List taxMap = factory.find(hql);

    if (taxMap != null && taxMap.size() > 0)
        return TaxonomyUploadVoAssembler.create((TaxonomyUpload)taxMap.get(0));

    return null;
}