Class InvitationDao
- java.lang.Object
-
- org.silverpeas.core.socialnetwork.invitation.InvitationDao
-
@Repository public class InvitationDao extends Object
-
-
Constructor Summary
Constructors Constructor Description InvitationDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
deleteAllInvitations(Connection connection, int userId)
boolean
deleteInvitation(Connection connection, int invitationId)
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 invitationList<Invitation>
getAllMyInvitationsReceive(Connection connection, int myId)
List<Invitation>
getAllMyInvitationsSent(Connection connection, int myId)
Invitation
getInvitation(Connection connection, int id)
Invitation
getInvitation(Connection connection, int senderId, int receiverId)
boolean
isExists(Connection connection, int senderId, int receiverId)
-
-
-
Method Detail
-
deleteInvitation
public boolean deleteInvitation(Connection connection, int invitationId) throws SQLException
- Throws:
SQLException
-
deleteSameInvitations
public boolean deleteSameInvitations(Connection connection, int invitationId) throws SQLException
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
- Parameters:
connection
- connection to the databaseinvitationId
- the invitation identifier- Returns:
- true true when invitations from same sender identifier and receiver identifier are deleted, false else if
- Throws:
SQLException
- on SQL error
-
deleteAllInvitations
public boolean deleteAllInvitations(Connection connection, int userId) throws SQLException
- Throws:
SQLException
-
getInvitation
public Invitation getInvitation(Connection connection, int senderId, int receiverId) throws SQLException
- Throws:
SQLException
-
getInvitation
public Invitation getInvitation(Connection connection, int id) throws SQLException
- Throws:
SQLException
-
isExists
public boolean isExists(Connection connection, int senderId, int receiverId) throws SQLException
- Throws:
SQLException
-
getAllMyInvitationsSent
public List<Invitation> getAllMyInvitationsSent(Connection connection, int myId) throws SQLException
- Throws:
SQLException
-
getAllMyInvitationsReceive
public List<Invitation> getAllMyInvitationsReceive(Connection connection, int myId) throws SQLException
- Throws:
SQLException
-
-