Class ContactLocalServiceImpl

Object
com.liferay.portal.kernel.service.BaseLocalServiceImpl
com.liferay.portal.service.base.ContactLocalServiceBaseImpl
com.liferay.portal.service.impl.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

public class ContactLocalServiceImpl extends ContactLocalServiceBaseImpl
Author:
Brian Wing Shun Chan
  • 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 interface com.liferay.portal.kernel.service.ContactLocalService
      Overrides:
      addContact in class ContactLocalServiceBaseImpl
      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 interface com.liferay.portal.kernel.service.ContactLocalService
      Overrides:
      deleteContact in class ContactLocalServiceBaseImpl
      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 interface com.liferay.portal.kernel.service.ContactLocalService
      Overrides:
      deleteContact in class ContactLocalServiceBaseImpl
      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 interface com.liferay.portal.kernel.service.ContactLocalService
      Overrides:
      updateContact in class ContactLocalServiceBaseImpl
      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