Class ObjectRelationshipLocalServiceUtil
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectRelationship
addObjectRelationship
(ObjectRelationship objectRelationship) Adds the object relationship to the database.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) static ObjectRelationship
addObjectRelationship
(String externalReferenceCode, long userId, long objectDefinitionId1, long objectDefinitionId2, ObjectField objectField) static void
addObjectRelationshipMappingTableValues
(long userId, long objectRelationshipId, long primaryKey1, long primaryKey2, com.liferay.portal.kernel.service.ServiceContext serviceContext) static ObjectRelationship
createManyToManyObjectRelationshipTable
(long userId, ObjectRelationship objectRelationship) static ObjectRelationship
createObjectRelationship
(long objectRelationshipId) Creates a new object relationship with the primary key.static com.liferay.portal.kernel.model.PersistedModel
createPersistedModel
(Serializable primaryKeyObj) static ObjectRelationship
deleteObjectRelationship
(long objectRelationshipId) Deletes the object relationship with the primary key from the database.static ObjectRelationship
deleteObjectRelationship
(ObjectRelationship objectRelationship) Deletes the object relationship from the database.static void
deleteObjectRelationshipMappingTableValues
(long objectRelationshipId, long primaryKey1) static void
deleteObjectRelationshipMappingTableValues
(long objectRelationshipId, long primaryKey1, long primaryKey2) static void
deleteObjectRelationships
(long objectDefinitionId1) static void
deleteObjectRelationships
(long objectDefinitionId1, boolean reverse) static com.liferay.portal.kernel.model.PersistedModel
deletePersistedModel
(com.liferay.portal.kernel.model.PersistedModel persistedModel) static void
disableEdge
(long objectDefinitionId2) 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 ObjectRelationship
fetchObjectRelationship
(long objectRelationshipId) static ObjectRelationship
fetchObjectRelationshipByExternalReferenceCode
(String externalReferenceCode, long objectDefinitionId1) static ObjectRelationship
fetchObjectRelationshipByExternalReferenceCode
(String externalReferenceCode, long companyId, long objectDefinitionId1) static ObjectRelationship
fetchObjectRelationshipByObjectDefinitionId
(long objectDefinitionId, String name) static ObjectRelationship
fetchObjectRelationshipByObjectDefinitionId1
(long objectDefinitionId1, String name) static ObjectRelationship
fetchObjectRelationshipByObjectFieldId2
(long objectFieldId2) static ObjectRelationship
fetchObjectRelationshipByUuidAndCompanyId
(String uuid, long companyId) Returns the object relationship with the matching UUID and company.static ObjectRelationship
fetchReverseObjectRelationship
(ObjectRelationship objectRelationship, boolean reverse) static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
static List<ObjectRelationship>
getAllObjectRelationships
(long objectDefinitionId) 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 ObjectRelationship
getObjectRelationship
(long objectRelationshipId) Returns the object relationship with the primary key.static ObjectRelationship
getObjectRelationship
(long objectDefinitionId1, String name) static ObjectRelationship
getObjectRelationshipByExternalReferenceCode
(String externalReferenceCode, long companyId, long objectDefinitionId1) static ObjectRelationship
getObjectRelationshipByObjectDefinitionId
(long objectDefinitionId, String name) static ObjectRelationship
getObjectRelationshipByUuidAndCompanyId
(String uuid, long companyId) Returns the object relationship with the matching UUID and company.static List<ObjectRelationship>
getObjectRelationships
(int start, int end) Returns a range of all the object relationships.static List<ObjectRelationship>
getObjectRelationships
(long objectDefinitionId1) static List<ObjectRelationship>
getObjectRelationships
(long objectDefinitionId1, boolean edge) static List<ObjectRelationship>
getObjectRelationships
(long objectDefinitionId1, int start, int end) static List<ObjectRelationship>
getObjectRelationships
(long objectDefinitionId1, long objectDefinition2, String type) static List<ObjectRelationship>
getObjectRelationships
(long objectDefinitionId, String type) static List<ObjectRelationship>
getObjectRelationships
(long objectDefinitionId1, String deletionType, boolean reverse) static List<ObjectRelationship>
getObjectRelationshipsByObjectDefinitionId2
(long objectDefinitionId2) static int
Returns the number of object relationships.static Map<Long,
List<ObjectRelationship>> getObjectRelationshipsMap
(long companyId) static String
Returns the OSGi service identifier.static com.liferay.portal.kernel.model.PersistedModel
getPersistedModel
(Serializable primaryKeyObj) static void
registerObjectRelationshipsRelatedInfoCollectionProviders
(ObjectDefinition objectDefinition1, ObjectDefinitionLocalService objectDefinitionLocalService, List<ObjectRelationship> objectRelationships) static ObjectRelationship
updateObjectRelationship
(ObjectRelationship objectRelationship) Updates the object relationship in the database or adds it if it does not yet exist.static ObjectRelationship
updateObjectRelationship
(String externalReferenceCode, long objectRelationshipId, long parameterObjectFieldId, String deletionType, boolean edge, Map<Locale, String> labelMap, ObjectField objectField) static void
updateUserId
(long companyId, long oldUserId, long newUserId)
-
Constructor Details
-
ObjectRelationshipLocalServiceUtil
public ObjectRelationshipLocalServiceUtil()
-
-
Method Details
-
addObjectRelationship
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
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
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
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.object.model.impl.ObjectRelationshipModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
public static <T> List<T> dynamicQuery(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
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.object.model.impl.ObjectRelationshipModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
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 queryprojection
- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchObjectRelationship
-
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
-
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 UUIDcompanyId
- 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
-
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 UUIDcompanyId
- 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
Returns a range of all the object relationships.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.object.model.impl.ObjectRelationshipModelImpl
.- Parameters:
start
- the lower bound of the range of object relationshipsend
- the upper bound of the range of object relationships (not inclusive)- Returns:
- the range of object relationships
-
getObjectRelationships
-
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
-
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
-
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
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
-