Package clips.delegate.shedule.insertion_point

Source Code of clips.delegate.shedule.insertion_point.SheduleInsertionPointLocal

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package clips.delegate.shedule.insertion_point;

import beans.shedule.insertion_point.SheduleInsertionPointBean;
import beans.shedule.insertion_point.SheduleInsertionPointBeanRemote;
import cli_fmw.delegate.directory.complex.DirectoryLocator;
import clips.delegate.directory.complex.DirectoryWorkTypeItem;
import cli_fmw.delegate.DelegateSimple;
import cli_fmw.main.ClipsException;
import clips.delegate.directory.ro.DirectoryCollaborator;
import clips.delegate.directory.ro.DirectoryCollaboratorItem;
import java.util.Iterator;
import java.util.SortedSet;
import java.util.TreeSet;

/**
*
* @author axe
*/
public class SheduleInsertionPointLocal extends DelegateSimple<SheduleInsertionPointBeanRemote> {

    public SheduleInsertionPointLocal() throws ClipsException {
        super(SheduleInsertionPointBean.class.getSimpleName());
        initBean();
    }
   
    public SortedSet<DirectoryCollaboratorItem> getInsertionPoint(DirectoryWorkTypeItem wt)
            throws ClipsException {
        SortedSet<DirectoryCollaboratorItem> set = new TreeSet<DirectoryCollaboratorItem>();
        DirectoryCollaborator colls = DirectoryLocator.getDirectory(DirectoryCollaborator.class, false);
        Iterator<Integer> res;
        try {
            res = bean().getInsertionPoint(wt.getID()).iterator();
        } catch (Exception ex) {
            clearBean();
            throw new ClipsException("Не удалось загрузить данные", ex);
        }
        while (res.hasNext()) {
            Integer integer = res.next();
            set.add(colls.getItemFromID(integer));
        }
        return set;
    }
          
}
TOP

Related Classes of clips.delegate.shedule.insertion_point.SheduleInsertionPointLocal

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.