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.ContactaddContact(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.ContactaddContact(com.liferay.portal.kernel.model.Contact contact) Adds the contact to the database.com.liferay.portal.kernel.model.ContactdeleteContact(long contactId) Deletes the contact with the primary key from the database.com.liferay.portal.kernel.model.ContactdeleteContact(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) intgetCompanyContactsCount(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) intgetContactsCount(long classNameId, long classPK) com.liferay.portal.kernel.model.ContactupdateContact(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.ContactupdateContact(com.liferay.portal.kernel.model.Contact contact) Updates the contact in the database or adds it if it does not yet exist.protected voidprotected voidvalidateBirthday(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, setCounterLocalServiceMethods inherited from class com.liferay.portal.kernel.service.BaseLocalServiceImpl
getClassLoader, getLocalizationMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ContactLocalServiceBaseImplAdds 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:
addContactin interfacecom.liferay.portal.kernel.service.ContactLocalService- Overrides:
addContactin 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:ContactLocalServiceBaseImplDeletes 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:
deleteContactin interfacecom.liferay.portal.kernel.service.ContactLocalService- Overrides:
deleteContactin 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:ContactLocalServiceBaseImplDeletes 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:
deleteContactin interfacecom.liferay.portal.kernel.service.ContactLocalService- Overrides:
deleteContactin 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:ContactLocalServiceBaseImplUpdates 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:
updateContactin interfacecom.liferay.portal.kernel.service.ContactLocalService- Overrides:
updateContactin 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
-