Java 类ims.core.vo.ActivityVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void listSessions(boolean useFirstAvaialbleCheck)
{

    ActivityVo voActivity = form.cmbActivity().getValue();

    if (useFirstAvaialbleCheck)
    {
        if (form.chkFirst().getValue() == true)
        {
            Date currentDate = domain.getCurrentMonth(form.cmbClinic().getValue(), voActivity, form.cmbSpecialty().getValue(), form.cmbLocation().getValue(), form.customControlHcp().getValue(), form.chkFirst().getValue());
            if (currentDate != null)
            {
                form.bookingCalendar1().setCurrentMonth(currentDate);
                form.getLocalContext().setCurrentDate(currentDate);
            }
        }
    }

    Date dateStart = new Date(form.bookingCalendar1().getCurrentMonth().getYear(), form.bookingCalendar1().getCurrentMonth().getMonth(), 1);
    Date dateEnd = new Date(form.bookingCalendar1().getCurrentMonth().getYear(), form.bookingCalendar1().getCurrentMonth().getMonth(), form.bookingCalendar1().getCurrentMonth().getNumberOfDaysInTheMonth());

    SessionShortVoCollection voCollSessionShort = domain.listGenericSession(dateStart, dateEnd, form.cmbClinic().getValue(), voActivity, form.cmbSpecialty().getValue(), form.cmbLocation().getValue(), form.customControlHcp().getValue(), form.chkFirst().getValue(), form.chkOverBook().getValue());
    form.getLocalContext().setSessions(voCollSessionShort);
}
项目:AvoinApotti    文件:Logic.java   
protected String setToolTipTaxonomy(ServiceActivityVo voActiv, ActivityVo vo)
{
    String out;
    out = "";

    if (voActiv != null)
    {
        for (int j = 0; j < voActiv.getTaxonomyMap().size(); j++)
        {
            if (voActiv.getTaxonomyMap().get(j).getTaxonomyCodeIsNotNull() && voActiv.getTaxonomyMap().get(j).getTaxonomyNameIsNotNull())
            {
                if (voActiv.getActivity().getID_Activity().equals(vo.getID_Activity()))
                {
                    out += makeTextile("Taxonomy: ", "SlateBlue", "tahoma", "12");
                    out += makeTextile((voActiv.getTaxonomyMap().get(j).getTaxonomyNameIsNotNull() ? voActiv.getTaxonomyMap().get(j).getTaxonomyName().toString() : ""), "black", "tahoma", "12");
                    out += makeTextile(" Code: ", "SlateBlue", "tahoma", "12");
                    out += makeTextile((voActiv.getTaxonomyMap().get(j).getTaxonomyCodeIsNotNull() ? voActiv.getTaxonomyMap().get(j).getTaxonomyCode() : "") + "<br>", "black", "tahoma", "12");
                }
            }
        }
    }

    return out;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * @param newNode
 * @param inst
 */
private void fillTypeActivites(TreeNode parentNode, LookupInstVo inst)
{
    ActivityVoCollection collActivityVo = form.getLocalContext().getActivityVoCollection();
    for (int i = 0; i < collActivityVo.size(); i++)
    {
        ActivityVo voActivity = collActivityVo.get(i);

        if (voActivity.getActivityType().equals(inst))
        {
            TreeNode newNode = parentNode.getNodes().add(voActivity, voActivity.getName());
            newNode.setExpandedImage(form.getImages().Core.BlueSquare);
            newNode.setCollapsedImage(form.getImages().Core.BlueSquare);
            newNode.setSelectedImage(form.getImages().Core.BlueSquare);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void addRecord()
{
    form.setMode(FormMode.EDIT);

    if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("NTPF"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabNtpf().txtActivity().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabNtpf().chkItem().setValue(true);
        form.lyrActivity().tabNtpf().chkActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivityVo());
        form.getLocalContext().setAlertVo(new CodingAlertConfigurationVo());
        showAlertDetails(enableAlertControls(form.treActivity().getSelectedNode()), (ActivityType) form.treActivity().getSelectedNode().getValue());
    }
    else if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("SCHED"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabSchedulling().txtActType().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabSchedulling().chkActActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivitySchedVo());
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * @return
 */
private boolean adminInstanceExists()
{
    ActivityVoCollection collActivityVo = form.getLocalContext().getActivityVoCollection();
    if (collActivityVo == null)
        return false;

    for (int i = 0; i < collActivityVo.size(); i++)
    {
        ActivityVo voActivity = collActivityVo.get(i);

        if (voActivity.getActivityType().equals(ActivityType.ADMINFUNCTIONS))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void listSessions(boolean useFirstAvaialbleCheck)
{

    ActivityVo voActivity = form.cmbActivity().getValue();

    if (useFirstAvaialbleCheck)
    {
        if (form.chkFirst().getValue() == true)
        {
            Date currentDate = domain.getCurrentMonth(form.cmbClinic().getValue(), voActivity, form.cmbSpecialty().getValue(), form.cmbLocation().getValue(), form.customControlHcp().getValue(), form.chkFirst().getValue());
            if (currentDate != null)
            {
                form.bookingCalendar1().setCurrentMonth(currentDate);
                form.getLocalContext().setCurrentDate(currentDate);
            }
        }
    }

    Date dateStart = new Date(form.bookingCalendar1().getCurrentMonth().getYear(), form.bookingCalendar1().getCurrentMonth().getMonth(), 1);
    Date dateEnd = new Date(form.bookingCalendar1().getCurrentMonth().getYear(), form.bookingCalendar1().getCurrentMonth().getMonth(), form.bookingCalendar1().getCurrentMonth().getNumberOfDaysInTheMonth());

    SessionShortVoCollection voCollSessionShort = domain.listGenericSession(dateStart, dateEnd, form.cmbClinic().getValue(), voActivity, form.cmbSpecialty().getValue(), form.cmbLocation().getValue(), form.customControlHcp().getValue(), form.chkFirst().getValue(), form.chkOverBook().getValue());
    form.getLocalContext().setSessions(voCollSessionShort);
}
项目:openMAXIMS    文件:Logic.java   
protected String setToolTipTaxonomy(ServiceActivityVo voActiv, ActivityVo vo)
{
    String out;
    out = "";

    if (voActiv != null)
    {
        for (int j = 0; j < voActiv.getTaxonomyMap().size(); j++)
        {
            if (voActiv.getTaxonomyMap().get(j).getTaxonomyCodeIsNotNull() && voActiv.getTaxonomyMap().get(j).getTaxonomyNameIsNotNull())
            {
                if (voActiv.getActivity().getID_Activity().equals(vo.getID_Activity()))
                {
                    out += makeTextile("Taxonomy: ", "SlateBlue", "tahoma", "12");
                    out += makeTextile((voActiv.getTaxonomyMap().get(j).getTaxonomyNameIsNotNull() ? voActiv.getTaxonomyMap().get(j).getTaxonomyName().toString() : ""), "black", "tahoma", "12");
                    out += makeTextile(" Code: ", "SlateBlue", "tahoma", "12");
                    out += makeTextile((voActiv.getTaxonomyMap().get(j).getTaxonomyCodeIsNotNull() ? voActiv.getTaxonomyMap().get(j).getTaxonomyCode() : "") + "<br>", "black", "tahoma", "12");
                }
            }
        }
    }

    return out;
}
项目:openMAXIMS    文件:Logic.java   
private void addRecord()
{
    form.setMode(FormMode.EDIT);

    if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("NTPF"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabNtpf().txtActivity().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabNtpf().chkItem().setValue(true);
        form.lyrActivity().tabNtpf().chkActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivityVo());
        form.getLocalContext().setAlertVo(new CodingAlertConfigurationVo());
        showAlertDetails(enableAlertControls(form.treActivity().getSelectedNode()), (ActivityType) form.treActivity().getSelectedNode().getValue());
    }
    else if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("SCHED"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabSchedulling().txtActType().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabSchedulling().chkActActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivitySchedVo());
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @return
 */
private boolean adminInstanceExists()
{
    ActivityVoCollection collActivityVo = form.getLocalContext().getActivityVoCollection();
    if (collActivityVo == null)
        return false;

    for (int i = 0; i < collActivityVo.size(); i++)
    {
        ActivityVo voActivity = collActivityVo.get(i);

        if (voActivity.getActivityType().equals(ActivityType.ADMINFUNCTIONS))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void listSessions(boolean useFirstAvaialbleCheck)
{

    ActivityVo voActivity = form.cmbActivity().getValue();

    if (useFirstAvaialbleCheck)
    {
        if (form.chkFirst().getValue() == true)
        {
            Date currentDate = domain.getCurrentMonth(form.cmbClinic().getValue(), voActivity, form.cmbSpecialty().getValue(), form.cmbLocation().getValue(), form.customControlHcp().getValue(), form.chkFirst().getValue());
            if (currentDate != null)
            {
                form.bookingCalendar1().setCurrentMonth(currentDate);
                form.getLocalContext().setCurrentDate(currentDate);
            }
        }
    }

    Date dateStart = new Date(form.bookingCalendar1().getCurrentMonth().getYear(), form.bookingCalendar1().getCurrentMonth().getMonth(), 1);
    Date dateEnd = new Date(form.bookingCalendar1().getCurrentMonth().getYear(), form.bookingCalendar1().getCurrentMonth().getMonth(), form.bookingCalendar1().getCurrentMonth().getNumberOfDaysInTheMonth());

    SessionShortVoCollection voCollSessionShort = domain.listGenericSession(dateStart, dateEnd, form.cmbClinic().getValue(), voActivity, form.cmbSpecialty().getValue(), form.cmbLocation().getValue(), form.customControlHcp().getValue(), form.chkFirst().getValue(), form.chkOverBook().getValue());
    form.getLocalContext().setSessions(voCollSessionShort);
}
项目:openMAXIMS    文件:Logic.java   
protected String setToolTipTaxonomy(ServiceActivityVo voActiv, ActivityVo vo)
{
    String out;
    out = "";

    if (voActiv != null)
    {
        for (int j = 0; j < voActiv.getTaxonomyMap().size(); j++)
        {
            if (voActiv.getTaxonomyMap().get(j).getTaxonomyCodeIsNotNull() && voActiv.getTaxonomyMap().get(j).getTaxonomyNameIsNotNull())
            {
                if (voActiv.getActivity().getID_Activity().equals(vo.getID_Activity()))
                {
                    out += makeTextile("Taxonomy: ", "SlateBlue", "tahoma", "12");
                    out += makeTextile((voActiv.getTaxonomyMap().get(j).getTaxonomyNameIsNotNull() ? voActiv.getTaxonomyMap().get(j).getTaxonomyName().toString() : ""), "black", "tahoma", "12");
                    out += makeTextile(" Code: ", "SlateBlue", "tahoma", "12");
                    out += makeTextile((voActiv.getTaxonomyMap().get(j).getTaxonomyCodeIsNotNull() ? voActiv.getTaxonomyMap().get(j).getTaxonomyCode() : "") + "<br>", "black", "tahoma", "12");
                }
            }
        }
    }

    return out;
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @param newNode
 * @param inst
 */
private void fillTypeActivites(TreeNode parentNode, LookupInstVo inst)
{
    ActivityVoCollection collActivityVo = form.getLocalContext().getActivityVoCollection();
    for (int i = 0; i < collActivityVo.size(); i++)
    {
        ActivityVo voActivity = collActivityVo.get(i);

        if (voActivity.getActivityType().equals(inst))
        {
            TreeNode newNode = parentNode.getNodes().add(voActivity, voActivity.getName());
            newNode.setExpandedImage(form.getImages().Core.BlueSquare);
            newNode.setCollapsedImage(form.getImages().Core.BlueSquare);
            newNode.setSelectedImage(form.getImages().Core.BlueSquare);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addRecord()
{
    form.setMode(FormMode.EDIT);

    if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("NTPF"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabNtpf().txtActivity().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabNtpf().chkItem().setValue(true);
        form.lyrActivity().tabNtpf().chkActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivityVo());
        form.getLocalContext().setAlertVo(new CodingAlertConfigurationVo());
        showAlertDetails(enableAlertControls(form.treActivity().getSelectedNode()), (ActivityType) form.treActivity().getSelectedNode().getValue());
    }
    else if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("SCHED"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabSchedulling().txtActType().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabSchedulling().chkActActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivitySchedVo());
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @return
 */
private boolean adminInstanceExists()
{
    ActivityVoCollection collActivityVo = form.getLocalContext().getActivityVoCollection();
    if (collActivityVo == null)
        return false;

    for (int i = 0; i < collActivityVo.size(); i++)
    {
        ActivityVo voActivity = collActivityVo.get(i);

        if (voActivity.getActivityType().equals(ActivityType.ADMINFUNCTIONS))
            return true;
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void listSessions(boolean useFirstAvaialbleCheck)
{

    ActivityVo voActivity = form.cmbActivity().getValue();

    if (useFirstAvaialbleCheck)
    {
        if (form.chkFirst().getValue() == true)
        {
            Date currentDate = domain.getCurrentMonth(form.cmbClinic().getValue(), voActivity, form.cmbSpecialty().getValue(), form.cmbLocation().getValue(), form.customControlHcp().getValue(), form.chkFirst().getValue());
            if (currentDate != null)
            {
                form.bookingCalendar1().setCurrentMonth(currentDate);
                form.getLocalContext().setCurrentDate(currentDate);
            }
        }
    }

    Date dateStart = new Date(form.bookingCalendar1().getCurrentMonth().getYear(), form.bookingCalendar1().getCurrentMonth().getMonth(), 1);
    Date dateEnd = new Date(form.bookingCalendar1().getCurrentMonth().getYear(), form.bookingCalendar1().getCurrentMonth().getMonth(), form.bookingCalendar1().getCurrentMonth().getNumberOfDaysInTheMonth());

    SessionShortVoCollection voCollSessionShort = domain.listGenericSession(dateStart, dateEnd, form.cmbClinic().getValue(), voActivity, form.cmbSpecialty().getValue(), form.cmbLocation().getValue(), form.customControlHcp().getValue(), form.chkFirst().getValue(), form.chkOverBook().getValue());
    form.getLocalContext().setSessions(voCollSessionShort);
}
项目:openmaxims-linux    文件:Logic.java   
protected String setToolTipTaxonomy(ServiceActivityVo voActiv, ActivityVo vo)
{
    String out;
    out = "";

    if (voActiv != null)
    {
        for (int j = 0; j < voActiv.getTaxonomyMap().size(); j++)
        {
            if (voActiv.getTaxonomyMap().get(j).getTaxonomyCodeIsNotNull() && voActiv.getTaxonomyMap().get(j).getTaxonomyNameIsNotNull())
            {
                if (voActiv.getActivity().getID_Activity().equals(vo.getID_Activity()))
                {
                    out += makeTextile("Taxonomy: ", "SlateBlue", "tahoma", "12");
                    out += makeTextile((voActiv.getTaxonomyMap().get(j).getTaxonomyNameIsNotNull() ? voActiv.getTaxonomyMap().get(j).getTaxonomyName().toString() : ""), "black", "tahoma", "12");
                    out += makeTextile(" Code: ", "SlateBlue", "tahoma", "12");
                    out += makeTextile((voActiv.getTaxonomyMap().get(j).getTaxonomyCodeIsNotNull() ? voActiv.getTaxonomyMap().get(j).getTaxonomyCode() : "") + "<br>", "black", "tahoma", "12");
                }
            }
        }
    }

    return out;
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * @param newNode
 * @param inst
 */
private void fillTypeActivites(TreeNode parentNode, LookupInstVo inst)
{
    ActivityVoCollection collActivityVo = form.getLocalContext().getActivityVoCollection();
    for (int i = 0; i < collActivityVo.size(); i++)
    {
        ActivityVo voActivity = collActivityVo.get(i);

        if (voActivity.getActivityType().equals(inst))
        {
            TreeNode newNode = parentNode.getNodes().add(voActivity, voActivity.getName());
            newNode.setExpandedImage(form.getImages().Core.BlueSquare);
            newNode.setCollapsedImage(form.getImages().Core.BlueSquare);
            newNode.setSelectedImage(form.getImages().Core.BlueSquare);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void addRecord()
{
    form.setMode(FormMode.EDIT);

    if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("NTPF"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabNtpf().txtActivity().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabNtpf().chkItem().setValue(true);
        form.lyrActivity().tabNtpf().chkActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivityVo());
        form.getLocalContext().setAlertVo(new CodingAlertConfigurationVo());
        showAlertDetails(enableAlertControls(form.treActivity().getSelectedNode()), (ActivityType) form.treActivity().getSelectedNode().getValue());
    }
    else if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("SCHED"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabSchedulling().txtActType().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabSchedulling().chkActActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivitySchedVo());
    }
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * @return
 */
private boolean adminInstanceExists()
{
    ActivityVoCollection collActivityVo = form.getLocalContext().getActivityVoCollection();
    if (collActivityVo == null)
        return false;

    for (int i = 0; i < collActivityVo.size(); i++)
    {
        ActivityVo voActivity = collActivityVo.get(i);

        if (voActivity.getActivityType().equals(ActivityType.ADMINFUNCTIONS))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:ClinicListImpl.java   
public ContextType getPASCode(ActivityVo activity)
{
    DomainFactory factory = getDomainFactory();
    ims.domain.lookups.Lookup lookupType = factory.getLookup(ContextType.TYPE_ID);

    if (null != lookupType)
    {
        java.util.Set set = lookupType.getInstances();

        for (Iterator iter = set.iterator(); iter.hasNext();)
        {
            LookupInstance lookup = (LookupInstance) iter.next();

            if(lookup.isActive())
            {
                Set mappings = lookup.getMappings();

                for (Object object : mappings)
                {
                    if(object instanceof LookupMapping)
                    {
                        LookupMapping mapping = (LookupMapping)object;

                        if("PAS".equals(mapping.getExtSystem()) && activity.getID_Activity().toString().equalsIgnoreCase(mapping.getExtCode()))
                        {
                            LookupInstVo vo = createLookupinstanceVo(lookup);
                            //public ContextType(int id, String text, boolean active, ContextType parent, Image image, Color color, int order)
                            ContextType contextType = new ContextType(vo.getID(), vo.getText(), vo.isActive());
                            return contextType;
                        }
                    }
                }

            }

        }
    }       

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private boolean wasInactive(ActivityVo value, ServiceActivityVoCollection voCollActivity)
{
    if (voCollActivity != null && voCollActivity.size() > 0)
    {
        for (int i = 0; i < voCollActivity.size(); i++)
        {
            if (voCollActivity.get(i).getActivityIsNotNull() && voCollActivity.get(i).getActivity().equals(value) && voCollActivity.get(i).getIsActiveIsNotNull() && voCollActivity.get(i).getIsActive() == false)
                return true;
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean hadAnExchequer(ActivityVo value, ServiceActivityVoCollection voCollActivity)
{
    if (voCollActivity != null && voCollActivity.size() > 0)
    {
        for (int i = 0; i < voCollActivity.size(); i++)
        {
            if (voCollActivity.get(i).getActivityIsNotNull() && voCollActivity.get(i).getActivity().equals(value))
            {
                if (voCollActivity.get(i).getTaxonomyMapIsNotNull())
                {
                    for (int j = 0; j < voCollActivity.get(i).getTaxonomyMap().size(); j++)
                    {
                        if (voCollActivity.get(i).getTaxonomyMap().get(j).getTaxonomyNameIsNotNull() && voCollActivity.get(i).getTaxonomyMap().get(j).getTaxonomyName().equals(TaxonomyType.EXCH))
                        {
                            for (int k = 0; k < form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().size(); k++)
                            {
                                TaxonomyMap mp = form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().get(k).getValue();
                                if (mp != null && mp.getTaxonomyName() != null && mp.getTaxonomyName().equals(TaxonomyType.EXCH))
                                    return false;
                            }
                            return true;
                        }
                    }
                }
            }
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private ServiceActivityVo inActivityList(ActivityVo value, ServiceActivityVoCollection voVollActivity)
{
    if (voVollActivity != null && voVollActivity.size() > 0)
    {
        for (int i = 0; i < voVollActivity.size(); i++)
        {
            if (voVollActivity.get(i).getActivityIsNotNull() && voVollActivity.get(i).getActivity().equals(value))
                return voVollActivity.get(i);
        }
    }
    return null;
}
项目:AvoinApotti    文件:ActivityImpl.java   
public ims.core.vo.ActivityVo getActivity(Integer activityId)
{   
    DomainFactory factory = getDomainFactory();
    ims.core.resource.place.domain.objects.Activity domActivity = (ims.core.resource.place.domain.objects.Activity) factory.getDomainObject(Activity.class, activityId);
    return (ActivityVoAssembler.create(domActivity));

}
项目:AvoinApotti    文件:ActivityImpl.java   
public ActivityVo saveActivity(ActivityVo activityVo) throws StaleObjectException, UniqueKeyViolationException
{
    if (!activityVo.isValidated())
    {
        throw new DomainRuntimeException("Activity has not been validated");
    }

    DomainFactory factory = getDomainFactory();

    if(Activity.recordExistForNameAndIsActiveAndActivityType(factory, activityVo.getName(), activityVo.getIsActive(), getDomLookup( activityVo.getActivityType())))
    {
        if(activityVo.getID_ActivityIsNotNull())
        {
            Activity doConflictingActivity = Activity.getActivityFromactivity_unq1(factory, activityVo.getName(), activityVo.getIsActive(), getDomLookup( activityVo.getActivityType()));
            if(!doConflictingActivity.getId().equals(activityVo.getID_Activity()))
                throw new UniqueKeyViolationException("An " + (activityVo.getIsActive() ? "active" : "inactive") + " Activity of this Type and Name already exists");
        }
        else
            throw new UniqueKeyViolationException("An " + (activityVo.getIsActive() ? "active" : "inactive") + " Activity of this Type and Name already exists");
    }


    ims.core.resource.place.domain.objects.Activity domActivity = ActivityVoAssembler.extractActivity(factory, activityVo);             

    try
    {
        factory.save(domActivity);
    }
    catch (UnqViolationUncheckedException e)
    {
        throw new UniqueKeyViolationException("An activity with the same code mapping exists");
    }

    return ActivityVoAssembler.create(domActivity);
}
项目:AvoinApotti    文件:ClinicListImpl.java   
public ContextType getPASCode(ActivityVo activity)
{
    DomainFactory factory = getDomainFactory();
    ims.domain.lookups.Lookup lookupType = factory.getLookup(ContextType.TYPE_ID);

    if (null != lookupType)
    {
        java.util.Set<?> set = lookupType.getInstances();

        for (Iterator<?> iter = set.iterator(); iter.hasNext();)
        {
            LookupInstance lookup = (LookupInstance) iter.next();

            if(lookup.isActive())
            {
                Set<?> mappings = lookup.getMappings();

                for (Object object : mappings)
                {
                    if(object instanceof LookupMapping)
                    {
                        LookupMapping mapping = (LookupMapping)object;

                        if("PAS".equals(mapping.getExtSystem()) && activity.getID_Activity().toString().equalsIgnoreCase(mapping.getExtCode()))
                        {
                            LookupInstVo vo = createLookupinstanceVo(lookup);
                            //public ContextType(int id, String text, boolean active, ContextType parent, Image image, Color color, int order)
                            ContextType contextType = new ContextType(vo.getID(), vo.getText(), vo.isActive());
                            return contextType;
                        }
                    }
                }

            }

        }
    }       

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void defaultActivity(ArrayList values, ActivityRefVo activityToDefault)
{
    if (values == null || activityToDefault == null)
        return;
    for (int i=0;i<values.size();i++)
    {
        if (activityToDefault != null && ((ActivityVo)values.get(i)).getID_Activity().equals(activityToDefault.getID_Activity()))
        {
            form.cmbActivity().setValue((ActivityVo)values.get(i));
            break;
        }
    }
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public ContextType getPASCode(ActivityVo activity)
{
    DomainFactory factory = getDomainFactory();
    ims.domain.lookups.Lookup lookupType = factory.getLookup(ContextType.TYPE_ID);

    if (null != lookupType)
    {
        java.util.Set set = lookupType.getInstances();

        for (Iterator iter = set.iterator(); iter.hasNext();)
        {
            LookupInstance lookup = (LookupInstance) iter.next();

            if(lookup.isActive())
            {
                Set mappings = lookup.getMappings();

                for (Object object : mappings)
                {
                    if(object instanceof LookupMapping)
                    {
                        LookupMapping mapping = (LookupMapping)object;

                        if("PAS".equals(mapping.getExtSystem()) && activity.getID_Activity().toString().equalsIgnoreCase(mapping.getExtCode()))
                        {
                            LookupInstVo vo = createLookupinstanceVo(lookup);
                            //public ContextType(int id, String text, boolean active, ContextType parent, Image image, Color color, int order)
                            ContextType contextType = new ContextType(vo.getID(), vo.getText(), vo.isActive());
                            return contextType;
                        }
                    }
                }

            }

        }
    }       

    return null;
}
项目:openMAXIMS    文件:ActivityImpl.java   
public ims.core.vo.ActivityVo getActivity(Integer activityId)
{   
    DomainFactory factory = getDomainFactory();
    ims.core.resource.place.domain.objects.Activity domActivity = (ims.core.resource.place.domain.objects.Activity) factory.getDomainObject(Activity.class, activityId);
    return (ActivityVoAssembler.create(domActivity));

}
项目:openMAXIMS    文件:ActivityImpl.java   
public ActivityVo saveActivity(ActivityVo activityVo) throws StaleObjectException, UniqueKeyViolationException
{
    if (!activityVo.isValidated())
    {
        throw new DomainRuntimeException("Activity has not been validated");
    }

    DomainFactory factory = getDomainFactory();

    if(Activity.recordExistForNameAndIsActiveAndActivityType(factory, activityVo.getName(), activityVo.getIsActive(), getDomLookup( activityVo.getActivityType())))
    {
        if(activityVo.getID_ActivityIsNotNull())
        {
            Activity doConflictingActivity = Activity.getActivityFromactivity_unq1(factory, activityVo.getName(), activityVo.getIsActive(), getDomLookup( activityVo.getActivityType()));
            if(!doConflictingActivity.getId().equals(activityVo.getID_Activity()))
                throw new UniqueKeyViolationException("An " + (activityVo.getIsActive() ? "active" : "inactive") + " Activity of this Type and Name already exists");
        }
        else
            throw new UniqueKeyViolationException("An " + (activityVo.getIsActive() ? "active" : "inactive") + " Activity of this Type and Name already exists");
    }


    ims.core.resource.place.domain.objects.Activity domActivity = ActivityVoAssembler.extractActivity(factory, activityVo);             

    try
    {
        factory.save(domActivity);
    }
    catch (UnqViolationUncheckedException e)
    {
        throw new UniqueKeyViolationException("An activity with the same code mapping exists");
    }

    return ActivityVoAssembler.create(domActivity);
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public ContextType getPASCode(ActivityVo activity)
{
    DomainFactory factory = getDomainFactory();
    ims.domain.lookups.Lookup lookupType = factory.getLookup(ContextType.TYPE_ID);

    if (null != lookupType)
    {
        java.util.Set<?> set = lookupType.getInstances();

        for (Iterator<?> iter = set.iterator(); iter.hasNext();)
        {
            LookupInstance lookup = (LookupInstance) iter.next();

            if(lookup.isActive())
            {
                Set<?> mappings = lookup.getMappings();

                for (Object object : mappings)
                {
                    if(object instanceof LookupMapping)
                    {
                        LookupMapping mapping = (LookupMapping)object;

                        if("PAS".equals(mapping.getExtSystem()) && activity.getID_Activity().toString().equalsIgnoreCase(mapping.getExtCode()))
                        {
                            LookupInstVo vo = createLookupinstanceVo(lookup);
                            //public ContextType(int id, String text, boolean active, ContextType parent, Image image, Color color, int order)
                            ContextType contextType = new ContextType(vo.getID(), vo.getText(), vo.isActive());
                            return contextType;
                        }
                    }
                }

            }

        }
    }       

    return null;
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public ContextType getPASCode(ActivityVo activity)
{
    DomainFactory factory = getDomainFactory();
    ims.domain.lookups.Lookup lookupType = factory.getLookup(ContextType.TYPE_ID);

    if (null != lookupType)
    {
        java.util.Set set = lookupType.getInstances();

        for (Iterator iter = set.iterator(); iter.hasNext();)
        {
            LookupInstance lookup = (LookupInstance) iter.next();

            if(lookup.isActive())
            {
                Set mappings = lookup.getMappings();

                for (Object object : mappings)
                {
                    if(object instanceof LookupMapping)
                    {
                        LookupMapping mapping = (LookupMapping)object;

                        if("PAS".equals(mapping.getExtSystem()) && activity.getID_Activity().toString().equalsIgnoreCase(mapping.getExtCode()))
                        {
                            LookupInstVo vo = createLookupinstanceVo(lookup);
                            //public ContextType(int id, String text, boolean active, ContextType parent, Image image, Color color, int order)
                            ContextType contextType = new ContextType(vo.getID(), vo.getText(), vo.isActive());
                            return contextType;
                        }
                    }
                }

            }

        }
    }       

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private boolean wasInactive(ActivityVo value, ServiceActivityVoCollection voCollActivity)
{
    if (voCollActivity != null && voCollActivity.size() > 0)
    {
        for (int i = 0; i < voCollActivity.size(); i++)
        {
            if (voCollActivity.get(i).getActivityIsNotNull() && voCollActivity.get(i).getActivity().equals(value) && voCollActivity.get(i).getIsActiveIsNotNull() && voCollActivity.get(i).getIsActive() == false)
                return true;
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean hadAnExchequer(ActivityVo value, ServiceActivityVoCollection voCollActivity)
{
    if (voCollActivity != null && voCollActivity.size() > 0)
    {
        for (int i = 0; i < voCollActivity.size(); i++)
        {
            if (voCollActivity.get(i).getActivityIsNotNull() && voCollActivity.get(i).getActivity().equals(value))
            {
                if (voCollActivity.get(i).getTaxonomyMapIsNotNull())
                {
                    for (int j = 0; j < voCollActivity.get(i).getTaxonomyMap().size(); j++)
                    {
                        if (voCollActivity.get(i).getTaxonomyMap().get(j).getTaxonomyNameIsNotNull() && voCollActivity.get(i).getTaxonomyMap().get(j).getTaxonomyName().equals(TaxonomyType.EXCH))
                        {
                            for (int k = 0; k < form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().size(); k++)
                            {
                                TaxonomyMap mp = form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().get(k).getValue();
                                if (mp != null && mp.getTaxonomyName() != null && mp.getTaxonomyName().equals(TaxonomyType.EXCH))
                                    return false;
                            }
                            return true;
                        }
                    }
                }
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private ServiceActivityVo inActivityList(ActivityVo value, ServiceActivityVoCollection voVollActivity)
{
    if (voVollActivity != null && voVollActivity.size() > 0)
    {
        for (int i = 0; i < voVollActivity.size(); i++)
        {
            if (voVollActivity.get(i).getActivityIsNotNull() && voVollActivity.get(i).getActivity().equals(value))
                return voVollActivity.get(i);
        }
    }
    return null;
}
项目:openMAXIMS    文件:ActivityImpl.java   
public ims.core.vo.ActivityVo getActivity(Integer activityId)
{   
    DomainFactory factory = getDomainFactory();
    ims.core.resource.place.domain.objects.Activity domActivity = (ims.core.resource.place.domain.objects.Activity) factory.getDomainObject(Activity.class, activityId);
    return (ActivityVoAssembler.create(domActivity));

}
项目:openMAXIMS    文件:ActivityImpl.java   
public ActivityVo saveActivity(ActivityVo activityVo) throws StaleObjectException, UniqueKeyViolationException
{
    if (!activityVo.isValidated())
    {
        throw new DomainRuntimeException("Activity has not been validated");
    }

    DomainFactory factory = getDomainFactory();

    if(Activity.recordExistForNameAndIsActiveAndActivityType(factory, activityVo.getName(), activityVo.getIsActive(), getDomLookup( activityVo.getActivityType())))
    {
        if(activityVo.getID_ActivityIsNotNull())
        {
            Activity doConflictingActivity = Activity.getActivityFromactivity_unq1(factory, activityVo.getName(), activityVo.getIsActive(), getDomLookup( activityVo.getActivityType()));
            if(!doConflictingActivity.getId().equals(activityVo.getID_Activity()))
                throw new UniqueKeyViolationException("An " + (activityVo.getIsActive() ? "active" : "inactive") + " Activity of this Type and Name already exists");
        }
        else
            throw new UniqueKeyViolationException("An " + (activityVo.getIsActive() ? "active" : "inactive") + " Activity of this Type and Name already exists");
    }


    ims.core.resource.place.domain.objects.Activity domActivity = ActivityVoAssembler.extractActivity(factory, activityVo);             

    try
    {
        factory.save(domActivity);
    }
    catch (UnqViolationUncheckedException e)
    {
        throw new UniqueKeyViolationException("An activity with the same code mapping exists");
    }

    return ActivityVoAssembler.create(domActivity);
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public ContextType getPASCode(ActivityVo activity)
{
    DomainFactory factory = getDomainFactory();
    ims.domain.lookups.Lookup lookupType = factory.getLookup(ContextType.TYPE_ID);

    if (null != lookupType)
    {
        java.util.Set<?> set = lookupType.getInstances();

        for (Iterator<?> iter = set.iterator(); iter.hasNext();)
        {
            LookupInstance lookup = (LookupInstance) iter.next();

            if(lookup.isActive())
            {
                Set<?> mappings = lookup.getMappings();

                for (Object object : mappings)
                {
                    if(object instanceof LookupMapping)
                    {
                        LookupMapping mapping = (LookupMapping)object;

                        if("PAS".equals(mapping.getExtSystem()) && activity.getID_Activity().toString().equalsIgnoreCase(mapping.getExtCode()))
                        {
                            LookupInstVo vo = createLookupinstanceVo(lookup);
                            //public ContextType(int id, String text, boolean active, ContextType parent, Image image, Color color, int order)
                            ContextType contextType = new ContextType(vo.getID(), vo.getText(), vo.isActive());
                            return contextType;
                        }
                    }
                }

            }

        }
    }       

    return null;
}
项目:openmaxims-linux    文件:ClinicListImpl.java   
public ContextType getPASCode(ActivityVo activity)
{
    DomainFactory factory = getDomainFactory();
    ims.domain.lookups.Lookup lookupType = factory.getLookup(ContextType.TYPE_ID);

    if (null != lookupType)
    {
        java.util.Set set = lookupType.getInstances();

        for (Iterator iter = set.iterator(); iter.hasNext();)
        {
            LookupInstance lookup = (LookupInstance) iter.next();

            if(lookup.isActive())
            {
                Set mappings = lookup.getMappings();

                for (Object object : mappings)
                {
                    if(object instanceof LookupMapping)
                    {
                        LookupMapping mapping = (LookupMapping)object;

                        if("PAS".equals(mapping.getExtSystem()) && activity.getID_Activity().toString().equalsIgnoreCase(mapping.getExtCode()))
                        {
                            LookupInstVo vo = createLookupinstanceVo(lookup);
                            //public ContextType(int id, String text, boolean active, ContextType parent, Image image, Color color, int order)
                            ContextType contextType = new ContextType(vo.getID(), vo.getText(), vo.isActive());
                            return contextType;
                        }
                    }
                }

            }

        }
    }       

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean wasInactive(ActivityVo value, ServiceActivityVoCollection voCollActivity)
{
    if (voCollActivity != null && voCollActivity.size() > 0)
    {
        for (int i = 0; i < voCollActivity.size(); i++)
        {
            if (voCollActivity.get(i).getActivityIsNotNull() && voCollActivity.get(i).getActivity().equals(value) && voCollActivity.get(i).getIsActiveIsNotNull() && voCollActivity.get(i).getIsActive() == false)
                return true;
        }
    }
    return false;
}