Interface EmailAddressLocalService
- All Superinterfaces:
BaseLocalService
,CTService<EmailAddress>
,PersistedModelLocalService
- All Known Implementing Classes:
EmailAddressLocalServiceWrapper
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Method Summary
Modifier and TypeMethodDescriptionaddEmailAddress
(EmailAddress emailAddress) Adds the email address to the database.addEmailAddress
(String externalReferenceCode, long userId, String className, long classPK, String address, long listTypeId, boolean primary, ServiceContext serviceContext) createEmailAddress
(long emailAddressId) Creates a new email address with the primary key.createPersistedModel
(Serializable primaryKeyObj) deleteEmailAddress
(long emailAddressId) Deletes the email address with the primary key from the database.deleteEmailAddress
(EmailAddress emailAddress) Deletes the email address from the database.void
deleteEmailAddresses
(long companyId, String className, long classPK) deletePersistedModel
(PersistedModel persistedModel) <T> T
dslQuery
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) int
dslQueryCount
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) <T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.<T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.<T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.long
dynamicQueryCount
(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.long
dynamicQueryCount
(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.fetchEmailAddress
(long emailAddressId) fetchEmailAddressByExternalReferenceCode
(String externalReferenceCode, long companyId) fetchEmailAddressByUuidAndCompanyId
(String uuid, long companyId) Returns the email address with the matching UUID and company.getEmailAddress
(long emailAddressId) Returns the email address with the primary key.getEmailAddressByExternalReferenceCode
(String externalReferenceCode, long companyId) getEmailAddressByUuidAndCompanyId
(String uuid, long companyId) Returns the email address with the matching UUID and company.getEmailAddresses
(int start, int end) Returns a range of all the email addresses.getEmailAddresses
(long companyId, String className, long classPK) int
Returns the number of email addresses.getExportActionableDynamicQuery
(PortletDataContext portletDataContext) Returns the OSGi service identifier.getPersistedModel
(Serializable primaryKeyObj) updateEmailAddress
(EmailAddress emailAddress) Updates the email address in the database or adds it if it does not yet exist.updateEmailAddress
(String externalReferenceCode, long emailAddressId, String address, long listTypeId, boolean primary) <R,
E extends Throwable>
RupdateWithUnsafeFunction
(com.liferay.petra.function.UnsafeFunction<CTPersistence<EmailAddress>, R, E> updateUnsafeFunction) Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel, getBasePersistence
-
Method Details
-
addEmailAddress
Adds the email address to the database. Also notifies the appropriate model listeners.Important: Inspect EmailAddressLocalServiceImpl 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:
emailAddress
- the email address- Returns:
- the email address that was added
-
addEmailAddress
EmailAddress addEmailAddress(String externalReferenceCode, long userId, String className, long classPK, String address, long listTypeId, boolean primary, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
createEmailAddress
Creates a new email address with the primary key. Does not add the email address to the database.- Parameters:
emailAddressId
- the primary key for the new email address- Returns:
- the new email address
-
createPersistedModel
- Specified by:
createPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
deleteEmailAddress
@Indexable(type=DELETE) @SystemEvent(action=1, type=1) EmailAddress deleteEmailAddress(EmailAddress emailAddress) Deletes the email address from the database. Also notifies the appropriate model listeners.Important: Inspect EmailAddressLocalServiceImpl 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:
emailAddress
- the email address- Returns:
- the email address that was removed
-
deleteEmailAddress
Deletes the email address with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect EmailAddressLocalServiceImpl 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:
emailAddressId
- the primary key of the email address- Returns:
- the email address that was removed
- Throws:
PortalException
- if a email address with the primary key could not be found
-
deleteEmailAddresses
-
deletePersistedModel
- Specified by:
deletePersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
dslQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQuery
in interfacePersistedModelLocalService
-
dslQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCount
in interfacePersistedModelLocalService
-
dynamicQuery
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> 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
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(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.portal.model.impl.EmailAddressModelImpl
.- 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
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, 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.portal.model.impl.EmailAddressModelImpl
.- 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
@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(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
@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(DynamicQuery dynamicQuery, 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
-
fetchEmailAddress
@Transactional(propagation=SUPPORTS, readOnly=true) EmailAddress fetchEmailAddress(long emailAddressId) -
fetchEmailAddressByExternalReferenceCode
@Transactional(propagation=SUPPORTS, readOnly=true) EmailAddress fetchEmailAddressByExternalReferenceCode(String externalReferenceCode, long companyId) -
fetchEmailAddressByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) EmailAddress fetchEmailAddressByUuidAndCompanyId(String uuid, long companyId) Returns the email address with the matching UUID and company.- Parameters:
uuid
- the email address's UUIDcompanyId
- the primary key of the company- Returns:
- the matching email address, or
null
if a matching email address could not be found
-
getActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ActionableDynamicQuery getActionableDynamicQuery() -
getEmailAddress
@Transactional(propagation=SUPPORTS, readOnly=true) EmailAddress getEmailAddress(long emailAddressId) throws PortalException Returns the email address with the primary key.- Parameters:
emailAddressId
- the primary key of the email address- Returns:
- the email address
- Throws:
PortalException
- if a email address with the primary key could not be found
-
getEmailAddressByExternalReferenceCode
@Transactional(propagation=SUPPORTS, readOnly=true) EmailAddress getEmailAddressByExternalReferenceCode(String externalReferenceCode, long companyId) throws PortalException - Throws:
PortalException
-
getEmailAddressByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) EmailAddress getEmailAddressByUuidAndCompanyId(String uuid, long companyId) throws PortalException Returns the email address with the matching UUID and company.- Parameters:
uuid
- the email address's UUIDcompanyId
- the primary key of the company- Returns:
- the matching email address
- Throws:
PortalException
- if a matching email address could not be found
-
getEmailAddresses
-
getEmailAddresses
@Transactional(propagation=SUPPORTS, readOnly=true) List<EmailAddress> getEmailAddresses(int start, int end) Returns a range of all the email addresses.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.portal.model.impl.EmailAddressModelImpl
.- Parameters:
start
- the lower bound of the range of email addressesend
- the upper bound of the range of email addresses (not inclusive)- Returns:
- the range of email addresses
-
getEmailAddresses
@Transactional(propagation=SUPPORTS, readOnly=true) List<EmailAddress> getEmailAddresses(long companyId, String className, long classPK) -
getEmailAddressesCount
Returns the number of email addresses.- Returns:
- the number of email addresses
-
getExportActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext) -
getIndexableActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getOSGiServiceIdentifier
String getOSGiServiceIdentifier()Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
@Transactional(propagation=SUPPORTS, readOnly=true) PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException - Specified by:
getPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
updateEmailAddress
Updates the email address in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect EmailAddressLocalServiceImpl 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:
emailAddress
- the email address- Returns:
- the email address that was updated
-
updateEmailAddress
EmailAddress updateEmailAddress(String externalReferenceCode, long emailAddressId, String address, long listTypeId, boolean primary) throws PortalException - Throws:
PortalException
-
getCTPersistence
- Specified by:
getCTPersistence
in interfaceCTService<EmailAddress>
-
getModelClass
- Specified by:
getModelClass
in interfaceCTService<EmailAddress>
-
updateWithUnsafeFunction
@Transactional(rollbackFor=java.lang.Throwable.class) <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<EmailAddress>, R, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunction
in interfaceCTService<EmailAddress>
- Throws:
E extends Throwable
-