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

项目:openmaxims-linux    文件:Logic.java   
private CommChannelVo getCommChannel(ChannelType channelType, Object channelValue, CommChannelVoCollection commChannelVoCollection) 
{
    if(commChannelVoCollection == null)
        return null;

    if(channelType == null || channelValue == null)
        return null;

    for(CommChannelVo channel : commChannelVoCollection)
    {
        if(channel == null)
            continue;

        if(channel.getChannelType().equals(channelType) && channel.getCommValue().equals(channelValue))
            return channel;
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private String getTelephone(GpLiteVo gp)
{
    if (gp == null)
        return null;
    if (!gp.getCommChannelsIsNotNull())
        return null;
    for (int i = 0 ; i < gp.getCommChannels().size() ; i++)
    {
        CommChannelVo commChannelVo = gp.getCommChannels().get(i);
        if (ChannelType.GEN_PHONE.equals(commChannelVo.getChannelType()) || 
                ChannelType.HOME_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.WORK_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.MOBILE.equals(commChannelVo.getChannelType()))
                return commChannelVo.getCommValue();
    }   
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private DynamicGridRow getChannelRow(DynamicGridRow row, DynamicGridColumn column, CommChannelVo channel) 
{
    if(row == null)
        return null;

    for(int i=0; i<row.getRows().size(); i++)
    {
        if(row.getRows().get(i).getValue().equals(channel.getChannelType()) && (row.getRows().get(i).getCells().get(column) == null || (row.getRows().get(i).getCells().get(column) != null && row.getRows().get(i).getCells().get(column).getValue() == null)))
        {
            return row.getRows().get(i);
        }
    }

    DynamicGridRow childRow = row.getRows().newRow();

    DynamicGridCell cell = childRow.getCells().newCell(getColumn(COL_FIELD_NAME), DynamicCellType.STRING);
    cell.setValue("<b>" + channel.getChannelType().getText() + "</b>");
    cell.setReadOnly(true);

    childRow.setValue(channel.getChannelType());
    return childRow;
}
项目:AvoinApotti    文件:Logic.java   
private CommChannelVo getCommChannel(ChannelType channelType, Object channelValue, CommChannelVoCollection commChannelVoCollection) 
{
    if(commChannelVoCollection == null)
        return null;

    if(channelType == null || channelValue == null)
        return null;

    for(CommChannelVo channel : commChannelVoCollection)
    {
        if(channel == null)
            continue;

        if(channel.getChannelType().equals(channelType) && channel.getCommValue().equals(channelValue))
            return channel;
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
public int compare(CommChannelVo o1, CommChannelVo o2)
{
    if (o1 != null && o1.getChannelType() != null && o2!=null && o2.getChannelType() != null)
    {
        int typeCompare = o1.getChannelType().compareTo(o2.getChannelType());

        if(typeCompare == 0 && o1.getCommValue() != null && o2.getCommValue() != null)
        {
            return o1.getCommValue().compareToIgnoreCase(o2.getCommValue());
        }

        return typeCompare;
    }

    if (o1 == null || o1.getChannelType() == null)
        return -1*order;

    if (o2 == null || o2.getChannelType() == null)
        return order;

    return 0;
}
项目:AvoinApotti    文件:VoMapper.java   
private boolean isCommChannelInCollection(CommChannelVo commChannel,CommChannelVoCollection coll)
{
    if(coll==null||coll.size()<1||commChannel==null)
    {
        return false;
    }
    for (CommChannelVo vo : coll)
    {
        if(commChannel.getChannelTypeIsNotNull()&&
                vo.getChannelTypeIsNotNull()&&
                commChannel.getChannelType().equals(vo.getChannelType())&&
                commChannel.getCommValueIsNotNull()&&
                vo.getCommValueIsNotNull()&&
                commChannel.getCommValue().equals(vo.getCommValue()))
        {
            return true;
        }
    }   
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromCommChannels(CommChannelVoCollection voCommChannels) 
{
    if(voCommChannels == null)
        return;

    for (int i = 0; i < voCommChannels.size(); i++)
    {
        CommChannelVo voCommChannel = voCommChannels.get(i);

        if (voCommChannel != null && voCommChannel.getChannelTypeIsNotNull())
        {
            grdCommChannelsRow rowCommChannel = form.ctnDetails().grdCommChannels().getRows().newRow();
            rowCommChannel.setcolType(voCommChannel.getChannelType());
            rowCommChannel.setcolContactValue(voCommChannel.getCommValue());
            rowCommChannel.setValue(voCommChannel);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Returns a collection of all comms channels populated on screen. 
 * @param null
 * @return CommChannelVoCollection
 */
private CommChannelVoCollection getCommChannels()
{
    CommChannelVoCollection coll = new CommChannelVoCollection();
    for (int i = 0; i < form.ctnGPDetails().lyrGPDetails().tabGPDetails().grdContacts().getRows().size(); i++)
    {
        grdContactsRow row = form.ctnGPDetails().lyrGPDetails().tabGPDetails().grdContacts().getRows().get(i);
        if (row.getcolContactType() != null && row.getcolContactValue() != null)
        {
            CommChannelVo comm = new CommChannelVo();
            comm.setChannelType(row.getcolContactType());
            comm.setCommValue(row.getcolContactValue());
            coll.add(comm);
        }
    }
    return coll;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Populates the comms channels grid using the given CommChannelVoCollection
 * @param CommChannelVoCollection
 */
private void populateContactsGrid(CommChannelVoCollection coll)
{
    form.ctnGPDetails().lyrGPDetails().tabGPDetails().grdContacts().getRows().clear();

    if (coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
        {
            CommChannelVo chan = coll.get(i);
            grdContactsRow row = form.ctnGPDetails().lyrGPDetails().tabGPDetails().grdContacts().getRows().newRow();
            row.setcolContactType(chan.getChannelType());
            row.setcolContactValue(chan.getCommValue());
            row.setTooltipForcolContactValue(chan.getCommValue());
            row.setValue(chan);
        }   
    }       
}
项目:AvoinApotti    文件:Logic.java   
private CommChannelVoCollection getCommChannels()
{
    CommChannelVoCollection coll = new CommChannelVoCollection();
    for (int i = 0; i < form.grdContacts().getRows().size(); i++)
    {
        grdContactsRow row = form.grdContacts().getRows().get(i);
        if (row.getcolType() != null && row.getcolContactValue() != null)
        {
            CommChannelVo comm = new CommChannelVo();
            comm.setChannelType(row.getcolType());
            comm.setCommValue(row.getcolContactValue());
            coll.add(comm);
        }
    }
    return coll;
}
项目:AvoinApotti    文件:Logic.java   
private void populateContactsGrid(CommChannelVoCollection coll)
{
    form.grdContacts().getRows().clear();

    if (coll == null)
        return;

    for (int i = 0; i < coll.size(); i++)
    {
        CommChannelVo chan = coll.get(i);
        grdContactsRow row = form.grdContacts().getRows().newRow();
        row.setcolType(chan.getChannelType());
        row.setcolContactValue(chan.getCommValue());
        row.setTooltipForcolContactValue(chan.getCommValue());
        row.setValue(chan);
    }
}
项目:openMAXIMS    文件:EDDischargeDetailsJobImpl.java   
private String getGpMail(GPLiteWithCommChannelsVo gp) 
{
    if(gp == null || gp.getCommChannels() == null)
        return null;

    for(CommChannelVo channel : gp.getCommChannels())
    {
        if(channel == null)
            continue;

        if(ChannelType.EMAIL.equals(channel.getChannelType()))
            return channel.getCommValue();
    }

    return null;
}
项目:openMAXIMS    文件:EDEmpDischargeDetailsJobImpl.java   
private String getGpMail(GPLiteWithCommChannelsVo gp) 
{
    if(gp == null || gp.getCommChannels() == null)
        return null;

    for(CommChannelVo channel : gp.getCommChannels())
    {
        if(channel == null)
            continue;

        if(ChannelType.EMAIL.equals(channel.getChannelType()))
            return channel.getCommValue();
    }

    return null;
}
项目:openMAXIMS    文件:EDSupplementaryDischargeLetterJobImpl.java   
private String getGpMail(GPLiteWithCommChannelsVo gp) 
{
    if(gp == null || gp.getCommChannels() == null)
        return null;

    for(CommChannelVo channel : gp.getCommChannels())
    {
        if(channel == null)
            continue;

        if(ChannelType.EMAIL.equals(channel.getChannelType()))
            return channel.getCommValue();
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    if (sender.equals(form.lyrContact().tabPageContact().grdCommChannels()))
    {           
        switch (menuItemID)
        {
            case ims.core.forms.pdsrelatedpersondialog.GenForm.ContextMenus.CoreNamespace.IdentifierGrid.Add :
                grdCommChannelsRow rowComm = form.lyrContact().tabPageContact().grdCommChannels().getRows().newRow(true);
                rowComm.setValue(new CommChannelVo());
                setRemoveCommunicationMenuVisibility();
            break;
            case ims.core.forms.pdsrelatedpersondialog.GenForm.ContextMenus.CoreNamespace.IdentifierGrid.Remove :
                removeCommChannel();
                setRemoveCommunicationMenuVisibility();
            break;
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, ims.framework.Control sender) throws ims.framework.exceptions.PresentationLogicException
{
    if (sender.equals(form.grdCommChannels()))
    {
        switch (menuItemID)
        {
            case GenForm.ContextMenus.CoreNamespace.IdentifierGrid.Add :
                GenForm.grdCommChannelsRow rowComm = form.grdCommChannels().getRows().newRow(true);
                rowComm.setValue(new CommChannelVo());
                setRemoveCommunicationMenuVisibility();
            break;
            case GenForm.ContextMenus.CoreNamespace.IdentifierGrid.Remove :
                removeCommChannel();
                setRemoveCommunicationMenuVisibility();
            break;
        }
    }   
}
项目:openMAXIMS    文件:Logic.java   
private void prePopulateCommChannels()
{
    //WDEV-22806 - only for SVUH -  IMS pre-populate three phone numbers Home (Mandatory), Mobile (Mandatory), Work (SVUH to confirm) 
    if (form.getMode().equals(FormMode.EDIT) && ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("IRISH") && form.grdCommChannels().getRows().size() == 0)
    {
        grdCommChannelsRow rowCommChannel = form.grdCommChannels().getRows().newRow();
        rowCommChannel.setcolType(ChannelType.MOBILE);
        rowCommChannel.setValue(new CommChannelVo());
        rowCommChannel = form.grdCommChannels().getRows().newRow();
        rowCommChannel.setcolType(ChannelType.HOME_PHONE);
        rowCommChannel.setValue(new CommChannelVo());
        rowCommChannel = form.grdCommChannels().getRows().newRow();
        rowCommChannel.setcolType(ChannelType.WORK_PHONE);
        rowCommChannel.setValue(new CommChannelVo());
    }
}
项目:openMAXIMS    文件:Logic.java   
public int compare(CommChannelVo o1, CommChannelVo o2)
{
    if (o1 != null && o1.getChannelType() != null && o2!=null && o2.getChannelType() != null)
    {
        int typeCompare = o1.getChannelType().compareTo(o2.getChannelType());

        if(typeCompare == 0 && o1.getCommValue() != null && o2.getCommValue() != null)
        {
            return o1.getCommValue().compareToIgnoreCase(o2.getCommValue());
        }

        return typeCompare;
    }

    if (o1 == null || o1.getChannelType() == null)
        return -1*order;

    if (o2 == null || o2.getChannelType() == null)
        return order;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
private String getTelephone(GpLiteVo gp)
{
    if (gp == null)
        return null;
    if (!gp.getCommChannelsIsNotNull())
        return null;
    for (int i = 0 ; i < gp.getCommChannels().size() ; i++)
    {
        CommChannelVo commChannelVo = gp.getCommChannels().get(i);
        if (ChannelType.GEN_PHONE.equals(commChannelVo.getChannelType()) || 
                ChannelType.HOME_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.WORK_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.MOBILE.equals(commChannelVo.getChannelType()))
                return commChannelVo.getCommValue();
    }   
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow getChannelRow(DynamicGridRow row, DynamicGridColumn column, CommChannelVo channel) 
{
    if(row == null)
        return null;

    for(int i=0; i<row.getRows().size(); i++)
    {
        if(row.getRows().get(i).getValue().equals(channel.getChannelType()) && (row.getRows().get(i).getCells().get(column) == null || (row.getRows().get(i).getCells().get(column) != null && row.getRows().get(i).getCells().get(column).getValue() == null)))
        {
            return row.getRows().get(i);
        }
    }

    DynamicGridRow childRow = row.getRows().newRow();

    DynamicGridCell cell = childRow.getCells().newCell(getColumn(COL_FIELD_NAME), DynamicCellType.STRING);
    cell.setValue("<b>" + channel.getChannelType().getText() + "</b>");
    cell.setReadOnly(true);

    childRow.setValue(channel.getChannelType());
    return childRow;
}
项目:openMAXIMS    文件:Logic.java   
private CommChannelVo getCommChannel(ChannelType channelType, Object channelValue, CommChannelVoCollection commChannelVoCollection) 
{
    if(commChannelVoCollection == null)
        return null;

    if(channelType == null || channelValue == null)
        return null;

    for(CommChannelVo channel : commChannelVoCollection)
    {
        if(channel == null)
            continue;

        if(channel.getChannelType().equals(channelType) && channel.getCommValue().equals(channelValue))
            return channel;
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(CommChannelVo o1, CommChannelVo o2)
{
    if (o1 != null && o1.getChannelType() != null && o2!=null && o2.getChannelType() != null)
    {
        int typeCompare = o1.getChannelType().compareTo(o2.getChannelType());

        if(typeCompare == 0 && o1.getCommValue() != null && o2.getCommValue() != null)
        {
            return o1.getCommValue().compareToIgnoreCase(o2.getCommValue());
        }

        return typeCompare;
    }

    if (o1 == null || o1.getChannelType() == null)
        return -1*order;

    if (o2 == null || o2.getChannelType() == null)
        return order;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{

    if (sender.equals(form.grdCommChannels()))
    {
        switch (menuItemID)
        {
            case ims.core.forms.nextofkingpidentifierscc.GenForm.ContextMenus.CoreNamespace.IdentifierGrid.Add :
                ims.core.forms.nextofkingpidentifierscc.GenForm.grdCommChannelsRow rowComm = form.grdCommChannels().getRows().newRow();
                rowComm.setValue(new CommChannelVo());
                form.getLocalContext().setPatientDetailsTabAction(PatientDetailsTab.ADDMENU);
                form.fireCustomControlValueChanged();
                //form.getLocalContext().setbCommChannelsEdited(true);
            break;
            case ims.core.forms.nextofkingpidentifierscc.GenForm.ContextMenus.CoreNamespace.IdentifierGrid.Remove :
                removeCommChannel();
                setRemoveCommunicationMenuVisibility();
                form.getLocalContext().setPatientDetailsTabAction(PatientDetailsTab.REMOVEMENU);
                form.fireCustomControlValueChanged();
                //form.getLocalContext().setbCommChannelsEdited(true);
            break;
        }
    }

}
项目:openMAXIMS    文件:PdsQuery.java   
public void populatePersonCommChannels(CommChannelVoCollection coll, COCTMT000202UK02PartOfWhole[] commChannels)
{
    for(COCTMT000202UK02PartOfWhole commChannel : commChannels)
    {
        if(commChannel.getTelecom() != null)
        {
            TELNPFITUseRequired telecom = commChannel.getTelecom();

            CommChannelVo commChannelVo = buildCommChannel(telecom);

            if(commChannelVo != null)
            {
                coll.add(commChannelVo);
            }
        }
    }

}
项目:openMAXIMS    文件:VoMapper.java   
private boolean isCommChannelInCollection(CommChannelVo commChannel,CommChannelVoCollection coll)
{
    if(coll==null||coll.size()<1||commChannel==null)
    {
        return false;
    }
    for (CommChannelVo vo : coll)
    {
        if(commChannel.getChannelTypeIsNotNull()&&
                vo.getChannelTypeIsNotNull()&&
                commChannel.getChannelType().equals(vo.getChannelType())&&
                commChannel.getCommValueIsNotNull()&&
                vo.getCommValueIsNotNull()&&
                commChannel.getCommValue().equals(vo.getCommValue()))
        {
            return true;
        }
    }   
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromCommChannels(CommChannelVoCollection voCommChannels) 
{
    if(voCommChannels == null)
        return;

    for (int i = 0; i < voCommChannels.size(); i++)
    {
        CommChannelVo voCommChannel = voCommChannels.get(i);

        if (voCommChannel != null && voCommChannel.getChannelTypeIsNotNull())
        {
            grdCommChannelsRow rowCommChannel = form.ctnDetails().grdCommChannels().getRows().newRow();
            rowCommChannel.setcolType(voCommChannel.getChannelType());
            rowCommChannel.setcolContactValue(voCommChannel.getCommValue());
            rowCommChannel.setValue(voCommChannel);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Returns a collection of all comms channels populated on screen. 
 * @param null
 * @return CommChannelVoCollection
 */
private CommChannelVoCollection getCommChannels()
{
    CommChannelVoCollection coll = new CommChannelVoCollection();
    for (int i = 0; i < form.ctnGPDetails().lyrGPDetails().tabGPDetails().grdContacts().getRows().size(); i++)
    {
        grdContactsRow row = form.ctnGPDetails().lyrGPDetails().tabGPDetails().grdContacts().getRows().get(i);
        if (row.getcolContactType() != null && row.getcolContactValue() != null)
        {
            CommChannelVo comm = new CommChannelVo();
            comm.setChannelType(row.getcolContactType());
            comm.setCommValue(row.getcolContactValue());
            coll.add(comm);
        }
    }
    return coll;
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Populates the comms channels grid using the given CommChannelVoCollection
 * @param CommChannelVoCollection
 */
private void populateContactsGrid(CommChannelVoCollection coll)
{
    form.ctnGPDetails().lyrGPDetails().tabGPDetails().grdContacts().getRows().clear();

    if (coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
        {
            CommChannelVo chan = coll.get(i);
            grdContactsRow row = form.ctnGPDetails().lyrGPDetails().tabGPDetails().grdContacts().getRows().newRow();
            row.setcolContactType(chan.getChannelType());
            row.setcolContactValue(chan.getCommValue());
            row.setTooltipForcolContactValue(chan.getCommValue());
            row.setValue(chan);
        }   
    }       
}
项目:openMAXIMS    文件:Logic.java   
private CommChannelVoCollection getCommChannels()
{
    CommChannelVoCollection coll = new CommChannelVoCollection();
    for (int i = 0; i < form.grdContacts().getRows().size(); i++)
    {
        grdContactsRow row = form.grdContacts().getRows().get(i);
        if (row.getcolType() != null && row.getcolContactValue() != null)
        {
            CommChannelVo comm = new CommChannelVo();
            comm.setChannelType(row.getcolType());
            comm.setCommValue(row.getcolContactValue());
            coll.add(comm);
        }
    }
    return coll;
}
项目:openMAXIMS    文件:Logic.java   
private void populateContactsGrid(CommChannelVoCollection coll)
{
    form.grdContacts().getRows().clear();

    if (coll == null)
        return;

    for (int i = 0; i < coll.size(); i++)
    {
        CommChannelVo chan = coll.get(i);
        grdContactsRow row = form.grdContacts().getRows().newRow();
        row.setcolType(chan.getChannelType());
        row.setcolContactValue(chan.getCommValue());
        row.setTooltipForcolContactValue(chan.getCommValue());
        row.setValue(chan);
    }
}
项目:openMAXIMS    文件:Logic.java   
private CommChannelVoCollection getChannelsFromContactGrid()
{
    CommChannelVoCollection coll = new CommChannelVoCollection();

    for(int i=0; i<form.grdContact().getRows().size(); i++)
    {
        grdContactRow row = form.grdContact().getRows().get(i);
        if (row.getcolType() != null && row.getcolContactValue() != null)
        {
            CommChannelVo comm = new CommChannelVo();
            comm.setChannelType(row.getcolType());
            comm.setCommValue(row.getcolContactValue());
            coll.add(comm);
        }
    }

    return coll.size() > 0 ? coll : null;
}
项目:openMAXIMS    文件:Logic.java   
private void populateContactsGrid(CommChannelVoCollection coll)
{
    form.grdContact().getRows().clear();

    if (coll == null)
        return;

    for (int i = 0; i < coll.size(); i++)
    {
        CommChannelVo chan = coll.get(i);
        grdContactRow row = form.grdContact().getRows().newRow();
        row.setcolType(chan.getChannelType());
        row.setcolContactValue(chan.getCommValue());
        row.setTooltipForcolContactValue(chan.getCommValue());
        row.setValue(chan);
    }
}
项目:openMAXIMS    文件:Logic.java   
private CommChannelVoCollection getCommChannels() 
{
    if(!form.chkHome().getValue() && !form.chkMobile().getValue())
        return null;

    CommChannelVoCollection clientCommChannels = new CommChannelVoCollection();

    if(form.chkHome().getValue() && form.txtHomePhone().getValue() != null && this.form.txtHomePhone().getValue().trim().length() > 0)
    {
        CommChannelVo clientHomePhone = new CommChannelVo();
        clientHomePhone.setChannelType(ChannelType.HOME_PHONE);
        clientHomePhone.setCommValue(this.form.txtHomePhone().getValue());
        clientCommChannels.add(clientHomePhone);
    }
    if(form.chkMobile().getValue() && this.form.txtMobilePhone().getValue() != null && this.form.txtMobilePhone().getValue().trim().length() > 0)
    {
        CommChannelVo clientMobilePhone = new CommChannelVo();
        clientMobilePhone.setChannelType(ChannelType.MOBILE);
        clientMobilePhone.setCommValue(this.form.txtMobilePhone().getValue());
        clientCommChannels.add(clientMobilePhone);
    }

    return clientCommChannels;
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(PatientShort pat)
{

    CommChannelVoCollection voCommChannelColl = pat.getCommChannels();

    ims.clinical.forms.patientcontactdlg.GenForm.grdCommChannelsRow rowCommChannel;

    if (voCommChannelColl != null)
    {
        for (int i = 0; i < voCommChannelColl.size(); i++)
        {
            CommChannelVo voCommChannel = voCommChannelColl.get(i);

            if (voCommChannel.getChannelTypeIsNotNull())
            {
                rowCommChannel = form.grdCommChannels().getRows().newRow();
                rowCommChannel.setcolType(voCommChannel.getChannelType());
                rowCommChannel.setcolContactValue(voCommChannel.getCommValue());
                rowCommChannel.setValue(voCommChannel);
            }
        }

    }
}
项目:openMAXIMS    文件:Logic.java   
private String getTelephone(GpLiteVo gp)
{
    if (gp == null)
        return null;
    if (!gp.getCommChannelsIsNotNull())
        return null;
    for (int i = 0 ; i < gp.getCommChannels().size() ; i++)
    {
        CommChannelVo commChannelVo = gp.getCommChannels().get(i);
        if (ChannelType.GEN_PHONE.equals(commChannelVo.getChannelType()) || 
                ChannelType.HOME_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.WORK_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.MOBILE.equals(commChannelVo.getChannelType()))
                return commChannelVo.getCommValue();
    }   
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow getChannelRow(DynamicGridRow row, DynamicGridColumn column, CommChannelVo channel) 
{
    if(row == null)
        return null;

    for(int i=0; i<row.getRows().size(); i++)
    {
        if(row.getRows().get(i).getValue().equals(channel.getChannelType()) && (row.getRows().get(i).getCells().get(column) == null || (row.getRows().get(i).getCells().get(column) != null && row.getRows().get(i).getCells().get(column).getValue() == null)))
        {
            return row.getRows().get(i);
        }
    }

    DynamicGridRow childRow = row.getRows().newRow();

    DynamicGridCell cell = childRow.getCells().newCell(getColumn(COL_FIELD_NAME), DynamicCellType.STRING);
    cell.setValue("<b>" + channel.getChannelType().getText() + "</b>");
    cell.setReadOnly(true);

    childRow.setValue(channel.getChannelType());
    return childRow;
}
项目:openMAXIMS    文件:Logic.java   
private CommChannelVo getCommChannel(ChannelType channelType, Object channelValue, CommChannelVoCollection commChannelVoCollection) 
{
    if(commChannelVoCollection == null)
        return null;

    if(channelType == null || channelValue == null)
        return null;

    for(CommChannelVo channel : commChannelVoCollection)
    {
        if(channel == null)
            continue;

        if(channel.getChannelType().equals(channelType) && channel.getCommValue().equals(channelValue))
            return channel;
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(CommChannelVo o1, CommChannelVo o2)
{
    if (o1 != null && o1.getChannelType() != null && o2!=null && o2.getChannelType() != null)
    {
        int typeCompare = o1.getChannelType().compareTo(o2.getChannelType());

        if(typeCompare == 0 && o1.getCommValue() != null && o2.getCommValue() != null)
        {
            return o1.getCommValue().compareToIgnoreCase(o2.getCommValue());
        }

        return typeCompare;
    }

    if (o1 == null || o1.getChannelType() == null)
        return -1*order;

    if (o2 == null || o2.getChannelType() == null)
        return order;

    return 0;
}
项目:openMAXIMS    文件:VoMapper.java   
private boolean isCommChannelInCollection(CommChannelVo commChannel,CommChannelVoCollection coll)
{
    if(coll==null||coll.size()<1||commChannel==null)
    {
        return false;
    }
    for (CommChannelVo vo : coll)
    {
        if(commChannel.getChannelTypeIsNotNull()&&
                vo.getChannelTypeIsNotNull()&&
                commChannel.getChannelType().equals(vo.getChannelType())&&
                commChannel.getCommValueIsNotNull()&&
                vo.getCommValueIsNotNull()&&
                commChannel.getCommValue().equals(vo.getCommValue()))
        {
            return true;
        }
    }   
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromCommChannels(CommChannelVoCollection voCommChannels) 
{
    if(voCommChannels == null)
        return;

    for (int i = 0; i < voCommChannels.size(); i++)
    {
        CommChannelVo voCommChannel = voCommChannels.get(i);

        if (voCommChannel != null && voCommChannel.getChannelTypeIsNotNull())
        {
            grdCommChannelsRow rowCommChannel = form.ctnDetails().grdCommChannels().getRows().newRow();
            rowCommChannel.setcolType(voCommChannel.getChannelType());
            rowCommChannel.setcolContactValue(voCommChannel.getCommValue());
            rowCommChannel.setValue(voCommChannel);
        }
    }
}