Class DDLRecordLocalServiceUtil

java.lang.Object
com.liferay.dynamic.data.lists.service.DDLRecordLocalServiceUtil

public class DDLRecordLocalServiceUtil extends Object
Provides the local service utility for DDLRecord. This utility wraps com.liferay.dynamic.data.lists.service.impl.DDLRecordLocalServiceImpl 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.
See Also:
Generated:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static DDLRecord
    Adds the ddl record to the database.
    static DDLRecord
    addRecord(long userId, long groupId, long recordSetId, int displayIndex, com.liferay.dynamic.data.mapping.storage.DDMFormValues ddmFormValues, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Adds a record referencing the record set.
    static DDLRecord
    addRecord(long userId, long groupId, long recordSetId, int displayIndex, Map<String,Serializable> fieldsMap, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    static DDLRecord
    addRecord(long userId, long groupId, long ddmStorageId, long ddlRecordSetId, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Deprecated.
    As of Athanasius (7.3.x)
    static DDLRecord
    addRecord(long userId, long groupId, long ddmStorageId, long ddlRecordSetId, String className, long classPK, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    static DDLRecord
    createDDLRecord(long recordId)
    Creates a new ddl record with the primary key.
    static com.liferay.portal.kernel.model.PersistedModel
     
    static DDLRecord
    deleteDDLRecord(long recordId)
    Deletes the ddl record with the primary key from the database.
    static DDLRecord
    Deletes the ddl record from the database.
    static com.liferay.portal.kernel.model.PersistedModel
    deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel)
     
    static void
    deleteRecord(long recordId)
    Deletes the record and its resources.
    static DDLRecord
    Deletes the record and its resources.
    static void
    deleteRecords(long recordSetId)
    Deletes all the record set's records.
    static <T> T
    dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
     
    static int
    dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
     
    static com.liferay.portal.kernel.dao.orm.DynamicQuery
     
    static <T> List<T>
    dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
    Performs a dynamic query on the database and returns the matching rows.
    static <T> List<T>
    dynamicQuery(com.liferay.portal.kernel.dao.orm.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(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
    Performs a dynamic query on the database and returns an ordered range of the matching rows.
    static long
    dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
    Returns the number of rows matching the dynamic query.
    static long
    dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
    Returns the number of rows matching the dynamic query.
    static DDLRecord
    fetchDDLRecord(long recordId)
     
    static DDLRecord
    Returns the ddl record matching the UUID and group.
    static DDLRecord
    fetchFirstRecord(String className, long classPK)
     
    static DDLRecord
    fetchRecord(long recordId)
    Returns the record with the ID.
    static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
     
    static List<DDLRecord>
    getCompanyRecords(long companyId, int status, int scope, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDLRecord> orderByComparator)
    Returns an ordered range of all the records matching the company, workflow status, and scope.
    static int
    getCompanyRecordsCount(long companyId, int status, int scope)
    Returns the number of records matching the company, workflow status, and scope.
    static DDLRecord
    getDDLRecord(long recordId)
    Returns the ddl record with the primary key.
    static DDLRecord
    getDDLRecordByUuidAndGroupId(String uuid, long groupId)
    Returns the ddl record matching the UUID and group.
    static List<DDLRecord>
    getDDLRecords(int start, int end)
    Returns a range of all the ddl records.
    static List<DDLRecord>
    getDDLRecordsByUuidAndCompanyId(String uuid, long companyId)
    Returns all the ddl records matching the UUID and company.
    static List<DDLRecord>
    getDDLRecordsByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDLRecord> orderByComparator)
    Returns a range of ddl records matching the UUID and company.
    static int
    Returns the number of ddl records.
    static com.liferay.dynamic.data.mapping.storage.DDMFormValues
    getDDMFormValues(long ddmStorageId)
    Returns the DDM form values object associated with the record storage ID See DDLRecord#getDDMFormValues in the com.liferay.dynamic.data.lists.api module.
    static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
    getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
     
    static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
     
    static Long[]
    getMinAndMaxCompanyRecordIds(long companyId, int status, int scope)
     
    static List<DDLRecord>
    getMinAndMaxCompanyRecords(long companyId, int status, int scope, long minRecordId, long maxRecordId)
     
    static String
    Returns the OSGi service identifier.
    static com.liferay.portal.kernel.model.PersistedModel
     
    static DDLRecord
    getRecord(long recordId)
    Returns the record with the ID.
    static List<DDLRecord>
    getRecords(long recordSetId)
    Returns all the records matching the record set ID
    static List<DDLRecord>
    getRecords(long recordSetId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDLRecord> orderByComparator)
    Returns an ordered range of all the records matching the record set ID and workflow status.
    static List<DDLRecord>
    getRecords(long recordSetId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDLRecord> orderByComparator)
     
    static List<DDLRecord>
    getRecords(long recordSetId, long userId)
    Returns all the records matching the record set ID and user ID.
    static List<DDLRecord>
    getRecords(long recordSetId, long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDLRecord> orderByComparator)
     
    static int
    getRecordsCount(long recordSetId)
     
    static int
    getRecordsCount(long recordSetId, int status)
    Returns the number of records matching the record set ID and workflow status.
    static int
    getRecordsCount(long recordSetId, long userId)
     
     
    static void
    revertRecord(long userId, long recordId, String version, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Reverts the record to the given version.
    static com.liferay.portal.kernel.search.Hits
    search(com.liferay.portal.kernel.search.SearchContext searchContext)
    Returns hits to all the records indexed by the search engine matching the search context.
    static com.liferay.portal.kernel.search.BaseModelSearchResult<DDLRecord>
    searchDDLRecords(com.liferay.portal.kernel.search.SearchContext searchContext)
    Searches for records documents indexed by the search engine.
    static void
    updateAsset(long userId, DDLRecord record, DDLRecordVersion recordVersion, long[] assetCategoryIds, String[] assetTagNames, Locale locale, Double priority)
    Updates the record's asset with new asset categories, tag names, and link entries, removing and adding them as necessary.
    static DDLRecord
    Updates the ddl record in the database or adds it if it does not yet exist.
    static DDLRecord
    updateRecord(long userId, long recordId, boolean majorVersion, int displayIndex, com.liferay.dynamic.data.mapping.storage.DDMFormValues ddmFormValues, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Updates the record, replacing its display index and values.
    static DDLRecord
    updateRecord(long userId, long recordId, int displayIndex, Map<String,Serializable> fieldsMap, boolean mergeFields, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    static DDLRecord
    updateRecord(long userId, long recordId, long ddmStorageId, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    static DDLRecord
    updateStatus(long userId, long recordVersionId, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Updates the workflow status of the record version.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DDLRecordLocalServiceUtil

      public DDLRecordLocalServiceUtil()
  • Method Details

    • addDDLRecord

      public static DDLRecord addDDLRecord(DDLRecord ddlRecord)
      Adds the ddl record to the database. Also notifies the appropriate model listeners.

      Important: Inspect DDLRecordLocalServiceImpl 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:
      ddlRecord - the ddl record
      Returns:
      the ddl record that was added
    • addRecord

      public static DDLRecord addRecord(long userId, long groupId, long recordSetId, int displayIndex, com.liferay.dynamic.data.mapping.storage.DDMFormValues ddmFormValues, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a record referencing the record set.
      Parameters:
      userId - the primary key of the record's creator/owner
      groupId - the primary key of the record's group
      recordSetId - the primary key of the record set
      displayIndex - the index position in which the record is displayed in the spreadsheet view
      ddmFormValues - the record values. See DDMFormValues in the dynamic.data.mapping.api module.
      serviceContext - the service context to be applied. This can set the UUID, guest permissions, and group permissions for the record.
      Returns:
      the record
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • addRecord

      public static DDLRecord addRecord(long userId, long groupId, long recordSetId, int displayIndex, Map<String,Serializable> fieldsMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addRecord

      @Deprecated public static DDLRecord addRecord(long userId, long groupId, long ddmStorageId, long ddlRecordSetId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Deprecated.
      As of Athanasius (7.3.x)
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addRecord

      public static DDLRecord addRecord(long userId, long groupId, long ddmStorageId, long ddlRecordSetId, String className, long classPK, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • createDDLRecord

      public static DDLRecord createDDLRecord(long recordId)
      Creates a new ddl record with the primary key. Does not add the ddl record to the database.
      Parameters:
      recordId - the primary key for the new ddl record
      Returns:
      the new ddl record
    • createPersistedModel

      public static com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteDDLRecord

      public static DDLRecord deleteDDLRecord(DDLRecord ddlRecord)
      Deletes the ddl record from the database. Also notifies the appropriate model listeners.

      Important: Inspect DDLRecordLocalServiceImpl 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:
      ddlRecord - the ddl record
      Returns:
      the ddl record that was removed
    • deleteDDLRecord

      public static DDLRecord deleteDDLRecord(long recordId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the ddl record with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect DDLRecordLocalServiceImpl 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:
      recordId - the primary key of the ddl record
      Returns:
      the ddl record that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a ddl record with the primary key could not be found
    • deletePersistedModel

      public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteRecord

      public static DDLRecord deleteRecord(DDLRecord record) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the record and its resources.
      Parameters:
      record - the record to be deleted
      Returns:
      the record
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteRecord

      public static void deleteRecord(long recordId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the record and its resources.
      Parameters:
      recordId - the primary key of the record to be deleted
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteRecords

      public static void deleteRecords(long recordSetId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes all the record set's records.
      Parameters:
      recordSetId - the primary key of the record set from which to delete records
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • 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

      public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
    • dynamicQuery

      public static <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.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(com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.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, then the query will include the default ORDER BY logic from com.liferay.dynamic.data.lists.model.impl.DDLRecordModelImpl.

      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(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.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 com.liferay.portal.kernel.dao.orm.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, then the query will include the default ORDER BY logic from com.liferay.dynamic.data.lists.model.impl.DDLRecordModelImpl.

      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(com.liferay.portal.kernel.dao.orm.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(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.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
    • fetchDDLRecord

      public static DDLRecord fetchDDLRecord(long recordId)
    • fetchDDLRecordByUuidAndGroupId

      public static DDLRecord fetchDDLRecordByUuidAndGroupId(String uuid, long groupId)
      Returns the ddl record matching the UUID and group.
      Parameters:
      uuid - the ddl record's UUID
      groupId - the primary key of the group
      Returns:
      the matching ddl record, or null if a matching ddl record could not be found
    • fetchFirstRecord

      public static DDLRecord fetchFirstRecord(String className, long classPK)
    • fetchRecord

      public static DDLRecord fetchRecord(long recordId)
      Returns the record with the ID.
      Parameters:
      recordId - the primary key of the record
      Returns:
      the record with the ID, or null if a matching record could not be found
    • getActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
    • getCompanyRecords

      public static List<DDLRecord> getCompanyRecords(long companyId, int status, int scope, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDLRecord> orderByComparator)
      Returns an ordered range of all the records matching the company, workflow status, and scope.

      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.

      Parameters:
      companyId - the primary key of the record's company
      status - the record's workflow status. For more information search the portal kernel's WorkflowConstants class for constants starting with the "STATUS_" prefix.
      scope - the record's scope. For more information search the dynamic-data-lists-api module's DDLRecordSetConstants class for constants starting with the "SCOPE_" prefix.
      start - the lower bound of the range of records to return
      end - the upper bound of the range of records to return (not inclusive)
      orderByComparator - the comparator to order the records
      Returns:
      the range of matching records ordered by the comparator
    • getCompanyRecordsCount

      public static int getCompanyRecordsCount(long companyId, int status, int scope)
      Returns the number of records matching the company, workflow status, and scope.
      Parameters:
      companyId - the primary key of the record's company
      status - the record's workflow status. For more information search the portal kernel's WorkflowConstants class for constants starting with the "STATUS_" prefix.
      scope - the record's scope. For more information search the dynamic-data-lists-api module's DDLRecordSetConstants class for constants starting with the "SCOPE_" prefix.
      Returns:
      the number of matching records
    • getDDLRecord

      public static DDLRecord getDDLRecord(long recordId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the ddl record with the primary key.
      Parameters:
      recordId - the primary key of the ddl record
      Returns:
      the ddl record
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a ddl record with the primary key could not be found
    • getDDLRecordByUuidAndGroupId

      public static DDLRecord getDDLRecordByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the ddl record matching the UUID and group.
      Parameters:
      uuid - the ddl record's UUID
      groupId - the primary key of the group
      Returns:
      the matching ddl record
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a matching ddl record could not be found
    • getDDLRecords

      public static List<DDLRecord> getDDLRecords(int start, int end)
      Returns a range of all the ddl records.

      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 com.liferay.portal.kernel.dao.orm.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, then the query will include the default ORDER BY logic from com.liferay.dynamic.data.lists.model.impl.DDLRecordModelImpl.

      Parameters:
      start - the lower bound of the range of ddl records
      end - the upper bound of the range of ddl records (not inclusive)
      Returns:
      the range of ddl records
    • getDDLRecordsByUuidAndCompanyId

      public static List<DDLRecord> getDDLRecordsByUuidAndCompanyId(String uuid, long companyId)
      Returns all the ddl records matching the UUID and company.
      Parameters:
      uuid - the UUID of the ddl records
      companyId - the primary key of the company
      Returns:
      the matching ddl records, or an empty list if no matches were found
    • getDDLRecordsByUuidAndCompanyId

      public static List<DDLRecord> getDDLRecordsByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDLRecord> orderByComparator)
      Returns a range of ddl records matching the UUID and company.
      Parameters:
      uuid - the UUID of the ddl records
      companyId - the primary key of the company
      start - the lower bound of the range of ddl records
      end - the upper bound of the range of ddl records (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the range of matching ddl records, or an empty list if no matches were found
    • getDDLRecordsCount

      public static int getDDLRecordsCount()
      Returns the number of ddl records.
      Returns:
      the number of ddl records
    • getDDMFormValues

      public static com.liferay.dynamic.data.mapping.storage.DDMFormValues getDDMFormValues(long ddmStorageId) throws com.liferay.dynamic.data.mapping.exception.StorageException
      Returns the DDM form values object associated with the record storage ID See DDLRecord#getDDMFormValues in the com.liferay.dynamic.data.lists.api module.
      Parameters:
      ddmStorageId - the storage ID associated with the record
      Returns:
      the DDM form values
      Throws:
      com.liferay.dynamic.data.mapping.exception.StorageException
    • getExportActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
    • getIndexableActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
    • getMinAndMaxCompanyRecordIds

      public static Long[] getMinAndMaxCompanyRecordIds(long companyId, int status, int scope)
    • getMinAndMaxCompanyRecords

      public static List<DDLRecord> getMinAndMaxCompanyRecords(long companyId, int status, int scope, long minRecordId, long maxRecordId)
    • getOSGiServiceIdentifier

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

      public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRecord

      public static DDLRecord getRecord(long recordId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the record with the ID.
      Parameters:
      recordId - the primary key of the record
      Returns:
      the record with the ID
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getRecords

      public static List<DDLRecord> getRecords(long recordSetId)
      Returns all the records matching the record set ID
      Parameters:
      recordSetId - the record's record set ID
      Returns:
      the matching records
    • getRecords

      public static List<DDLRecord> getRecords(long recordSetId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDLRecord> orderByComparator)
      Returns an ordered range of all the records matching the record set ID and workflow status.

      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.

      Parameters:
      recordSetId - the record's record set ID
      status - the record's workflow status. For more information search the portal kernel's WorkflowConstants class for constants starting with the "STATUS_" prefix.
      start - the lower bound of the range of records to return
      end - the upper bound of the range of records to return (not inclusive)
      orderByComparator - the comparator to order the records
      Returns:
      the range of matching records ordered by the comparator
    • getRecords

      public static List<DDLRecord> getRecords(long recordSetId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDLRecord> orderByComparator)
    • getRecords

      public static List<DDLRecord> getRecords(long recordSetId, long userId)
      Returns all the records matching the record set ID and user ID.
      Parameters:
      recordSetId - the record's record set ID
      userId - the user ID the records belong to
      Returns:
      the list of matching records ordered by the comparator
    • getRecords

      public static List<DDLRecord> getRecords(long recordSetId, long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDLRecord> orderByComparator)
    • getRecordsCount

      public static int getRecordsCount(long recordSetId)
    • getRecordsCount

      public static int getRecordsCount(long recordSetId, int status)
      Returns the number of records matching the record set ID and workflow status.
      Parameters:
      recordSetId - the record's record set ID
      status - the record's workflow status. For more information search the portal kernel's WorkflowConstants class for constants starting with the "STATUS_" prefix.
      Returns:
      the number of matching records
    • getRecordsCount

      public static int getRecordsCount(long recordSetId, long userId)
    • revertRecord

      public static void revertRecord(long userId, long recordId, String version, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Reverts the record to the given version.
      Parameters:
      userId - the primary key of the user who is reverting the record
      recordId - the primary key of the record
      version - the version to revert to
      serviceContext - the service context to be applied. This can set the record modified date.
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • search

      public static com.liferay.portal.kernel.search.Hits search(com.liferay.portal.kernel.search.SearchContext searchContext)
      Returns hits to all the records indexed by the search engine matching the search context.
      Parameters:
      searchContext - the search context to be applied for searching records. For more information, see SearchContext in the portal-kernel module.
      Returns:
      the hits of the records that matched the search criteria.
    • searchDDLRecords

      public static com.liferay.portal.kernel.search.BaseModelSearchResult<DDLRecord> searchDDLRecords(com.liferay.portal.kernel.search.SearchContext searchContext)
      Searches for records documents indexed by the search engine.
      Parameters:
      searchContext - the search context to be applied for searching documents. For more information, see SearchContext in the portal-kernel module.
      Returns:
      BaseModelSearchResult containing the list of records that matched the search criteria
    • updateAsset

      public static void updateAsset(long userId, DDLRecord record, DDLRecordVersion recordVersion, long[] assetCategoryIds, String[] assetTagNames, Locale locale, Double priority) throws com.liferay.portal.kernel.exception.PortalException
      Updates the record's asset with new asset categories, tag names, and link entries, removing and adding them as necessary.
      Parameters:
      userId - the primary key of the user updating the record's asset
      record - the record
      recordVersion - the record version
      assetCategoryIds - the primary keys of the new asset categories
      assetTagNames - the new asset tag names
      locale - the locale to apply to the asset
      priority - the new priority
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateDDLRecord

      public static DDLRecord updateDDLRecord(DDLRecord ddlRecord)
      Updates the ddl record in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect DDLRecordLocalServiceImpl 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:
      ddlRecord - the ddl record
      Returns:
      the ddl record that was updated
    • updateRecord

      public static DDLRecord updateRecord(long userId, long recordId, boolean majorVersion, int displayIndex, com.liferay.dynamic.data.mapping.storage.DDMFormValues ddmFormValues, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Updates the record, replacing its display index and values.
      Parameters:
      userId - the primary key of the user updating the record
      recordId - the primary key of the record
      majorVersion - whether this update is a major change. A major change increments the record's major version number.
      displayIndex - the index position in which the record is displayed in the spreadsheet view
      ddmFormValues - the record values. See DDMFormValues in the dynamic.data.mapping.api module.
      serviceContext - the service context to be applied. This can set the record modified date.
      Returns:
      the record
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateRecord

      public static DDLRecord updateRecord(long userId, long recordId, int displayIndex, Map<String,Serializable> fieldsMap, boolean mergeFields, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateRecord

      public static DDLRecord updateRecord(long userId, long recordId, long ddmStorageId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateStatus

      public static DDLRecord updateStatus(long userId, long recordVersionId, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Updates the workflow status of the record version.
      Parameters:
      userId - the primary key of the user updating the record's workflow status
      recordVersionId - the primary key of the record version
      status -
      serviceContext - the service context to be applied. This can set the modification date and status date.
      Returns:
      the record
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getService

      public static DDLRecordLocalService getService()