Class AnnouncementsEntryLocalServiceUtil
com.liferay.portlet.announcements.service.impl.AnnouncementsEntryLocalServiceImpl and
is an access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AnnouncementsEntryaddAnnouncementsEntry(AnnouncementsEntry announcementsEntry) Adds the announcements entry to the database.static AnnouncementsEntryaddEntry(long userId, long classNameId, long classPK, String title, String content, String url, String type, Date displayDate, Date expirationDate, int priority, boolean alert) static voidstatic voidcheckEntries(Date startDate, Date endDate) static AnnouncementsEntrycreateAnnouncementsEntry(long entryId) Creates a new announcements entry with the primary key.static PersistedModelcreatePersistedModel(Serializable primaryKeyObj) static AnnouncementsEntrydeleteAnnouncementsEntry(long entryId) Deletes the announcements entry with the primary key from the database.static AnnouncementsEntrydeleteAnnouncementsEntry(AnnouncementsEntry announcementsEntry) Deletes the announcements entry from the database.static voiddeleteEntries(long companyId) static voiddeleteEntries(long classNameId, long classPK) static voiddeleteEntries(long companyId, long classNameId, long classPK) static voiddeleteEntry(long entryId) static voiddeleteEntry(AnnouncementsEntry entry) static PersistedModeldeletePersistedModel(PersistedModel persistedModel) static <T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static intdslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static DynamicQuerystatic <T> List<T>dynamicQuery(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.static <T> List<T>dynamicQuery(DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.static <T> List<T>dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.static longdynamicQueryCount(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.static longdynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.static AnnouncementsEntryfetchAnnouncementsEntry(long entryId) static AnnouncementsEntryfetchAnnouncementsEntryByUuidAndCompanyId(String uuid, long companyId) Returns the announcements entry with the matching UUID and company.static ActionableDynamicQuerystatic List<AnnouncementsEntry>getAnnouncementsEntries(int start, int end) Returns a range of all the announcements entries.static intReturns the number of announcements entries.static AnnouncementsEntrygetAnnouncementsEntry(long entryId) Returns the announcements entry with the primary key.static AnnouncementsEntrygetAnnouncementsEntryByUuidAndCompanyId(String uuid, long companyId) Returns the announcements entry with the matching UUID and company.static List<AnnouncementsEntry>getEntries(long userId, long classNameId, long[] classPKs, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean alert, int flagValue, int start, int end) static List<AnnouncementsEntry>getEntries(long companyId, long classNameId, long classPK, boolean alert, int start, int end) static List<AnnouncementsEntry>getEntries(long userId, LinkedHashMap<Long, long[]> scopes, boolean alert, int flagValue, int start, int end) static List<AnnouncementsEntry>getEntries(long userId, LinkedHashMap<Long, long[]> scopes, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean alert, int flagValue, int start, int end) static intgetEntriesCount(long userId, long classNameId, long[] classPKs, boolean alert, int flagValue) static intgetEntriesCount(long userId, long classNameId, long[] classPKs, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean alert, int flagValue) static intgetEntriesCount(long companyId, long classNameId, long classPK, boolean alert) static intgetEntriesCount(long userId, LinkedHashMap<Long, long[]> scopes, boolean alert, int flagValue) static intgetEntriesCount(long userId, LinkedHashMap<Long, long[]> scopes, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean alert, int flagValue) static AnnouncementsEntrygetEntry(long entryId) static ExportActionableDynamicQuerygetExportActionableDynamicQuery(PortletDataContext portletDataContext) static StringReturns the OSGi service identifier.static PersistedModelgetPersistedModel(Serializable primaryKeyObj) static List<AnnouncementsEntry>getUserEntries(long userId, int start, int end) static intgetUserEntriesCount(long userId) static voidsetService(AnnouncementsEntryLocalService service) static AnnouncementsEntryupdateAnnouncementsEntry(AnnouncementsEntry announcementsEntry) Updates the announcements entry in the database or adds it if it does not yet exist.static AnnouncementsEntryupdateEntry(long entryId, String title, String content, String url, String type, Date displayDate, Date expirationDate, int priority)
-
Constructor Details
-
AnnouncementsEntryLocalServiceUtil
public AnnouncementsEntryLocalServiceUtil()
-
-
Method Details
-
addAnnouncementsEntry
Adds the announcements entry to the database. Also notifies the appropriate model listeners.Important: Inspect AnnouncementsEntryLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
announcementsEntry- the announcements entry- Returns:
- the announcements entry that was added
-
addEntry
public static AnnouncementsEntry addEntry(long userId, long classNameId, long classPK, String title, String content, String url, String type, Date displayDate, Date expirationDate, int priority, boolean alert) throws PortalException - Throws:
PortalException
-
checkEntries
- Throws:
PortalException
-
checkEntries
- Throws:
PortalException
-
createAnnouncementsEntry
Creates a new announcements entry with the primary key. Does not add the announcements entry to the database.- Parameters:
entryId- the primary key for the new announcements entry- Returns:
- the new announcements entry
-
createPersistedModel
public static PersistedModel createPersistedModel(Serializable primaryKeyObj) throws PortalException - Throws:
PortalException
-
deleteAnnouncementsEntry
Deletes the announcements entry from the database. Also notifies the appropriate model listeners.Important: Inspect AnnouncementsEntryLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
announcementsEntry- the announcements entry- Returns:
- the announcements entry that was removed
-
deleteAnnouncementsEntry
Deletes the announcements entry with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect AnnouncementsEntryLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
entryId- the primary key of the announcements entry- Returns:
- the announcements entry that was removed
- Throws:
PortalException- if a announcements entry with the primary key could not be found
-
deleteEntries
public static void deleteEntries(long companyId) -
deleteEntries
- Throws:
PortalException
-
deleteEntries
public static void deleteEntries(long companyId, long classNameId, long classPK) throws PortalException - Throws:
PortalException
-
deleteEntry
- Throws:
PortalException
-
deleteEntry
- Throws:
PortalException
-
deletePersistedModel
public static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException - Throws:
PortalException
-
dslQuery
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dslQueryCount
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dynamicQuery
-
dynamicQuery
Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
Performs a dynamic query on the database and returns a range of the matching rows.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.announcements.model.impl.AnnouncementsEntryModelImpl.- Parameters:
dynamicQuery- the dynamic querystart- the lower bound of the range of model instancesend- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.announcements.model.impl.AnnouncementsEntryModelImpl.- Parameters:
dynamicQuery- the dynamic querystart- the lower bound of the range of model instancesend- the upper bound of the range of model instances (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery- the dynamic queryprojection- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchAnnouncementsEntry
-
fetchAnnouncementsEntryByUuidAndCompanyId
public static AnnouncementsEntry fetchAnnouncementsEntryByUuidAndCompanyId(String uuid, long companyId) Returns the announcements entry with the matching UUID and company.- Parameters:
uuid- the announcements entry's UUIDcompanyId- the primary key of the company- Returns:
- the matching announcements entry, or
nullif a matching announcements entry could not be found
-
getActionableDynamicQuery
-
getAnnouncementsEntries
Returns a range of all the announcements entries.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.announcements.model.impl.AnnouncementsEntryModelImpl.- Parameters:
start- the lower bound of the range of announcements entriesend- the upper bound of the range of announcements entries (not inclusive)- Returns:
- the range of announcements entries
-
getAnnouncementsEntriesCount
public static int getAnnouncementsEntriesCount()Returns the number of announcements entries.- Returns:
- the number of announcements entries
-
getAnnouncementsEntry
Returns the announcements entry with the primary key.- Parameters:
entryId- the primary key of the announcements entry- Returns:
- the announcements entry
- Throws:
PortalException- if a announcements entry with the primary key could not be found
-
getAnnouncementsEntryByUuidAndCompanyId
public static AnnouncementsEntry getAnnouncementsEntryByUuidAndCompanyId(String uuid, long companyId) throws PortalException Returns the announcements entry with the matching UUID and company.- Parameters:
uuid- the announcements entry's UUIDcompanyId- the primary key of the company- Returns:
- the matching announcements entry
- Throws:
PortalException- if a matching announcements entry could not be found
-
getEntries
public static List<AnnouncementsEntry> getEntries(long userId, LinkedHashMap<Long, long[]> scopes, boolean alert, int flagValue, int start, int end) -
getEntries
public static List<AnnouncementsEntry> getEntries(long userId, LinkedHashMap<Long, long[]> scopes, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean alert, int flagValue, int start, int end) -
getEntries
public static List<AnnouncementsEntry> getEntries(long companyId, long classNameId, long classPK, boolean alert, int start, int end) -
getEntries
public static List<AnnouncementsEntry> getEntries(long userId, long classNameId, long[] classPKs, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean alert, int flagValue, int start, int end) -
getEntriesCount
public static int getEntriesCount(long userId, LinkedHashMap<Long, long[]> scopes, boolean alert, int flagValue) -
getEntriesCount
public static int getEntriesCount(long userId, LinkedHashMap<Long, long[]> scopes, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean alert, int flagValue) -
getEntriesCount
public static int getEntriesCount(long companyId, long classNameId, long classPK, boolean alert) -
getEntriesCount
public static int getEntriesCount(long userId, long classNameId, long[] classPKs, boolean alert, int flagValue) -
getEntriesCount
public static int getEntriesCount(long userId, long classNameId, long[] classPKs, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean alert, int flagValue) -
getEntry
- Throws:
PortalException
-
getExportActionableDynamicQuery
public static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext) -
getIndexableActionableDynamicQuery
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
- Throws:
PortalException
-
getUserEntries
-
getUserEntriesCount
public static int getUserEntriesCount(long userId) -
updateAnnouncementsEntry
Updates the announcements entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect AnnouncementsEntryLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
announcementsEntry- the announcements entry- Returns:
- the announcements entry that was updated
-
updateEntry
public static AnnouncementsEntry updateEntry(long entryId, String title, String content, String url, String type, Date displayDate, Date expirationDate, int priority) throws PortalException - Throws:
PortalException
-
getService
-
setService
-