Help using getters & setters

I am wanting to make a bean that will connect to a database and bring back data depending on what was entered in a html form. I have been told it would be easier if i make a bean that holds details of a single video. I have done this below, my question is in the servlet that connects to the database how will i use the result set to use these getters and setters?

package site;

publicclass vidBean

{

//protected variables

protectedint recording_id;

protected String title;

protected String category;

publicvoid setRecId(int Rec)

{

recording_id = Rec;

}

publicint getRecId()

{

return recording_id;

}

... etc

[1308 byte] By [eastendersa] at [2007-11-27 0:16:35]
# 1

something likeList<VidBean> videos = new ArrayList<VidBean>();

while(rs.next()) {

VidBean video = new VidBean();

video.setRecId(rs.getInd("id"));

video.setTitle(rs.getString("title"));

video.setCategory(rs.getString("category"));

// ...

}

tsitha at 2007-7-11 22:04:44 > top of Java-index,Java Essentials,New To Java...
# 2
Thank you, I have one question though what does <VidBean> mean I have not used <> before
eastendersa at 2007-7-11 22:04:44 > top of Java-index,Java Essentials,New To Java...
# 3
> Thank you, I have one question though what does> <VidBean> mean I have not used <> before http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html
jverda at 2007-7-11 22:04:44 > top of Java-index,Java Essentials,New To Java...