public final class AnnounceHome extends Object
Modifier and Type | Method and Description |
---|---|
static Announce |
create(Announce announce)
Create an instance of the announce class
|
static List<Integer> |
findAll(AnnounceSort announceSort)
Load the data of all the announce objects and returns them in form of a list
|
static List<Announce> |
findAllPublished(AnnounceSort announceSort)
Load the data of all the announce objects and returns them in form of a list
|
static List<Integer> |
findAllPublishedId(AnnounceSort announceSort)
Load the id of every published announce and returns them in form of a list
|
static List<Announce> |
findByListId(List<Integer> listIdAnnounces,
AnnounceSort announceSort)
Get the list of announces from a list of ids
|
static Announce |
findByPrimaryKey(int nKey)
Returns an instance of a announce whose identifier is specified in parameter
|
static List<Integer> |
findIdAnnouncesByDateCreation(Timestamp timestamp)
Get the list of ids of announces that was created before the given date
|
static List<Integer> |
findIdAnnouncesByDatePublication(long lMinPublicationTime)
Get the list of ids of announces that were created after a given time
|
static Integer |
findIdByImageResponse(int nIdResponse)
Returns the announce id from its image response id
|
static List<Integer> |
findListIdImageResponse(int nIdAnnounce)
Get the list of id of image responses associated with an announce
|
static List<Integer> |
findListIdResponse(int nIdAnnounce)
Get the list of id of responses associated with an announce
|
static List<fr.paris.lutece.plugins.genericattributes.business.Response> |
findListResponse(int nIdAnnounce,
boolean bLoadFiles)
Get the list of responses associated with an announce
|
static List<Announce> |
getAnnouncesForUser(fr.paris.lutece.portal.service.security.LuteceUser user,
AnnounceSort announceSort)
selects all the announces for a user
|
static List<Announce> |
getAnnouncesForUser(String user,
AnnounceSort announceSort)
selects all the announces for a user
|
static List<Integer> |
getPublishedAnnouncesForCategory(Category category,
AnnounceSort announceSort)
selects all the announces for a category
|
static void |
insertAnnounceResponse(int nIdAnnounce,
int nIdResponse,
boolean bIsImage)
Associates a response to an Announce
|
static void |
remove(int nAnnounceId)
Remove the announce whose identifier is specified in parameter and every response associated with it
|
static void |
removeAnnounceResponse(int nIdAnnounce)
Remove the association between an announce and responses
|
static void |
setHasNotifed(Announce announce) |
static void |
setPublished(Announce announce)
publish or unpublish an announce
|
static void |
setSuspended(Announce announce)
suspend or UnSuspend an announce
|
static void |
setSuspendedByUser(Announce announce)
suspend or UnSuspend an announce
|
static Announce |
update(Announce announce)
Update of the announce which is specified in parameter
|
public static Announce create(Announce announce)
announce
- The instance of the Announce which contains the informations to storepublic static Announce update(Announce announce)
announce
- The instance of the Announce which contains the data to storepublic static void remove(int nAnnounceId)
nAnnounceId
- The announce Idpublic static Announce findByPrimaryKey(int nKey)
nKey
- The announce primary keypublic static Integer findIdByImageResponse(int nIdResponse)
nIdResponse
- the id of the responsepublic static List<Integer> findAll(AnnounceSort announceSort)
announceSort
- The sortpublic static List<Integer> findAllPublishedId(AnnounceSort announceSort)
announceSort
- The sortpublic static List<Announce> findAllPublished(AnnounceSort announceSort)
announceSort
- The sortpublic static List<Announce> findByListId(List<Integer> listIdAnnounces, AnnounceSort announceSort)
listIdAnnounces
- The list of ids of announces to getannounceSort
- The sortpublic static List<Announce> getAnnouncesForUser(fr.paris.lutece.portal.service.security.LuteceUser user, AnnounceSort announceSort)
user
- the userannounceSort
- The sortpublic static List<Announce> getAnnouncesForUser(String user, AnnounceSort announceSort)
user
- the user nameannounceSort
- The sortpublic static List<Integer> getPublishedAnnouncesForCategory(Category category, AnnounceSort announceSort)
category
- the categoryannounceSort
- The sortpublic static void setPublished(Announce announce)
announce
- the announcepublic static void setHasNotifed(Announce announce)
public static void setSuspended(Announce announce)
announce
- the announcepublic static void setSuspendedByUser(Announce announce)
announce
- the announcepublic static List<Integer> findIdAnnouncesByDateCreation(Timestamp timestamp)
timestamp
- The timestamppublic static List<Integer> findIdAnnouncesByDatePublication(long lMinPublicationTime)
lMinPublicationTime
- The minimum publication time of announces to getpublic static void insertAnnounceResponse(int nIdAnnounce, int nIdResponse, boolean bIsImage)
nIdAnnounce
- The id of the announcenIdResponse
- The id of the responsebIsImage
- True if the response is an image, false otherwisepublic static List<Integer> findListIdResponse(int nIdAnnounce)
nIdAnnounce
- the id of the announcepublic static List<Integer> findListIdImageResponse(int nIdAnnounce)
nIdAnnounce
- the id of the announcepublic static List<fr.paris.lutece.plugins.genericattributes.business.Response> findListResponse(int nIdAnnounce, boolean bLoadFiles)
nIdAnnounce
- the id of the announcebLoadFiles
- True to load files, false to ignore them. Note that physical files are never loaded by this method.public static void removeAnnounceResponse(int nIdAnnounce)
nIdAnnounce
- The id of the announceCopyright © 2019 City of Paris. All rights reserved.