Liferay 7.0-ce-b4

com.liferay.portlet.announcements.service
Class AnnouncementsEntryLocalServiceUtil

java.lang.Object
  extended by com.liferay.portlet.announcements.service.AnnouncementsEntryLocalServiceUtil

@ProviderType
public class AnnouncementsEntryLocalServiceUtil
extends Object

Provides the local service utility for AnnouncementsEntry. This utility wraps com.liferay.portlet.announcements.service.impl.AnnouncementsEntryLocalServiceImpl and is the primary 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.

See Also:
AnnouncementsEntryLocalService, com.liferay.portlet.announcements.service.base.AnnouncementsEntryLocalServiceBaseImpl, com.liferay.portlet.announcements.service.impl.AnnouncementsEntryLocalServiceImpl

Constructor Summary
AnnouncementsEntryLocalServiceUtil()
           
 
Method Summary
static AnnouncementsEntry addAnnouncementsEntry(AnnouncementsEntry announcementsEntry)
          Adds the announcements entry to the database.
static AnnouncementsEntry addEntry(long userId, long classNameId, long classPK, String title, String content, String url, String type, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, boolean displayImmediately, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, int priority, boolean alert)
           
static AnnouncementsEntry addEntry(long userId, long classNameId, long classPK, String title, String content, String url, String type, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, int priority, boolean alert)
          Deprecated. As of 6.2.0, replaced by addEntry(long, long, long, String, String, String, String, int, int, int, int, int, boolean, int, int, int, int, int, int, boolean)
static void checkEntries()
           
static AnnouncementsEntry createAnnouncementsEntry(long entryId)
          Creates a new announcements entry with the primary key.
static AnnouncementsEntry deleteAnnouncementsEntry(AnnouncementsEntry announcementsEntry)
          Deletes the announcements entry from the database.
static AnnouncementsEntry deleteAnnouncementsEntry(long entryId)
          Deletes the announcements entry with the primary key from the database.
static void deleteEntry(AnnouncementsEntry entry)
           
static void deleteEntry(long entryId)
           
static PersistedModel deletePersistedModel(PersistedModel persistedModel)
           
static DynamicQuery dynamicQuery()
           
static
<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 long dynamicQueryCount(DynamicQuery dynamicQuery)
          Returns the number of rows matching the dynamic query.
static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
          Returns the number of rows matching the dynamic query.
static AnnouncementsEntry fetchAnnouncementsEntry(long entryId)
           
static AnnouncementsEntry fetchAnnouncementsEntryByUuidAndCompanyId(String uuid, long companyId)
          Returns the announcements entry with the matching UUID and company.
static ActionableDynamicQuery getActionableDynamicQuery()
           
static List<AnnouncementsEntry> getAnnouncementsEntries(int start, int end)
          Returns a range of all the announcements entries.
static int getAnnouncementsEntriesCount()
          Returns the number of announcements entries.
static AnnouncementsEntry getAnnouncementsEntry(long entryId)
          Returns the announcements entry with the primary key.
static AnnouncementsEntry getAnnouncementsEntryByUuidAndCompanyId(String uuid, long companyId)
          Returns the announcements entry with the matching UUID and company.
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 List<AnnouncementsEntry> getEntries(long classNameId, long classPK, boolean alert, int start, int end)
           
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 int getEntriesCount(long userId, LinkedHashMap<Long,long[]> scopes, boolean alert, int flagValue)
           
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)
           
static int getEntriesCount(long classNameId, long classPK, boolean alert)
           
static int getEntriesCount(long userId, long classNameId, long[] classPKs, boolean alert, int flagValue)
           
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)
           
static AnnouncementsEntry getEntry(long entryId)
           
static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
           
static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
           
static String getOSGiServiceIdentifier()
          Returns the OSGi service identifier.
static PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
static AnnouncementsEntryLocalService getService()
           
static List<AnnouncementsEntry> getUserEntries(long userId, int start, int end)
           
static int getUserEntriesCount(long userId)
           
static AnnouncementsEntry updateAnnouncementsEntry(AnnouncementsEntry announcementsEntry)
          Updates the announcements entry in the database or adds it if it does not yet exist.
static AnnouncementsEntry updateEntry(long userId, long entryId, String title, String content, String url, String type, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, boolean displayImmediately, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, int priority)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnouncementsEntryLocalServiceUtil

public AnnouncementsEntryLocalServiceUtil()
Method Detail

addAnnouncementsEntry

public static AnnouncementsEntry addAnnouncementsEntry(AnnouncementsEntry announcementsEntry)
Adds the announcements entry to the database. Also notifies the appropriate model listeners.

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,
                                          int displayDateMonth,
                                          int displayDateDay,
                                          int displayDateYear,
                                          int displayDateHour,
                                          int displayDateMinute,
                                          boolean displayImmediately,
                                          int expirationDateMonth,
                                          int expirationDateDay,
                                          int expirationDateYear,
                                          int expirationDateHour,
                                          int expirationDateMinute,
                                          int priority,
                                          boolean alert)
                                   throws PortalException
Throws:
PortalException

addEntry

@Deprecated
public static AnnouncementsEntry addEntry(long userId,
                                                     long classNameId,
                                                     long classPK,
                                                     String title,
                                                     String content,
                                                     String url,
                                                     String type,
                                                     int displayDateMonth,
                                                     int displayDateDay,
                                                     int displayDateYear,
                                                     int displayDateHour,
                                                     int displayDateMinute,
                                                     int expirationDateMonth,
                                                     int expirationDateDay,
                                                     int expirationDateYear,
                                                     int expirationDateHour,
                                                     int expirationDateMinute,
                                                     int priority,
                                                     boolean alert)
                                   throws PortalException
Deprecated. As of 6.2.0, replaced by addEntry(long, long, long, String, String, String, String, int, int, int, int, int, boolean, int, int, int, int, int, int, boolean)

Throws:
PortalException

checkEntries

public static void checkEntries()
                         throws PortalException
Throws:
PortalException

createAnnouncementsEntry

public static AnnouncementsEntry createAnnouncementsEntry(long entryId)
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

deleteAnnouncementsEntry

public static AnnouncementsEntry deleteAnnouncementsEntry(AnnouncementsEntry announcementsEntry)
Deletes the announcements entry from the database. Also notifies the appropriate model listeners.

Parameters:
announcementsEntry - the announcements entry
Returns:
the announcements entry that was removed

deleteAnnouncementsEntry

public static AnnouncementsEntry deleteAnnouncementsEntry(long entryId)
                                                   throws PortalException
Deletes the announcements entry with the primary key from the database. Also notifies the appropriate model listeners.

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

deleteEntry

public static void deleteEntry(AnnouncementsEntry entry)
                        throws PortalException
Throws:
PortalException

deleteEntry

public static void deleteEntry(long entryId)
                        throws PortalException
Throws:
PortalException

deletePersistedModel

public static PersistedModel deletePersistedModel(PersistedModel persistedModel)
                                           throws PortalException
Throws:
PortalException

dynamicQuery

public static DynamicQuery dynamicQuery()

dynamicQuery

public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.

Parameters:
dynamicQuery - the dynamic query
Returns:
the matching rows

dynamicQuery

public 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.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.announcements.model.impl.AnnouncementsEntryModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - 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 - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.announcements.model.impl.AnnouncementsEntryModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching rows

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.

Parameters:
dynamicQuery - the dynamic query
Returns:
the number of rows matching the dynamic query

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery,
                                     Projection projection)
Returns the number of rows matching the dynamic query.

Parameters:
dynamicQuery - the dynamic query
projection - the projection to apply to the query
Returns:
the number of rows matching the dynamic query

fetchAnnouncementsEntry

public static AnnouncementsEntry fetchAnnouncementsEntry(long entryId)

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 UUID
companyId - the primary key of the company
Returns:
the matching announcements entry, or null if a matching announcements entry could not be found

getActionableDynamicQuery

public static ActionableDynamicQuery getActionableDynamicQuery()

getAnnouncementsEntries

public static List<AnnouncementsEntry> getAnnouncementsEntries(int start,
                                                               int end)
Returns a range of all the announcements entries.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.announcements.model.impl.AnnouncementsEntryModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
start - the lower bound of the range of announcements entries
end - 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

public static AnnouncementsEntry getAnnouncementsEntry(long entryId)
                                                throws PortalException
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 UUID
companyId - 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 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)

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)

getEntriesCount

public static int getEntriesCount(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)

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)

getEntry

public static AnnouncementsEntry getEntry(long entryId)
                                   throws PortalException
Throws:
PortalException

getExportActionableDynamicQuery

public static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)

getIndexableActionableDynamicQuery

public static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()

getOSGiServiceIdentifier

public static String getOSGiServiceIdentifier()
Returns the OSGi service identifier.

Returns:
the OSGi service identifier

getPersistedModel

public static PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                        throws PortalException
Throws:
PortalException

getUserEntries

public static List<AnnouncementsEntry> getUserEntries(long userId,
                                                      int start,
                                                      int end)

getUserEntriesCount

public static int getUserEntriesCount(long userId)

updateAnnouncementsEntry

public static AnnouncementsEntry updateAnnouncementsEntry(AnnouncementsEntry announcementsEntry)
Updates the announcements entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
announcementsEntry - the announcements entry
Returns:
the announcements entry that was updated

updateEntry

public static AnnouncementsEntry updateEntry(long userId,
                                             long entryId,
                                             String title,
                                             String content,
                                             String url,
                                             String type,
                                             int displayDateMonth,
                                             int displayDateDay,
                                             int displayDateYear,
                                             int displayDateHour,
                                             int displayDateMinute,
                                             boolean displayImmediately,
                                             int expirationDateMonth,
                                             int expirationDateDay,
                                             int expirationDateYear,
                                             int expirationDateHour,
                                             int expirationDateMinute,
                                             int priority)
                                      throws PortalException
Throws:
PortalException

getService

public static AnnouncementsEntryLocalService getService()

Liferay 7.0-ce-b4