FileDocCategorySizeDatePackage
PeopleFinderBean.javaAPI DocExample3343Thu Dec 15 21:34:16 GMT 2005com.oreilly.jent.people.ejb

PeopleFinderBean

public class PeopleFinderBean extends Object implements javax.ejb.SessionBean
Implementation of our PeopleFinder EJB.
author
jfarley

Fields Summary
Constructors Summary
public PeopleFinderBean()

        super();
    
Methods Summary
public voidejbActivate()

    
public voidejbCreate()

    
public voidejbPassivate()

    
public voidejbRemove()

    
public com.oreilly.jent.people.Person[]findPeople(com.oreilly.jent.people.SearchArg[] args)

        Map searchArgsMap = new HashMap();
        for (int i = 0; i < args.length; i++) {
            searchArgsMap.put(args[i].getName(), args[i].getValue());
        }
        Collection people = PersonDAO.getInstance().findPeople(searchArgsMap);
        Person[] peopleArray = new Person[people.size()];
        Iterator pIter = people.iterator();
        int i = 0;
        while (pIter.hasNext()) {
            peopleArray[i++] = (Person)pIter.next();
        }
        return peopleArray;
    
public voidsetSessionContext(javax.ejb.SessionContext arg0)