package cylikon.YahooEnt; import javax.ejb.EJBObject; import java.rmi.RemoteException; import java.sql.SQLException; import sun.jdbc.rowset.CachedRowSet; import javax.naming.NamingException; import java.util.Vector; public interface Category extends EJBObject { public CachedRowSet crs() throws RemoteException; public String getCatName() throws RemoteException; public int getCatNo() throws RemoteException; // some metadata stuff... // crs.size() method in CachedRowSet to get row count public int getRowCount() throws RemoteException; public String getDBUrl() throws RemoteException; public int getColCount() throws RemoteException; public Vector MetaData() throws RemoteException; public String MetaDataOrder() throws RemoteException; // method below will return false(0) if db access failed,true(1) otherwise public int crsReady() throws RemoteException; public String crsError() throws RemoteException; //method for releasing crs resources public void crsRelease() throws RemoteException,SQLException; // method for refreshing the crs with updated data from the database public void crsRefresh() throws RemoteException,SQLException; // method for creating a complete new CachedRowSet with refreshed data from the DB // this method will be called by the ejbCreate method initially to have a populated // CachedRowSet immediately available. After that, it should only need to be called // if the crsRelease() method has been called, which would empty the cached rowset and // set the cached rowset to null public void PopulateRowSet() throws RemoteException,SQLException; } //end interface