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 IAnnounceDAO
announce
- instance of the Announce object to insertplugin
- the Pluginpublic Announce load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
load
in interface IAnnounceDAO
nId
- the primary keyplugin
- the Pluginpublic void delete(int nAnnounceId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
delete
in interface IAnnounceDAO
nAnnounceId
- int identifier of the Announce to deleteplugin
- the Pluginpublic void store(Announce announce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
store
in interface IAnnounceDAO
announce
- the reference of the Announceplugin
- the Pluginpublic List<Integer> selectAll(AnnounceSort announceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAll
in interface IAnnounceDAO
announceSort
- the sort to useplugin
- the Pluginpublic List<Integer> selectAllPublishedId(AnnounceSort announceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAllPublishedId
in interface IAnnounceDAO
announceSort
- the sort to useplugin
- the pluginpublic List<Announce> selectAllPublished(AnnounceSort announceSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAllPublished
in interface IAnnounceDAO
announceSort
- 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 IAnnounceDAO
listIdAnnounces
- 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 IAnnounceDAO
category
- 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 IAnnounceDAO
strUsername
- the usernameannounceSort
- the sort to useplugin
- the pluginpublic void setPublished(Announce announce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
setPublished
in interface IAnnounceDAO
announce
- the announceplugin
- the pluginpublic void setHasNotifed(Announce announce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
setHasNotifed
in interface IAnnounceDAO
public void setSuspended(Announce announce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
setSuspended
in interface IAnnounceDAO
announce
- the announceplugin
- the pluginpublic void setSuspendedByUser(Announce announce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
setSuspendedByUser
in interface IAnnounceDAO
announce
- the announceplugin
- the pluginpublic List<Integer> findIdAnnouncesByDateCreation(Timestamp timestamp, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findIdAnnouncesByDateCreation
in interface IAnnounceDAO
timestamp
- The timestampplugin
- The pluginpublic List<Integer> findIdAnnouncesByDatePublication(long lMinPublicationTime, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findIdAnnouncesByDatePublication
in interface IAnnounceDAO
lMinPublicationTime
- 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 IAnnounceDAO
nIdAnnounce
- 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 IAnnounceDAO
nIdAnnounce
- the id of the announceplugin
- the pluginpublic List<Integer> findListIdImageResponse(int nIdAnnounce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findListIdImageResponse
in interface IAnnounceDAO
nIdAnnounce
- the id of the announceplugin
- the pluginpublic Integer findIdByImageResponse(int nIdResponse, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findIdByImageResponse
in interface IAnnounceDAO
nIdResponse
- the id of the responseplugin
- the pluginpublic void deleteAnnounceResponse(int nIdAnnounce, fr.paris.lutece.portal.service.plugin.Plugin plugin)
deleteAnnounceResponse
in interface IAnnounceDAO
nIdAnnounce
- The id of the announceplugin
- The pluginCopyright © 2019 City of Paris. All rights reserved.