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 ObjectRelationshipaddObjectRelationship(ObjectRelationship objectRelationship) Adds the object relationship to the database.static ObjectRelationshipaddObjectRelationship(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 ObjectRelationshipaddObjectRelationship(String externalReferenceCode, long userId, long objectDefinitionId1, long objectDefinitionId2, ObjectField objectField) static voidaddObjectRelationshipMappingTableValues(long userId, long objectRelationshipId, long primaryKey1, long primaryKey2, com.liferay.portal.kernel.service.ServiceContext serviceContext) static ObjectRelationshipcreateManyToManyObjectRelationshipTable(long userId, ObjectRelationship objectRelationship) static ObjectRelationshipcreateObjectRelationship(long objectRelationshipId) Creates a new object relationship with the primary key.static com.liferay.portal.kernel.model.PersistedModelcreatePersistedModel(Serializable primaryKeyObj) static ObjectRelationshipdeleteObjectRelationship(long objectRelationshipId) Deletes the object relationship with the primary key from the database.static ObjectRelationshipdeleteObjectRelationship(ObjectRelationship objectRelationship) Deletes the object relationship from the database.static voiddeleteObjectRelationshipMappingTableValues(long objectRelationshipId, long primaryKey1) static voiddeleteObjectRelationshipMappingTableValues(long objectRelationshipId, long primaryKey1, long primaryKey2) static voiddeleteObjectRelationships(long objectDefinitionId1) static voiddeleteObjectRelationships(long objectDefinitionId1, boolean reverse) static com.liferay.portal.kernel.model.PersistedModeldeletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) static voiddisableEdge(long objectDefinitionId2) static <T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static intdslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static com.liferay.portal.kernel.dao.orm.DynamicQuerystatic <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 longdynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.static longdynamicQueryCount(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 ObjectRelationshipfetchObjectRelationship(long objectRelationshipId) static ObjectRelationshipfetchObjectRelationshipByExternalReferenceCode(String externalReferenceCode, long objectDefinitionId1) static ObjectRelationshipfetchObjectRelationshipByExternalReferenceCode(String externalReferenceCode, long companyId, long objectDefinitionId1) static ObjectRelationshipfetchObjectRelationshipByObjectDefinitionId(long objectDefinitionId, String name) static ObjectRelationshipfetchObjectRelationshipByObjectDefinitionId1(long objectDefinitionId1, String name) static ObjectRelationshipfetchObjectRelationshipByObjectFieldId2(long objectFieldId2) static ObjectRelationshipfetchObjectRelationshipByUuidAndCompanyId(String uuid, long companyId) Returns the object relationship with the matching UUID and company.static ObjectRelationshipfetchReverseObjectRelationship(ObjectRelationship objectRelationship, boolean reverse) static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuerystatic List<ObjectRelationship>getAllObjectRelationships(long objectDefinitionId) static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuerygetExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuerystatic ObjectRelationshipgetObjectRelationship(long objectRelationshipId) Returns the object relationship with the primary key.static ObjectRelationshipgetObjectRelationship(long objectDefinitionId1, String name) static ObjectRelationshipgetObjectRelationshipByExternalReferenceCode(String externalReferenceCode, long companyId, long objectDefinitionId1) static ObjectRelationshipgetObjectRelationshipByObjectDefinitionId(long objectDefinitionId, String name) static ObjectRelationshipgetObjectRelationshipByUuidAndCompanyId(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 intReturns the number of object relationships.static Map<Long,List<ObjectRelationship>> getObjectRelationshipsMap(long companyId) static StringReturns the OSGi service identifier.static com.liferay.portal.kernel.model.PersistedModelgetPersistedModel(Serializable primaryKeyObj) static voidregisterObjectRelationshipsRelatedInfoCollectionProviders(ObjectDefinition objectDefinition1, ObjectDefinitionLocalService objectDefinitionLocalService, List<ObjectRelationship> objectRelationships) static ObjectRelationshipupdateObjectRelationship(ObjectRelationship objectRelationship) Updates the object relationship in the database or adds it if it does not yet exist.static ObjectRelationshipupdateObjectRelationship(String externalReferenceCode, long objectRelationshipId, long parameterObjectFieldId, String deletionType, boolean edge, Map<Locale, String> labelMap, ObjectField objectField) static voidupdateUserId(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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris 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
nullif 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris 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
-