Java 类ims.therapies.vo.domain.LeisureActivitiesVoAssembler 实例源码

项目:AvoinApotti    文件:LeisureImpl.java   
public void save(LeisureActivitiesVo voLeisureActivities) throws StaleObjectException, UniqueKeyViolationException
{
    if(!voLeisureActivities.isValidated())
        throw new DomainRuntimeException("This Leisure Activity has not been validated");

    if(voLeisureActivities.getID_LeisureActivities() == null)
    {
        if(voLeisureActivities.getCareContextIsNotNull())
        {
            LeisureActivitiesVoCollection coll = getLeisureActivitiesVoByCareContext(voLeisureActivities.getCareContext());
            if(coll != null && coll.size()>0)
                throw new DomainRuntimeException("A Leisure record already exists for this CareContext. ");
        }
    }
    DomainFactory factory = getDomainFactory();
    LeisureActivities doLeisureActivities = LeisureActivitiesVoAssembler.extractLeisureActivities(factory, voLeisureActivities);
    factory.save(doLeisureActivities);
}
项目:openMAXIMS    文件:LeisureImpl.java   
public void save(LeisureActivitiesVo voLeisureActivities) throws StaleObjectException, UniqueKeyViolationException
{
    if(!voLeisureActivities.isValidated())
        throw new DomainRuntimeException("This Leisure Activity has not been validated");

    if(voLeisureActivities.getID_LeisureActivities() == null)
    {
        if(voLeisureActivities.getCareContextIsNotNull())
        {
            LeisureActivitiesVoCollection coll = getLeisureActivitiesVoByCareContext(voLeisureActivities.getCareContext());
            if(coll != null && coll.size()>0)
                throw new DomainRuntimeException("A Leisure record already exists for this CareContext. ");
        }
    }
    DomainFactory factory = getDomainFactory();
    LeisureActivities doLeisureActivities = LeisureActivitiesVoAssembler.extractLeisureActivities(factory, voLeisureActivities);
    factory.save(doLeisureActivities);
}
项目:openMAXIMS    文件:LeisureImpl.java   
public void save(LeisureActivitiesVo voLeisureActivities) throws StaleObjectException, UniqueKeyViolationException
{
    if(!voLeisureActivities.isValidated())
        throw new DomainRuntimeException("This Leisure Activity has not been validated");

    if(voLeisureActivities.getID_LeisureActivities() == null)
    {
        if(voLeisureActivities.getCareContextIsNotNull())
        {
            LeisureActivitiesVoCollection coll = getLeisureActivitiesVoByCareContext(voLeisureActivities.getCareContext());
            if(coll != null && coll.size()>0)
                throw new DomainRuntimeException("A Leisure record already exists for this CareContext. ");
        }
    }
    DomainFactory factory = getDomainFactory();
    LeisureActivities doLeisureActivities = LeisureActivitiesVoAssembler.extractLeisureActivities(factory, voLeisureActivities);
    factory.save(doLeisureActivities);
}
项目:openmaxims-linux    文件:LeisureImpl.java   
public void save(LeisureActivitiesVo voLeisureActivities) throws StaleObjectException, UniqueKeyViolationException
{
    if(!voLeisureActivities.isValidated())
        throw new DomainRuntimeException("This Leisure Activity has not been validated");

    if(voLeisureActivities.getID_LeisureActivities() == null)
    {
        if(voLeisureActivities.getCareContextIsNotNull())
        {
            LeisureActivitiesVoCollection coll = getLeisureActivitiesVoByCareContext(voLeisureActivities.getCareContext());
            if(coll != null && coll.size()>0)
                throw new DomainRuntimeException("A Leisure record already exists for this CareContext. ");
        }
    }
    DomainFactory factory = getDomainFactory();
    LeisureActivities doLeisureActivities = LeisureActivitiesVoAssembler.extractLeisureActivities(factory, voLeisureActivities);
    factory.save(doLeisureActivities);
}
项目:AvoinApotti    文件:LeisureImpl.java   
public LeisureActivitiesVoCollection getLeisureActivitiesVoByCareContext(CareContextRefVo voCareContext)
{
    String hql = new String("from LeisureActivities l where l.careContext.id = :CARECONTEXT_ID order by l.systemInformation.creationDateTime desc ");

    java.util.List list = getDomainFactory().find(hql, "CARECONTEXT_ID", voCareContext.getID_CareContext());

    return LeisureActivitiesVoAssembler.createLeisureActivitiesVoCollectionFromLeisureActivities(list);
}
项目:openMAXIMS    文件:LeisureImpl.java   
public LeisureActivitiesVoCollection getLeisureActivitiesVoByCareContext(CareContextRefVo voCareContext)
{
    String hql = new String("from LeisureActivities l where l.careContext.id = :CARECONTEXT_ID order by l.systemInformation.creationDateTime desc ");

    java.util.List list = getDomainFactory().find(hql, "CARECONTEXT_ID", voCareContext.getID_CareContext());

    return LeisureActivitiesVoAssembler.createLeisureActivitiesVoCollectionFromLeisureActivities(list);
}
项目:openMAXIMS    文件:LeisureImpl.java   
public LeisureActivitiesVoCollection getLeisureActivitiesVoByCareContext(CareContextRefVo voCareContext)
{
    String hql = new String("from LeisureActivities l where l.careContext.id = :CARECONTEXT_ID order by l.systemInformation.creationDateTime desc ");

    java.util.List list = getDomainFactory().find(hql, "CARECONTEXT_ID", voCareContext.getID_CareContext());

    return LeisureActivitiesVoAssembler.createLeisureActivitiesVoCollectionFromLeisureActivities(list);
}
项目:openmaxims-linux    文件:LeisureImpl.java   
public LeisureActivitiesVoCollection getLeisureActivitiesVoByCareContext(CareContextRefVo voCareContext)
{
    String hql = new String("from LeisureActivities l where l.careContext.id = :CARECONTEXT_ID order by l.systemInformation.creationDateTime desc ");

    java.util.List list = getDomainFactory().find(hql, "CARECONTEXT_ID", voCareContext.getID_CareContext());

    return LeisureActivitiesVoAssembler.createLeisureActivitiesVoCollectionFromLeisureActivities(list);
}