|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--test.tester.model.dao.MemberBroker
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 Member
,
like selectById(Integer)
.
Here is one example for getting ALL rows from the MEMBER
table:
// as you can see, it is a static method // you can use here any of the select*(...) methods Collection result = MemberBroker.selectAll(); Iterator iterator = result.iterator(); while (iterator.hasNext()) { Member member = (Member) iterator.next(); System.out.println(member.toString()); }
Member
Constructor Summary | |
MemberBroker()
|
Method Summary | |
static int |
count()
Gets how many rows has this table. |
static void |
deleteByMemberId(java.lang.Integer memberId)
Deletes a Member with a given a
MemberId . |
static void |
insert(Member member)
Inserts a new Member in the database. |
static java.util.Collection |
selectAll()
Select all rows from the MEMBER , and then returns each row as one instance of
Member , all of them inside a Collection. |
static java.util.Collection |
selectByConfirmValue(java.lang.String confirmValue)
Select all rows from the MEMBER table, given a confirmValue . |
static java.util.Collection |
selectByEmail(java.lang.String email)
Select all rows from the MEMBER table, given a email . |
static java.util.Collection |
selectByLoginName(java.lang.String loginName)
Select all rows from the MEMBER table, given a loginName . |
static Member |
selectByMemberId(java.lang.Integer memberId)
Select a row from the MEMBER table, given a memberId . |
static java.util.Collection |
selectByName(java.lang.String name)
Select all rows from the MEMBER table, given a name . |
static java.util.Collection |
selectByPasswordValue(java.lang.String passwordValue)
Select all rows from the MEMBER table, given a passwordValue . |
static void |
updateByMemberId(Member member)
Updates a Member , using its primary key
MemberId . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MemberBroker()
Method Detail |
public static java.util.Collection selectAll() throws DAOException
MEMBER
, and then returns each row as one instance of
Member
, 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(Member member) throws DAOException
Member
in the database.
DAOException
public static void deleteByMemberId(java.lang.Integer memberId) throws DAOException
Member
with a given a
MemberId
.
DAOException
public static void updateByMemberId(Member member) throws DAOException
Member
, using its primary key
MemberId
.
DAOException
public static Member selectByMemberId(java.lang.Integer memberId) throws DAOException
MEMBER
table, given a memberId
.
As memberId
is a primary key, there is no need
to return a Collection
.
DAOException
public static java.util.Collection selectByLoginName(java.lang.String loginName) throws DAOException
MEMBER
table, given a loginName
.
Then returns each row as one instance of Member
, all of them inside a
Collection. It never returns null, maybe an empty Collection
.
DAOException
public static java.util.Collection selectByPasswordValue(java.lang.String passwordValue) throws DAOException
MEMBER
table, given a passwordValue
.
Then returns each row as one instance of Member
, all of them inside a
Collection. It never returns null, maybe an empty Collection
.
DAOException
public static java.util.Collection selectByName(java.lang.String name) throws DAOException
MEMBER
table, given a name
.
Then returns each row as one instance of Member
, all of them inside a
Collection. It never returns null, maybe an empty Collection
.
DAOException
public static java.util.Collection selectByEmail(java.lang.String email) throws DAOException
MEMBER
table, given a email
.
Then returns each row as one instance of Member
, all of them inside a
Collection. It never returns null, maybe an empty Collection
.
DAOException
public static java.util.Collection selectByConfirmValue(java.lang.String confirmValue) throws DAOException
MEMBER
table, given a confirmValue
.
Then returns each row as one instance of Member
, 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 |