|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.socialnetwork.invitation.InvitationDao
public class InvitationDao
Constructor Summary | |
---|---|
InvitationDao()
|
Method Summary | |
---|---|
int |
createInvitation(Connection connection,
Invitation invitation)
Create new invitation |
boolean |
deleteInvitation(Connection connection,
int invitationId)
Delete invitation return true when this invitation was deleting |
boolean |
deleteSameInvitations(Connection connection,
int invitationId)
Delete invitations from same receiver and sender Delete nothing if invitation doesn't exist Delete one invitation if only one invitation has been sent from sender to receiver Delete two invitations if sender and receiver has sent an invitation |
List<Invitation> |
getAllMyInvitationsReceive(Connection connection,
int myId)
return All my invitations received |
List<Invitation> |
getAllMyInvitationsSent(Connection connection,
int myId)
return All my invitations sented |
Invitation |
getInvitation(Connection connection,
int id)
retrieve an invitation |
Invitation |
getInvitation(Connection connection,
int senderId,
int receiverId)
|
boolean |
isExists(Connection connection,
int senderId,
int receiverId)
return true if this invitation exist between 2 users |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InvitationDao()
Method Detail |
---|
public int createInvitation(Connection connection, Invitation invitation) throws UtilException, SQLException
connection
- invitation
-
UtilException
SQLException
public boolean deleteInvitation(Connection connection, int invitationId) throws SQLException
connection
- invitationId
- the invitation identifier
SQLException
public boolean deleteSameInvitations(Connection connection, int invitationId) throws SQLException
connection
- invitationId
- the invitation identifier
SQLException
public Invitation getInvitation(Connection connection, int senderId, int receiverId) throws SQLException
connection
- a ConnectionsenderId
- the sender identifierreceiverId
- the receiver identifier
SQLException
public Invitation getInvitation(Connection connection, int id) throws SQLException
connection
- id
-
SQLException
public boolean isExists(Connection connection, int senderId, int receiverId) throws SQLException
connection
- senderId
- receiverId
-
SQLException
public List<Invitation> getAllMyInvitationsSent(Connection connection, int myId) throws SQLException
connection
- myId
-
SQLException
public List<Invitation> getAllMyInvitationsReceive(Connection connection, int myId) throws SQLException
connection
- myId
-
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |