package demo;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;
public abstract class StoryBean {
public abstract long getId();
protected abstract void setId( long id );
public abstract String getAuthor();
public abstract void setAuthor( String author );
public abstract String getSubject();
public abstract void setSubject( String subject );
public abstract String getContent();
public abstract void setContent( String content );
public StoryKey ejbCreate( String author, String subject )
throws CreateException
{
setId( System.currentTimeMillis() );
setAuthor( author );
setSubject( subject );
return null;
}
public void ejbPostCreate( String author, String subject )
{
}
public void ejbRemove() throws RemoveException {}
public interface CMP {
public StoryKey ejbFindById( long id )
throws FinderException;
public StoryKey ejbFindByAuthor( String author )
throws FinderException;
}
public void setEntityContext( EntityContext entityContext ) {}
public void unsetEntityContext() {}
public void ejbActivate() {}
public void ejbPassivate() {}
public void ejbLoad() {}
public void ejbStore() {}
}