com.stratelia.webactiv.calendar.model
Class JournalDAO

java.lang.Object
  extended by com.stratelia.webactiv.calendar.model.JournalDAO

public class JournalDAO
extends Object


Field Summary
static String COLUMNNAMES
           
 
Constructor Summary
JournalDAO()
           
 
Method Summary
 String addJournal(Connection con, JournalHeader journal)
           
 Collection<SchedulableCount> countMonthJournalsForUser(Connection con, String month, String userId, String categoryId, String participation)
           
 Collection<JournalHeader> getDayJournalHeadersForUser(Connection con, String day, String userId, String categoryId, String participation)
           
 JournalHeader getJournalHeader(Connection con, String journalId)
           
 JournalHeader getJournalHeaderFromResultSet(ResultSet rs)
           
 Collection<JournalHeader> getJournalHeadersForUserAfterDate(Connection con, String userId, Date startDate, int nbReturned)
           
 List<SocialInformationEvent> getLastEventsForMyContacts(Connection con, String day, String myId, List<String> myContactsIds, Date begin, Date end)
          get Last Social Events for a given list of my Contacts accordint to the type of data base used(PostgreSQL,Oracle,MMS) .
 List<SocialInformationEvent> getMyLastEvents_MSS(Connection con, String day, String myId, Date begin, Date end)
          get my Last Social Events when data base is MMS.
 List<SocialInformationEvent> getMyLastEvents(Connection con, String day, String myId, Date begin, Date end)
          get my Last Social Events accordint to the type of data base used(PostgreSQL,Oracle,MMS) .
 List<SocialInformationEvent> getNextEventsForMyContacts(Connection con, String day, String myId, List<String> myContactsIds, Date begin, Date end)
          get Next Social Events for a given list of my Contacts accordint to the type of data base used(PostgreSQL,Oracle,MMS) .
 List<JournalHeader> getNextEventsForUser(Connection con, String day, String userId, String classification, Date begin, Date end)
          get next JournalHeader for this user accordint to the type of data base used(PostgreSQL,Oracle,MMS)
 Collection<JournalHeader> getNextJournalHeadersForUser(Connection con, String day, String userId, String categoryId, String participation)
           
 Collection<JournalHeader> getOutlookJournalHeadersForUser(Connection con, String userId)
           
 Collection<JournalHeader> getOutlookJournalHeadersForUserAfterDate(Connection con, String userId, Date startDate)
           
 Collection<JournalHeader> getPeriodJournalHeadersForUser(Connection con, String begin, String end, String userId, String categoryId, String participation)
           
 Collection<JournalHeader> getTentativeJournalHeadersForUser(Connection con, String userId)
           
 boolean hasTentativeJournalsForUser(Connection con, String userId)
           
 void removeJournal(Connection con, String id)
           
 void updateJournal(Connection con, JournalHeader journal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMNNAMES

public static final String COLUMNNAMES
See Also:
Constant Field Values
Constructor Detail

JournalDAO

public JournalDAO()
Method Detail

addJournal

public String addJournal(Connection con,
                         JournalHeader journal)
                  throws SQLException,
                         UtilException,
                         CalendarException
Throws:
SQLException
UtilException
CalendarException

updateJournal

public void updateJournal(Connection con,
                          JournalHeader journal)
                   throws SQLException,
                          CalendarException
Throws:
SQLException
CalendarException

removeJournal

public void removeJournal(Connection con,
                          String id)
                   throws SQLException,
                          CalendarException
Throws:
SQLException
CalendarException

hasTentativeJournalsForUser

public boolean hasTentativeJournalsForUser(Connection con,
                                           String userId)
                                    throws SQLException,
                                           ParseException
Throws:
SQLException
ParseException

getTentativeJournalHeadersForUser

public Collection<JournalHeader> getTentativeJournalHeadersForUser(Connection con,
                                                                   String userId)
                                                            throws SQLException,
                                                                   ParseException
Throws:
SQLException
ParseException

getDayJournalHeadersForUser

public Collection<JournalHeader> getDayJournalHeadersForUser(Connection con,
                                                             String day,
                                                             String userId,
                                                             String categoryId,
                                                             String participation)
                                                      throws SQLException,
                                                             ParseException
Throws:
SQLException
ParseException

getNextJournalHeadersForUser

public Collection<JournalHeader> getNextJournalHeadersForUser(Connection con,
                                                              String day,
                                                              String userId,
                                                              String categoryId,
                                                              String participation)
                                                       throws SQLException,
                                                              ParseException
Throws:
SQLException
ParseException

getNextEventsForUser

public List<JournalHeader> getNextEventsForUser(Connection con,
                                                String day,
                                                String userId,
                                                String classification,
                                                Date begin,
                                                Date end)
                                         throws SQLException,
                                                ParseException
get next JournalHeader for this user accordint to the type of data base used(PostgreSQL,Oracle,MMS)

Parameters:
con -
day -
userId -
classification -
limit -
offset -
Returns:
Throws:
SQLException
ParseException

countMonthJournalsForUser

public Collection<SchedulableCount> countMonthJournalsForUser(Connection con,
                                                              String month,
                                                              String userId,
                                                              String categoryId,
                                                              String participation)
                                                       throws SQLException
Throws:
SQLException

getPeriodJournalHeadersForUser

public Collection<JournalHeader> getPeriodJournalHeadersForUser(Connection con,
                                                                String begin,
                                                                String end,
                                                                String userId,
                                                                String categoryId,
                                                                String participation)
                                                         throws SQLException,
                                                                ParseException
Throws:
SQLException
ParseException

getJournalHeaderFromResultSet

public JournalHeader getJournalHeaderFromResultSet(ResultSet rs)
                                            throws SQLException,
                                                   ParseException
Throws:
SQLException
ParseException

getJournalHeader

public JournalHeader getJournalHeader(Connection con,
                                      String journalId)
                               throws SQLException,
                                      CalendarException,
                                      ParseException
Throws:
SQLException
CalendarException
ParseException

getOutlookJournalHeadersForUser

public Collection<JournalHeader> getOutlookJournalHeadersForUser(Connection con,
                                                                 String userId)
                                                          throws SQLException,
                                                                 CalendarException,
                                                                 ParseException
Throws:
SQLException
CalendarException
ParseException

getOutlookJournalHeadersForUserAfterDate

public Collection<JournalHeader> getOutlookJournalHeadersForUserAfterDate(Connection con,
                                                                          String userId,
                                                                          Date startDate)
                                                                   throws SQLException,
                                                                          CalendarException,
                                                                          ParseException
Throws:
SQLException
CalendarException
ParseException

getJournalHeadersForUserAfterDate

public Collection<JournalHeader> getJournalHeadersForUserAfterDate(Connection con,
                                                                   String userId,
                                                                   Date startDate,
                                                                   int nbReturned)
                                                            throws SQLException,
                                                                   CalendarException,
                                                                   ParseException
Throws:
SQLException
CalendarException
ParseException

getNextEventsForMyContacts

public List<SocialInformationEvent> getNextEventsForMyContacts(Connection con,
                                                               String day,
                                                               String myId,
                                                               List<String> myContactsIds,
                                                               Date begin,
                                                               Date end)
                                                        throws SQLException,
                                                               ParseException
get Next Social Events for a given list of my Contacts accordint to the type of data base used(PostgreSQL,Oracle,MMS) . This includes all kinds of events

Parameters:
con -
day -
myId -
myContactsIds -
begin -
end -
Returns:
List
Throws:
SQLException
ParseException

getLastEventsForMyContacts

public List<SocialInformationEvent> getLastEventsForMyContacts(Connection con,
                                                               String day,
                                                               String myId,
                                                               List<String> myContactsIds,
                                                               Date begin,
                                                               Date end)
                                                        throws SQLException,
                                                               ParseException
get Last Social Events for a given list of my Contacts accordint to the type of data base used(PostgreSQL,Oracle,MMS) . This includes all kinds of events

Parameters:
con -
day -
myId -
myContactsIds -
begin -
end -
Returns:
List
Throws:
SQLException
ParseException

getMyLastEvents

public List<SocialInformationEvent> getMyLastEvents(Connection con,
                                                    String day,
                                                    String myId,
                                                    Date begin,
                                                    Date end)
                                             throws SQLException,
                                                    ParseException
get my Last Social Events accordint to the type of data base used(PostgreSQL,Oracle,MMS) . This includes all kinds of events

Parameters:
con -
day -
myId -
numberOfElement -
firstIndex -
Returns:
List
Throws:
SQLException
ParseException

getMyLastEvents_MSS

public List<SocialInformationEvent> getMyLastEvents_MSS(Connection con,
                                                        String day,
                                                        String myId,
                                                        Date begin,
                                                        Date end)
                                                 throws SQLException,
                                                        ParseException
get my Last Social Events when data base is MMS. This includes all kinds of events

Parameters:
con -
day -
myId -
numberOfElement -
firstIndex -
Returns:
Throws:
SQLException
ParseException


Copyright © 2016 Silverpeas. All Rights Reserved.