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

项目:openMAXIMS    文件:TaxonomyCodeAdminImpl.java   
public HrgConfigLiteVo saveHRG(HrgConfigLiteVo hrg) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException
{
    if (!hrg.isValidated())
    {
        throw new DomainRuntimeException("HRGConfigLiteVo has not been validated.");
    }

    DomainFactory factory = getDomainFactory();

    HrgConfig hrgDo = HrgConfigLiteVoAssembler.extractHrgConfig(factory, hrg);

    if (hrg.getID_HrgConfigIsNotNull())
    {
        //update
        factory.update(hrgDo);
    }
    else
    {
        //insert
        factory.save(hrgDo);
    }

    return HrgConfigLiteVoAssembler.create(hrgDo);
}
项目:AvoinApotti    文件:HRGConfigurationImpl.java   
/**
 * List all the HRG Configuration in the system
 */
public ims.core.vo.HrgConfigLiteVoCollection listHRGConfiguration()
{
    // Build the query
    String query = "from HrgConfig as hrg";

    DomainFactory factory = getDomainFactory();

    return HrgConfigLiteVoAssembler.createHrgConfigLiteVoCollectionFromHrgConfig(factory.find(query));
}
项目:openMAXIMS    文件:HRGConfigurationImpl.java   
/**
 * List all the HRG Configuration in the system
 */
public ims.core.vo.HrgConfigLiteVoCollection listHRGConfiguration()
{
    // Build the query
    String query = "from HrgConfig as hrg";

    DomainFactory factory = getDomainFactory();

    return HrgConfigLiteVoAssembler.createHrgConfigLiteVoCollectionFromHrgConfig(factory.find(query));
}
项目:openMAXIMS    文件:TaxonomyCodeAdminImpl.java   
public HrgConfigLiteVo getHRGCode(String code)
{
    if(code == null || code.trim().length() == 0)
        return null;

    HrgConfigLiteVoCollection coll = HrgConfigLiteVoAssembler.createHrgConfigLiteVoCollectionFromHrgConfig(getDomainFactory().find("from HrgConfig hrg WHERE hrg.hRGCode = :HRGCode", new String[] {"HRGCode"}, new Object[] {code}));

    if (coll != null && coll.size()>0)
        return coll.get(0);

    return null;
}
项目:openMAXIMS    文件:ReferralExternalCodingImpl.java   
public HrgConfigLiteVo getHRG(String code)
{
    if(code == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String hqlList  = "select hrg from HrgConfig as hrg where hrg.hRGCode = :Code";
    List codesList = factory.find(hqlList, new String[] {"Code"}, new Object[] {code});

    if(codesList == null || codesList.size() == 0)
        return null;

    return HrgConfigLiteVoAssembler.create((HrgConfig) codesList.get(0));
}
项目:openMAXIMS    文件:HRGConfigurationImpl.java   
/**
 * List all the HRG Configuration in the system
 */
public ims.core.vo.HrgConfigLiteVoCollection listHRGConfiguration()
{
    // Build the query
    String query = "from HrgConfig as hrg";

    DomainFactory factory = getDomainFactory();

    return HrgConfigLiteVoAssembler.createHrgConfigLiteVoCollectionFromHrgConfig(factory.find(query));
}
项目:openmaxims-linux    文件:HRGConfigurationImpl.java   
/**
 * List all the HRG Configuration in the system
 */
public ims.core.vo.HrgConfigLiteVoCollection listHRGConfiguration()
{
    // Build the query
    String query = "from HrgConfig as hrg";

    DomainFactory factory = getDomainFactory();

    return HrgConfigLiteVoAssembler.createHrgConfigLiteVoCollectionFromHrgConfig(factory.find(query));
}