Class ContactLocalServiceImpl
- All Implemented Interfaces:
com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService
,com.liferay.portal.kernel.service.BaseLocalService
,com.liferay.portal.kernel.service.ContactLocalService
,com.liferay.portal.kernel.service.PersistedModelLocalService
- Author:
- Brian Wing Shun Chan
-
Field Summary
Fields inherited from class com.liferay.portal.service.base.ContactLocalServiceBaseImpl
contactLocalService, contactPersistence, counterLocalService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.liferay.portal.kernel.model.Contact
addContact
(long userId, String className, long classPK, String emailAddress, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle) com.liferay.portal.kernel.model.Contact
addContact
(com.liferay.portal.kernel.model.Contact contact) Adds the contact to the database.com.liferay.portal.kernel.model.Contact
deleteContact
(long contactId) Deletes the contact with the primary key from the database.com.liferay.portal.kernel.model.Contact
deleteContact
(com.liferay.portal.kernel.model.Contact contact) Deletes the contact from the database.Map<Serializable,
com.liferay.portal.kernel.model.Contact> fetchContacts
(Set<Serializable> primaryKeys) List<com.liferay.portal.kernel.model.Contact>
getCompanyContacts
(long companyId, int start, int end) int
getCompanyContactsCount
(long companyId) List<com.liferay.portal.kernel.model.Contact>
getContacts
(long classNameId, long classPK, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Contact> orderByComparator) int
getContactsCount
(long classNameId, long classPK) com.liferay.portal.kernel.model.Contact
updateContact
(long contactId, String emailAddress, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle) com.liferay.portal.kernel.model.Contact
updateContact
(com.liferay.portal.kernel.model.Contact contact) Updates the contact in the database or adds it if it does not yet exist.protected void
protected void
validateBirthday
(Date birthday) Methods inherited from class com.liferay.portal.service.base.ContactLocalServiceBaseImpl
afterPropertiesSet, createContact, createPersistedModel, deletePersistedModel, destroy, dslQuery, dslQueryCount, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, dynamicQueryCount, fetchContact, getActionableDynamicQuery, getBasePersistence, getContact, getContactLocalService, getContactPersistence, getContacts, getContactsCount, getCounterLocalService, getIndexableActionableDynamicQuery, getModelClass, getModelClassName, getOSGiServiceIdentifier, getPersistedModel, initActionableDynamicQuery, runSQL, setContactLocalService, setContactPersistence, setCounterLocalService
Methods inherited from class com.liferay.portal.kernel.service.BaseLocalServiceImpl
getClassLoader, getLocalizationMap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel
-
Constructor Details
-
ContactLocalServiceImpl
public ContactLocalServiceImpl()
-
-
Method Details
-
addContact
@Indexable(type=REINDEX) public com.liferay.portal.kernel.model.Contact addContact(com.liferay.portal.kernel.model.Contact contact) Description copied from class:ContactLocalServiceBaseImpl
Adds the contact to the database. Also notifies the appropriate model listeners.Important: Inspect ContactLocalServiceImpl 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.
- Specified by:
addContact
in interfacecom.liferay.portal.kernel.service.ContactLocalService
- Overrides:
addContact
in classContactLocalServiceBaseImpl
- Parameters:
contact
- the contact- Returns:
- the contact that was added
-
addContact
@Indexable(type=REINDEX) public com.liferay.portal.kernel.model.Contact addContact(long userId, String className, long classPK, String emailAddress, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteContact
@Indexable(type=DELETE) @SystemEvent(type=1) public com.liferay.portal.kernel.model.Contact deleteContact(com.liferay.portal.kernel.model.Contact contact) Description copied from class:ContactLocalServiceBaseImpl
Deletes the contact from the database. Also notifies the appropriate model listeners.Important: Inspect ContactLocalServiceImpl 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.
- Specified by:
deleteContact
in interfacecom.liferay.portal.kernel.service.ContactLocalService
- Overrides:
deleteContact
in classContactLocalServiceBaseImpl
- Parameters:
contact
- the contact- Returns:
- the contact that was removed
-
deleteContact
@Indexable(type=DELETE) public com.liferay.portal.kernel.model.Contact deleteContact(long contactId) Description copied from class:ContactLocalServiceBaseImpl
Deletes the contact with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect ContactLocalServiceImpl 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.
- Specified by:
deleteContact
in interfacecom.liferay.portal.kernel.service.ContactLocalService
- Overrides:
deleteContact
in classContactLocalServiceBaseImpl
- Parameters:
contactId
- the primary key of the contact- Returns:
- the contact that was removed
-
fetchContacts
public Map<Serializable,com.liferay.portal.kernel.model.Contact> fetchContacts(Set<Serializable> primaryKeys) -
getCompanyContacts
public List<com.liferay.portal.kernel.model.Contact> getCompanyContacts(long companyId, int start, int end) -
getCompanyContactsCount
public int getCompanyContactsCount(long companyId) -
getContacts
public List<com.liferay.portal.kernel.model.Contact> getContacts(long classNameId, long classPK, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Contact> orderByComparator) -
getContactsCount
public int getContactsCount(long classNameId, long classPK) -
updateContact
@Indexable(type=REINDEX) public com.liferay.portal.kernel.model.Contact updateContact(com.liferay.portal.kernel.model.Contact contact) Description copied from class:ContactLocalServiceBaseImpl
Updates the contact in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect ContactLocalServiceImpl 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.
- Specified by:
updateContact
in interfacecom.liferay.portal.kernel.service.ContactLocalService
- Overrides:
updateContact
in classContactLocalServiceBaseImpl
- Parameters:
contact
- the contact- Returns:
- the contact that was updated
-
updateContact
@Indexable(type=REINDEX) public com.liferay.portal.kernel.model.Contact updateContact(long contactId, String emailAddress, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validate
protected void validate(String className, long classPK) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validateBirthday
protected void validateBirthday(Date birthday) throws com.liferay.portal.kernel.exception.ContactBirthdayException - Throws:
com.liferay.portal.kernel.exception.ContactBirthdayException
-