Liferay 6.2-ce-ga5

com.liferay.portlet.trash.service
Interface TrashEntryLocalService

All Superinterfaces:
BaseLocalService, PersistedModelLocalService
All Known Implementing Classes:
TrashEntryLocalServiceWrapper

@ProviderType
@Transactional(isolation=PORTAL,
               rollbackFor={PortalException.class,SystemException.class})
public interface TrashEntryLocalService
extends BaseLocalService, PersistedModelLocalService

Provides the local service interface for TrashEntry. 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:
TrashEntryLocalServiceUtil, com.liferay.portlet.trash.service.base.TrashEntryLocalServiceBaseImpl, com.liferay.portlet.trash.service.impl.TrashEntryLocalServiceImpl

Method Summary
 TrashEntry addTrashEntry(long userId, long groupId, String className, long classPK, String classUuid, String referrerClassName, int status, List<ObjectValuePair<Long,Integer>> statusOVPs, UnicodeProperties typeSettingsProperties)
          Moves an entry to trash.
 TrashEntry addTrashEntry(TrashEntry trashEntry)
          Adds the trash entry to the database.
 void checkEntries()
           
 TrashEntry createTrashEntry(long entryId)
          Creates a new trash entry with the primary key.
 void deleteEntries(long groupId)
           
 TrashEntry deleteEntry(long entryId)
          Deletes the trash entry with the primary key.
 TrashEntry deleteEntry(String className, long classPK)
          Deletes the trash entry with the entity class name and primary key.
 TrashEntry deleteEntry(TrashEntry trashEntry)
           
 TrashEntry deleteTrashEntry(long entryId)
          Deletes the trash entry with the primary key from the database.
 TrashEntry deleteTrashEntry(TrashEntry trashEntry)
          Deletes the trash entry from the database.
 DynamicQuery dynamicQuery()
           
 List dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
 List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
 List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
          Performs a dynamic query on the database and returns an ordered range of the matching rows.
 long dynamicQueryCount(DynamicQuery dynamicQuery)
          Returns the number of rows that match the dynamic query.
 long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
          Returns the number of rows that match the dynamic query.
 TrashEntry fetchEntry(long entryId)
          Returns the trash entry with the primary key.
 TrashEntry fetchEntry(String className, long classPK)
          Returns the trash entry with the entity class name and primary key.
 TrashEntry fetchTrashEntry(long entryId)
           
 String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
 List<TrashEntry> getEntries(long groupId)
          Returns the trash entries with the matching group ID.
 List<TrashEntry> getEntries(long groupId, int start, int end)
          Returns a range of all the trash entries matching the group ID.
 List<TrashEntry> getEntries(long groupId, int start, int end, OrderByComparator obc)
          Returns a range of all the trash entries matching the group ID.
 List<TrashEntry> getEntries(long groupId, String className)
           
 int getEntriesCount(long groupId)
          Returns the number of trash entries with the group ID.
 TrashEntry getEntry(long entryId)
          Returns the trash entry with the primary key.
 TrashEntry getEntry(String className, long classPK)
          Returns the entry with the entity class name and primary key.
 PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
 List<TrashEntry> getTrashEntries(int start, int end)
          Returns a range of all the trash entries.
 int getTrashEntriesCount()
          Returns the number of trash entries.
 TrashEntry getTrashEntry(long entryId)
          Returns the trash entry with the primary key.
 Hits search(long companyId, long groupId, long userId, String keywords, int start, int end, Sort sort)
           
 void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 TrashEntry updateTrashEntry(TrashEntry trashEntry)
          Updates the trash entry in the database or adds it if it does not yet exist.
 

Method Detail

addTrashEntry

@Indexable(type=REINDEX)
TrashEntry addTrashEntry(TrashEntry trashEntry)
                         throws SystemException
Adds the trash entry to the database. Also notifies the appropriate model listeners.

Parameters:
trashEntry - the trash entry
Returns:
the trash entry that was added
Throws:
SystemException - if a system exception occurred

createTrashEntry

TrashEntry createTrashEntry(long entryId)
Creates a new trash entry with the primary key. Does not add the trash entry to the database.

Parameters:
entryId - the primary key for the new trash entry
Returns:
the new trash entry

deleteTrashEntry

@Indexable(type=DELETE)
TrashEntry deleteTrashEntry(long entryId)
                            throws PortalException,
                                   SystemException
Deletes the trash entry with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
entryId - the primary key of the trash entry
Returns:
the trash entry that was removed
Throws:
PortalException - if a trash entry with the primary key could not be found
SystemException - if a system exception occurred

deleteTrashEntry

@Indexable(type=DELETE)
TrashEntry deleteTrashEntry(TrashEntry trashEntry)
                            throws SystemException
Deletes the trash entry from the database. Also notifies the appropriate model listeners.

Parameters:
trashEntry - the trash entry
Returns:
the trash entry that was removed
Throws:
SystemException - if a system exception occurred

dynamicQuery

DynamicQuery dynamicQuery()

dynamicQuery

List dynamicQuery(DynamicQuery dynamicQuery)
                  throws SystemException
Performs a dynamic query on the database and returns the matching rows.

Parameters:
dynamicQuery - the dynamic query
Returns:
the matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

List dynamicQuery(DynamicQuery dynamicQuery,
                  int start,
                  int end)
                  throws SystemException
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 TrashEntryModelImpl. 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
Throws:
SystemException - if a system exception occurred

dynamicQuery

List dynamicQuery(DynamicQuery dynamicQuery,
                  int start,
                  int end,
                  OrderByComparator orderByComparator)
                  throws SystemException
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 TrashEntryModelImpl. 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
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

long dynamicQueryCount(DynamicQuery dynamicQuery)
                       throws SystemException
Returns the number of rows that match the dynamic query.

Parameters:
dynamicQuery - the dynamic query
Returns:
the number of rows that match the dynamic query
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

long dynamicQueryCount(DynamicQuery dynamicQuery,
                       Projection projection)
                       throws SystemException
Returns the number of rows that match the dynamic query.

Parameters:
dynamicQuery - the dynamic query
projection - the projection to apply to the query
Returns:
the number of rows that match the dynamic query
Throws:
SystemException - if a system exception occurred

fetchTrashEntry

@Transactional(propagation=SUPPORTS,
               readOnly=true)
TrashEntry fetchTrashEntry(long entryId)
                           throws SystemException
Throws:
SystemException

getTrashEntry

@Transactional(propagation=SUPPORTS,
               readOnly=true)
TrashEntry getTrashEntry(long entryId)
                         throws PortalException,
                                SystemException
Returns the trash entry with the primary key.

Parameters:
entryId - the primary key of the trash entry
Returns:
the trash entry
Throws:
PortalException - if a trash entry with the primary key could not be found
SystemException - if a system exception occurred

getPersistedModel

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                 throws PortalException,
                                        SystemException
Specified by:
getPersistedModel in interface PersistedModelLocalService
Throws:
PortalException
SystemException

getTrashEntries

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<TrashEntry> getTrashEntries(int start,
                                                                          int end)
                                 throws SystemException
Returns a range of all the trash 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 TrashEntryModelImpl. 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 trash entries
end - the upper bound of the range of trash entries (not inclusive)
Returns:
the range of trash entries
Throws:
SystemException - if a system exception occurred

getTrashEntriesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getTrashEntriesCount()
                         throws SystemException
Returns the number of trash entries.

Returns:
the number of trash entries
Throws:
SystemException - if a system exception occurred

updateTrashEntry

@Indexable(type=REINDEX)
TrashEntry updateTrashEntry(TrashEntry trashEntry)
                            throws SystemException
Updates the trash entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
trashEntry - the trash entry
Returns:
the trash entry that was updated
Throws:
SystemException - if a system exception occurred

getBeanIdentifier

String getBeanIdentifier()
Returns the Spring bean ID for this bean.

Returns:
the Spring bean ID for this bean

setBeanIdentifier

void setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean.

Parameters:
beanIdentifier - the Spring bean ID for this bean

addTrashEntry

TrashEntry addTrashEntry(long userId,
                         long groupId,
                         String className,
                         long classPK,
                         String classUuid,
                         String referrerClassName,
                         int status,
                         List<ObjectValuePair<Long,Integer>> statusOVPs,
                         UnicodeProperties typeSettingsProperties)
                         throws PortalException,
                                SystemException
Moves an entry to trash.

Parameters:
userId - the primary key of the user removing the entity
groupId - the primary key of the entry's group
className - the class name of the entity
classPK - the primary key of the entity
status - the status of the entity prior to being moved to trash
statusOVPs - the primary keys and statuses of any of the entry's versions (e.g., DLFileVersion)
typeSettingsProperties - the type settings properties
Returns:
the trashEntry
Throws:
PortalException - if a user with the primary key could not be found
SystemException - if a system exception occurred

checkEntries

void checkEntries()
                  throws PortalException,
                         SystemException
Throws:
PortalException
SystemException

deleteEntries

void deleteEntries(long groupId)
                   throws SystemException
Throws:
SystemException

deleteEntry

TrashEntry deleteEntry(long entryId)
                       throws PortalException,
                              SystemException
Deletes the trash entry with the primary key.

Parameters:
entryId - the primary key of the trash entry
Returns:
the trash entry with the primary key
Throws:
PortalException - if a trash entry with the primary key could not be found
SystemException - if a system exception occurred

deleteEntry

TrashEntry deleteEntry(String className,
                       long classPK)
                       throws PortalException,
                              SystemException
Deletes the trash entry with the entity class name and primary key.

Parameters:
className - the class name of entity
classPK - the primary key of the entry
Returns:
the trash entry with the entity class name and primary key
Throws:
PortalException - if a trash entry with the primary key could not be found
SystemException - if a system exception occurred

deleteEntry

@Indexable(type=DELETE)
TrashEntry deleteEntry(TrashEntry trashEntry)
                       throws SystemException
Throws:
SystemException

fetchEntry

@Transactional(propagation=SUPPORTS,
               readOnly=true)
TrashEntry fetchEntry(long entryId)
                      throws SystemException
Returns the trash entry with the primary key.

Parameters:
entryId - the primary key of the entry
Returns:
the trash entry with the primary key
Throws:
SystemException - if a system exception occurred

fetchEntry

@Transactional(propagation=SUPPORTS,
               readOnly=true)
TrashEntry fetchEntry(String className,
                                                               long classPK)
                      throws SystemException
Returns the trash entry with the entity class name and primary key.

Parameters:
className - the class name of the entity
classPK - the primary key of the entity
Returns:
the trash entry with the entity class name and primary key
Throws:
SystemException - if a system exception occurred

getEntries

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<TrashEntry> getEntries(long groupId)
                            throws SystemException
Returns the trash entries with the matching group ID.

Parameters:
groupId - the primary key of the group
Returns:
the trash entries with the group ID
Throws:
SystemException - if a system exception occurred

getEntries

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<TrashEntry> getEntries(long groupId,
                                                                     int start,
                                                                     int end)
                            throws SystemException
Returns a range of all the trash entries matching the group ID.

Parameters:
groupId - the primary key of the group
start - the lower bound of the range of trash entries to return
end - the upper bound of the range of trash entries to return (not inclusive)
Returns:
the range of matching trash entries
Throws:
SystemException - if a system exception occurred

getEntries

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<TrashEntry> getEntries(long groupId,
                                                                     int start,
                                                                     int end,
                                                                     OrderByComparator obc)
                            throws SystemException
Returns a range of all the trash entries matching the group ID.

Parameters:
groupId - the primary key of the group
start - the lower bound of the range of trash entries to return
end - the upper bound of the range of trash entries to return (not inclusive)
obc - the comparator to order the trash entries (optionally null)
Returns:
the range of matching trash entries ordered by comparator obc
Throws:
SystemException - if a system exception occurred

getEntries

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<TrashEntry> getEntries(long groupId,
                                                                     String className)
                            throws SystemException
Throws:
SystemException

getEntriesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getEntriesCount(long groupId)
                    throws SystemException
Returns the number of trash entries with the group ID.

Parameters:
groupId - the primary key of the group
Returns:
the number of matching trash entries
Throws:
SystemException - if a system exception occurred

getEntry

@Transactional(propagation=SUPPORTS,
               readOnly=true)
TrashEntry getEntry(long entryId)
                    throws PortalException,
                           SystemException
Returns the trash entry with the primary key.

Parameters:
entryId - the primary key of the trash entry
Returns:
the trash entry with the primary key
Throws:
PortalException - if a trash entry with the primary key could not be found
SystemException - if a system exception occurred

getEntry

@Transactional(propagation=SUPPORTS,
               readOnly=true)
TrashEntry getEntry(String className,
                                                             long classPK)
                    throws PortalException,
                           SystemException
Returns the entry with the entity class name and primary key.

Parameters:
className - the class name of the entity
classPK - the primary key of the entity
Returns:
the trash entry with the entity class name and primary key
Throws:
PortalException - if a trash entry with the primary key could not be found
SystemException - if a system exception occurred

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Hits search(long companyId,
                                                     long groupId,
                                                     long userId,
                                                     String keywords,
                                                     int start,
                                                     int end,
                                                     Sort sort)
            throws SystemException
Throws:
SystemException

Liferay 6.2-ce-ga5