public final class AnnounceDAO extends Object implements IAnnounceDAO
| Constructor and Description |
|---|
AnnounceDAO() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(int nAnnounceId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table
|
void |
deleteAnnounceResponse(int nIdAnnounce,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the association between an announce and responses
|
List<Announce> |
findByListId(List<Integer> listIdAnnounces,
AnnounceSort announceSort,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of announces from a list of ids
|
List<Integer> |
findIdAnnouncesByDateCreation(Timestamp timestamp,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of ids of announces that was created before the given date
|
List<Integer> |
findIdAnnouncesByDatePublication(long lMinPublicationTime,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of ids of announces that were created after a given time
|
Integer |
findIdByImageResponse(int nIdResponse,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the announce id from its image response id
|
List<Integer> |
findListIdImageResponse(int nIdAnnounce,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of id of image responses associated with an announce
|
List<Integer> |
findListIdResponse(int nIdAnnounce,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of id of responses associated with an announce
|
void |
insert(Announce announce,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.
|
void |
insertAnnounceResponse(int nIdAnnounce,
int nIdResponse,
boolean bIsImage,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Associates a response to an Announce
|
Announce |
load(int nId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data from the table
|
int |
newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Generates a new primary key
|
List<Integer> |
selectAll(AnnounceSort announceSort,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the announce objects and returns them as a List
|
List<Announce> |
selectAllForUser(String strUsername,
AnnounceSort announceSort,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
selects all announces for a given user
|
List<Announce> |
selectAllPublished(AnnounceSort announceSort,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
selects all the published announces
|
List<Integer> |
selectAllPublishedForCategory(Category category,
AnnounceSort announceSort,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
selects all published announces for a given category
|
List<Integer> |
selectAllPublishedId(AnnounceSort announceSort,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
selects id of published announces
|
void |
setHasNotifed(Announce announce,
fr.paris.lutece.portal.service.plugin.Plugin plugin) |
void |
setPublished(Announce announce,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
publish or unpublish an announce
|
void |
setSuspended(Announce announce,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
suspend or enable an announce
|
void |
setSuspendedByUser(Announce announce,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
suspend or enable an announce
|
void |
store(Announce announce,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table
|
public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
plugin - The Pluginpublic void insert(Announce announce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
insert in interface IAnnounceDAOannounce - instance of the Announce object to insertplugin - the Pluginpublic Announce load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
load in interface IAnnounceDAOnId - the primary keyplugin - the Pluginpublic void delete(int nAnnounceId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
delete in interface IAnnounceDAOnAnnounceId - int identifier of the Announce to deleteplugin - the Pluginpublic void store(Announce announce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
store in interface IAnnounceDAOannounce - the reference of the Announceplugin - the Pluginpublic List<Integer> selectAll(AnnounceSort announceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAll in interface IAnnounceDAOannounceSort - the sort to useplugin - the Pluginpublic List<Integer> selectAllPublishedId(AnnounceSort announceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAllPublishedId in interface IAnnounceDAOannounceSort - the sort to useplugin - the pluginpublic List<Announce> selectAllPublished(AnnounceSort announceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAllPublished in interface IAnnounceDAOannounceSort - the sort to useplugin - the pluginpublic List<Announce> findByListId(List<Integer> listIdAnnounces, AnnounceSort announceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findByListId in interface IAnnounceDAOlistIdAnnounces - The list of ids of announces to getannounceSort - the sort to useplugin - The pluginpublic List<Integer> selectAllPublishedForCategory(Category category, AnnounceSort announceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAllPublishedForCategory in interface IAnnounceDAOcategory - announces listannounceSort - the sort to useplugin - the pluginpublic List<Announce> selectAllForUser(String strUsername, AnnounceSort announceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAllForUser in interface IAnnounceDAOstrUsername - the usernameannounceSort - the sort to useplugin - the pluginpublic void setPublished(Announce announce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
setPublished in interface IAnnounceDAOannounce - the announceplugin - the pluginpublic void setHasNotifed(Announce announce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
setHasNotifed in interface IAnnounceDAOpublic void setSuspended(Announce announce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
setSuspended in interface IAnnounceDAOannounce - the announceplugin - the pluginpublic void setSuspendedByUser(Announce announce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
setSuspendedByUser in interface IAnnounceDAOannounce - the announceplugin - the pluginpublic List<Integer> findIdAnnouncesByDateCreation(Timestamp timestamp, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findIdAnnouncesByDateCreation in interface IAnnounceDAOtimestamp - The timestampplugin - The pluginpublic List<Integer> findIdAnnouncesByDatePublication(long lMinPublicationTime, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findIdAnnouncesByDatePublication in interface IAnnounceDAOlMinPublicationTime - The minimum publication time of announces to getplugin - The pluginpublic void insertAnnounceResponse(int nIdAnnounce,
int nIdResponse,
boolean bIsImage,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
insertAnnounceResponse in interface IAnnounceDAOnIdAnnounce - The id of the AnnouncenIdResponse - The id of the responsebIsImage - True if the response is an image, false otherwiseplugin - The pluginpublic List<Integer> findListIdResponse(int nIdAnnounce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findListIdResponse in interface IAnnounceDAOnIdAnnounce - the id of the announceplugin - the pluginpublic List<Integer> findListIdImageResponse(int nIdAnnounce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findListIdImageResponse in interface IAnnounceDAOnIdAnnounce - the id of the announceplugin - the pluginpublic Integer findIdByImageResponse(int nIdResponse, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findIdByImageResponse in interface IAnnounceDAOnIdResponse - the id of the responseplugin - the pluginpublic void deleteAnnounceResponse(int nIdAnnounce,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
deleteAnnounceResponse in interface IAnnounceDAOnIdAnnounce - The id of the announceplugin - The pluginCopyright © 2019 City of Paris. All rights reserved.