|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--test.tester.model.dao.ArticlePictureBroker
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 ArticlePicture
,
like selectById(Integer)
.
Here is one example for getting ALL rows from the ARTICLE_PICTURE
table:
// as you can see, it is a static method // you can use here any of the select*(...) methods Collection result = ArticlePictureBroker.selectAll(); Iterator iterator = result.iterator(); while (iterator.hasNext()) { ArticlePicture articlePicture = (ArticlePicture) iterator.next(); System.out.println(articlePicture.toString()); }
ArticlePicture
Constructor Summary | |
ArticlePictureBroker()
|
Method Summary | |
static int |
count()
Gets how many rows has this table. |
static void |
deleteByArticlePictureId(java.lang.Integer articlePictureId)
Deletes a ArticlePicture with a given a
ArticlePictureId . |
static void |
insert(ArticlePicture articlePicture)
Inserts a new ArticlePicture in the database. |
static java.util.Collection |
selectAll()
Select all rows from the ARTICLE_PICTURE , and then returns each row as one instance of
ArticlePicture , all of them inside a Collection. |
static java.util.Collection |
selectByArticleId(java.lang.Integer articleId)
Select all rows from the ARTICLE_PICTURE table, given a articleId . |
static ArticlePicture |
selectByArticlePictureId(java.lang.Integer articlePictureId)
Select a row from the ARTICLE_PICTURE table, given a articlePictureId . |
static java.util.Collection |
selectByBody(java.io.ByteArrayInputStream body)
Select all rows from the ARTICLE_PICTURE table, given a body . |
static java.util.Collection |
selectByThumbnail(java.io.ByteArrayInputStream thumbnail)
Select all rows from the ARTICLE_PICTURE table, given a thumbnail . |
static java.util.Collection |
selectByTitle(java.lang.String title)
Select all rows from the ARTICLE_PICTURE table, given a title . |
static void |
updateByArticlePictureId(ArticlePicture articlePicture)
Updates a ArticlePicture , using its primary key
ArticlePictureId . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ArticlePictureBroker()
Method Detail |
public static java.util.Collection selectAll() throws DAOException
ARTICLE_PICTURE
, and then returns each row as one instance of
ArticlePicture
, 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(ArticlePicture articlePicture) throws DAOException
ArticlePicture
in the database.
DAOException
public static void deleteByArticlePictureId(java.lang.Integer articlePictureId) throws DAOException
ArticlePicture
with a given a
ArticlePictureId
.
DAOException
public static void updateByArticlePictureId(ArticlePicture articlePicture) throws DAOException
ArticlePicture
, using its primary key
ArticlePictureId
.
DAOException
public static ArticlePicture selectByArticlePictureId(java.lang.Integer articlePictureId) throws DAOException
ARTICLE_PICTURE
table, given a articlePictureId
.
As articlePictureId
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
ARTICLE_PICTURE
table, given a title
.
Then returns each row as one instance of ArticlePicture
, 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
ARTICLE_PICTURE
table, given a body
.
Then returns each row as one instance of ArticlePicture
, 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
ARTICLE_PICTURE
table, given a thumbnail
.
Then returns each row as one instance of ArticlePicture
, all of them inside a
Collection. It never returns null, maybe an empty Collection
.
DAOException
public static java.util.Collection selectByArticleId(java.lang.Integer articleId) throws DAOException
ARTICLE_PICTURE
table, given a articleId
.
Then returns each row as one instance of ArticlePicture
, 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 |