FileDocCategorySizeDatePackage
PeopleFinderBean.javaAPI DocExample3247Thu Dec 15 22:38:10 GMT 2005com.oreilly.jent.annotation.xdoclet.ejb

PeopleFinderBean

public class PeopleFinderBean extends Object implements javax.ejb.SessionBean
Implementation of our PeopleFinder EJB.
author
jfarley
ejb.bean
name="PeopleFinder" type="Stateless"

Fields Summary
Constructors Summary
public PeopleFinderBean()

        super();
    
Methods Summary
public voidejbActivate()

    
public voidejbCreate()

ejb.create-method

    
public voidejbPassivate()

    
public voidejbRemove()

    
public com.oreilly.jent.annotation.people.Person[]findPeople(com.oreilly.jent.annotation.people.SearchArg[] args)
Perform the actual search, using the PersonDAO.

ejb.interface-method
view-type=both

        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)