Finder methods quandry
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   mike_thompson
Posted On:   Thursday, May 17, 2001 10:47 AM

Very new to EJBs, so I have a style question. Say I want to expose a file system through EJBs. So I have a FileEJB. public interface FileHome extends EJBHome { public File findByAbsoluteName(String absName) throws ... } public interface File extends EJBObject { public String getAbsoluteName() throws ...; } My question is about finder methods on the home interface and getting children of a FileEJB. Is it more common to have a finder method on the home interface i.e. Collection findByParent(String parentName) throws FinderException. or a method on the File interface itself Collection getChildren(); or both? I a   More>>

Very new to EJBs, so I have a style question. Say I want to expose a file
system through EJBs. So I have a FileEJB.

public interface FileHome extends EJBHome
{
public File findByAbsoluteName(String absName) throws ...
}

public interface File extends EJBObject
{
public String getAbsoluteName() throws ...;
}

My question is about finder methods on the home interface and getting
children of a FileEJB. Is it more common to have a finder method on the
home interface i.e.
Collection findByParent(String parentName) throws FinderException.
or a method on the File interface itself
Collection getChildren();
or both?

I assume that the getChildren method of the File interface would do some query to get all the children file
names and go to the home interface and do a findByAbsoluteName(String name).

Just curious to see what other people are doing.

   <<Less
About | Sitemap | Contact