|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--test.tester.model.dao.StoryPictureBroker
For selecting some rows, you can create a method inside here, or use any of the ones that are already dones (most common ones).
Some methods return a single StoryPicture
,
like selectById(Integer)
.
Here is one example for getting ALL rows from the STORY_PICTURE
table:
// as you can see, it is a static method // you can use here any of the select*(...) methods Collection result = StoryPictureBroker.selectAll(); Iterator iterator = result.iterator(); while (iterator.hasNext()) { StoryPicture storyPicture = (StoryPicture) iterator.next(); System.out.println(storyPicture.toString()); }
StoryPicture
Constructor Summary | |
StoryPictureBroker()
|
Method Summary | |
static int |
count()
Gets how many rows has this table. |
static void |
deleteByStoryPictureId(java.lang.Integer storyPictureId)
Deletes a StoryPicture with a given a
StoryPictureId . |
static void |
insert(StoryPicture storyPicture)
Inserts a new StoryPicture in the database. |
static java.util.Collection |
selectAll()
Select all rows from the STORY_PICTURE , and then returns each row as one instance of
StoryPicture , all of them inside a Collection. |
static java.util.Collection |
selectByBody(java.io.ByteArrayInputStream body)
Select all rows from the STORY_PICTURE table, given a body . |
static java.util.Collection |
selectByStoryId(java.lang.Integer storyId)
Select all rows from the STORY_PICTURE table, given a storyId . |
static StoryPicture |
selectByStoryPictureId(java.lang.Integer storyPictureId)
Select a row from the STORY_PICTURE table, given a storyPictureId . |
static java.util.Collection |
selectByThumbnail(java.io.ByteArrayInputStream thumbnail)
Select all rows from the STORY_PICTURE table, given a thumbnail . |
static java.util.Collection |
selectByTitle(java.lang.String title)
Select all rows from the STORY_PICTURE table, given a title . |
static void |
updateByStoryPictureId(StoryPicture storyPicture)
Updates a StoryPicture , using its primary key
StoryPictureId . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StoryPictureBroker()
Method Detail |
public static java.util.Collection selectAll() throws DAOException
STORY_PICTURE
, and then returns each row as one instance of
StoryPicture
, all of them inside a Collection. It never returns null, maybe a
empty Collection.
DAOException
public static int count() throws DAOException
DAOException
public static void insert(StoryPicture storyPicture) throws DAOException
StoryPicture
in the database.
DAOException
public static void deleteByStoryPictureId(java.lang.Integer storyPictureId) throws DAOException
StoryPicture
with a given a
StoryPictureId
.
DAOException
public static void updateByStoryPictureId(StoryPicture storyPicture) throws DAOException
StoryPicture
, using its primary key
StoryPictureId
.
DAOException
public static StoryPicture selectByStoryPictureId(java.lang.Integer storyPictureId) throws DAOException
STORY_PICTURE
table, given a storyPictureId
.
As storyPictureId
is a primary key, there is no need
to return a Collection
.
DAOException
public static java.util.Collection selectByTitle(java.lang.String title) throws DAOException
STORY_PICTURE
table, given a title
.
Then returns each row as one instance of StoryPicture
, all of them inside a
Collection. It never returns null, maybe an empty Collection
.
DAOException
public static java.util.Collection selectByBody(java.io.ByteArrayInputStream body) throws DAOException
STORY_PICTURE
table, given a body
.
Then returns each row as one instance of StoryPicture
, all of them inside a
Collection. It never returns null, maybe an empty Collection
.
DAOException
public static java.util.Collection selectByThumbnail(java.io.ByteArrayInputStream thumbnail) throws DAOException
STORY_PICTURE
table, given a thumbnail
.
Then returns each row as one instance of StoryPicture
, all of them inside a
Collection. It never returns null, maybe an empty Collection
.
DAOException
public static java.util.Collection selectByStoryId(java.lang.Integer storyId) throws DAOException
STORY_PICTURE
table, given a storyId
.
Then returns each row as one instance of StoryPicture
, all of them inside a
Collection. It never returns null, maybe an empty Collection
.
DAOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |