test.tester.model.dao
Class MemberBroker

java.lang.Object
  |
  +--test.tester.model.dao.MemberBroker

public class MemberBroker
extends java.lang.Object

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());
     }
     
 

See Also:
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

MemberBroker

public MemberBroker()
Method Detail

selectAll

public static java.util.Collection selectAll()
                                      throws DAOException
Select all rows from the 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

count

public static int count()
                 throws DAOException
Gets how many rows has this table.

DAOException

insert

public static void insert(Member member)
                   throws DAOException
Inserts a new Member in the database.

DAOException

deleteByMemberId

public static void deleteByMemberId(java.lang.Integer memberId)
                             throws DAOException
Deletes a Member with a given a MemberId.

DAOException

updateByMemberId

public static void updateByMemberId(Member member)
                             throws DAOException
Updates a Member, using its primary key MemberId.

DAOException

selectByMemberId

public static Member selectByMemberId(java.lang.Integer memberId)
                               throws DAOException
Select a row from the MEMBER table, given a memberId. As memberId is a primary key, there is no need to return a Collection.
This method can return null, if no row matches.

DAOException

selectByLoginName

public static java.util.Collection selectByLoginName(java.lang.String loginName)
                                              throws DAOException
Select all rows from the 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

selectByPasswordValue

public static java.util.Collection selectByPasswordValue(java.lang.String passwordValue)
                                                  throws DAOException
Select all rows from the 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

selectByName

public static java.util.Collection selectByName(java.lang.String name)
                                         throws DAOException
Select all rows from the 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

selectByEmail

public static java.util.Collection selectByEmail(java.lang.String email)
                                          throws DAOException
Select all rows from the 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

selectByConfirmValue

public static java.util.Collection selectByConfirmValue(java.lang.String confirmValue)
                                                 throws DAOException
Select all rows from the 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