Class ObjectRelationshipLocalServiceUtil

java.lang.Object
com.liferay.object.service.ObjectRelationshipLocalServiceUtil

public class ObjectRelationshipLocalServiceUtil extends Object
Provides the local service utility for ObjectRelationship. This utility wraps com.liferay.object.service.impl.ObjectRelationshipLocalServiceImpl 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 Details

    • ObjectRelationshipLocalServiceUtil

      public ObjectRelationshipLocalServiceUtil()
  • Method Details

    • addObjectRelationship

      public static ObjectRelationship addObjectRelationship(ObjectRelationship objectRelationship)
      Adds the object relationship to the database. Also notifies the appropriate model listeners.

      Important: Inspect ObjectRelationshipLocalServiceImpl 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:
      objectRelationship - the object relationship
      Returns:
      the object relationship that was added
    • addObjectRelationship

      public static ObjectRelationship addObjectRelationship(String externalReferenceCode, long userId, long objectDefinitionId1, long objectDefinitionId2, long parameterObjectFieldId, String deletionType, boolean edge, Map<Locale,String> labelMap, String name, boolean system, String type, ObjectField objectField) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addObjectRelationship

      public static ObjectRelationship addObjectRelationship(String externalReferenceCode, long userId, long objectDefinitionId1, long objectDefinitionId2, ObjectField objectField) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addObjectRelationshipMappingTableValues

      public static void addObjectRelationshipMappingTableValues(long userId, long objectRelationshipId, long primaryKey1, long primaryKey2, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • createManyToManyObjectRelationshipTable

      public static ObjectRelationship createManyToManyObjectRelationshipTable(long userId, ObjectRelationship objectRelationship) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • createObjectRelationship

      public static ObjectRelationship createObjectRelationship(long objectRelationshipId)
      Creates a new object relationship with the primary key. Does not add the object relationship to the database.
      Parameters:
      objectRelationshipId - the primary key for the new object relationship
      Returns:
      the new object relationship
    • 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
    • deleteObjectRelationship

      public static ObjectRelationship deleteObjectRelationship(long objectRelationshipId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the object relationship with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect ObjectRelationshipLocalServiceImpl 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:
      objectRelationshipId - the primary key of the object relationship
      Returns:
      the object relationship that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a object relationship with the primary key could not be found
    • deleteObjectRelationship

      public static ObjectRelationship deleteObjectRelationship(ObjectRelationship objectRelationship) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the object relationship from the database. Also notifies the appropriate model listeners.

      Important: Inspect ObjectRelationshipLocalServiceImpl 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:
      objectRelationship - the object relationship
      Returns:
      the object relationship that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteObjectRelationshipMappingTableValues

      public static void deleteObjectRelationshipMappingTableValues(long objectRelationshipId, long primaryKey1) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteObjectRelationshipMappingTableValues

      public static void deleteObjectRelationshipMappingTableValues(long objectRelationshipId, long primaryKey1, long primaryKey2) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteObjectRelationships

      public static void deleteObjectRelationships(long objectDefinitionId1) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteObjectRelationships

      public static void deleteObjectRelationships(long objectDefinitionId1, boolean reverse) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • 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
    • disableEdge

      public static void disableEdge(long objectDefinitionId2) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.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

      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.object.model.impl.ObjectRelationshipModelImpl.

      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.object.model.impl.ObjectRelationshipModelImpl.

      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
    • fetchObjectRelationship

      public static ObjectRelationship fetchObjectRelationship(long objectRelationshipId)
    • fetchObjectRelationshipByExternalReferenceCode

      public static ObjectRelationship fetchObjectRelationshipByExternalReferenceCode(String externalReferenceCode, long objectDefinitionId1)
    • fetchObjectRelationshipByExternalReferenceCode

      public static ObjectRelationship fetchObjectRelationshipByExternalReferenceCode(String externalReferenceCode, long companyId, long objectDefinitionId1)
    • fetchObjectRelationshipByObjectDefinitionId

      public static ObjectRelationship fetchObjectRelationshipByObjectDefinitionId(long objectDefinitionId, String name)
    • fetchObjectRelationshipByObjectDefinitionId1

      public static ObjectRelationship fetchObjectRelationshipByObjectDefinitionId1(long objectDefinitionId1, String name)
    • fetchObjectRelationshipByObjectFieldId2

      public static ObjectRelationship fetchObjectRelationshipByObjectFieldId2(long objectFieldId2)
    • fetchObjectRelationshipByUuidAndCompanyId

      public static ObjectRelationship fetchObjectRelationshipByUuidAndCompanyId(String uuid, long companyId)
      Returns the object relationship with the matching UUID and company.
      Parameters:
      uuid - the object relationship's UUID
      companyId - the primary key of the company
      Returns:
      the matching object relationship, or null if a matching object relationship could not be found
    • fetchReverseObjectRelationship

      public static ObjectRelationship fetchReverseObjectRelationship(ObjectRelationship objectRelationship, boolean reverse)
    • getActionableDynamicQuery

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

      public static List<ObjectRelationship> getAllObjectRelationships(long objectDefinitionId)
    • 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()
    • getObjectRelationship

      public static ObjectRelationship getObjectRelationship(long objectRelationshipId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the object relationship with the primary key.
      Parameters:
      objectRelationshipId - the primary key of the object relationship
      Returns:
      the object relationship
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a object relationship with the primary key could not be found
    • getObjectRelationship

      public static ObjectRelationship getObjectRelationship(long objectDefinitionId1, String name) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getObjectRelationshipByExternalReferenceCode

      public static ObjectRelationship getObjectRelationshipByExternalReferenceCode(String externalReferenceCode, long companyId, long objectDefinitionId1) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getObjectRelationshipByObjectDefinitionId

      public static ObjectRelationship getObjectRelationshipByObjectDefinitionId(long objectDefinitionId, String name) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getObjectRelationshipByUuidAndCompanyId

      public static ObjectRelationship getObjectRelationshipByUuidAndCompanyId(String uuid, long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the object relationship with the matching UUID and company.
      Parameters:
      uuid - the object relationship's UUID
      companyId - the primary key of the company
      Returns:
      the matching object relationship
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a matching object relationship could not be found
    • getObjectRelationships

      public static List<ObjectRelationship> getObjectRelationships(int start, int end)
      Returns a range of all the object relationships.

      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.object.model.impl.ObjectRelationshipModelImpl.

      Parameters:
      start - the lower bound of the range of object relationships
      end - the upper bound of the range of object relationships (not inclusive)
      Returns:
      the range of object relationships
    • getObjectRelationships

      public static List<ObjectRelationship> getObjectRelationships(long objectDefinitionId1)
    • getObjectRelationships

      public static List<ObjectRelationship> getObjectRelationships(long objectDefinitionId1, boolean edge)
    • getObjectRelationships

      public static List<ObjectRelationship> getObjectRelationships(long objectDefinitionId1, int start, int end)
    • getObjectRelationships

      public static List<ObjectRelationship> getObjectRelationships(long objectDefinitionId1, long objectDefinition2, String type)
    • getObjectRelationships

      public static List<ObjectRelationship> getObjectRelationships(long objectDefinitionId, String type)
    • getObjectRelationships

      public static List<ObjectRelationship> getObjectRelationships(long objectDefinitionId1, String deletionType, boolean reverse)
    • getObjectRelationshipsByObjectDefinitionId2

      public static List<ObjectRelationship> getObjectRelationshipsByObjectDefinitionId2(long objectDefinitionId2)
    • getObjectRelationshipsCount

      public static int getObjectRelationshipsCount()
      Returns the number of object relationships.
      Returns:
      the number of object relationships
    • getObjectRelationshipsMap

      public static Map<Long,List<ObjectRelationship>> getObjectRelationshipsMap(long companyId)
    • 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
    • registerObjectRelationshipsRelatedInfoCollectionProviders

      public static void registerObjectRelationshipsRelatedInfoCollectionProviders(ObjectDefinition objectDefinition1, ObjectDefinitionLocalService objectDefinitionLocalService, List<ObjectRelationship> objectRelationships)
    • updateObjectRelationship

      public static ObjectRelationship updateObjectRelationship(ObjectRelationship objectRelationship)
      Updates the object relationship in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect ObjectRelationshipLocalServiceImpl 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:
      objectRelationship - the object relationship
      Returns:
      the object relationship that was updated
    • updateObjectRelationship

      public static ObjectRelationship updateObjectRelationship(String externalReferenceCode, long objectRelationshipId, long parameterObjectFieldId, String deletionType, boolean edge, Map<Locale,String> labelMap, ObjectField objectField) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateUserId

      public static void updateUserId(long companyId, long oldUserId, long newUserId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getService

      public static ObjectRelationshipLocalService getService()