protected void initActionableDynamicQuery(ActionableDynamicQuery actionableDynamicQuery) {
    actionableDynamicQuery.setBaseLocalService(
        com.liferay.portal.service.EmailAddressLocalServiceUtil.getService());
    actionableDynamicQuery.setClassLoader(getClassLoader());
    actionableDynamicQuery.setModelClass(EmailAddress.class);

    actionableDynamicQuery.setPrimaryKeyPropertyName("emailAddressId");
  }
  public static EmailAddress addEmailAddress(Organization organization) throws Exception {

    return EmailAddressLocalServiceUtil.addEmailAddress(
        organization.getUserId(),
        organization.getModelClassName(),
        organization.getOrganizationId(),
        "*****@*****.**",
        _getListTypeId(ListTypeConstants.ORGANIZATION_EMAIL_ADDRESS),
        false,
        new ServiceContext());
  }
  @Override
  public ActionableDynamicQuery getActionableDynamicQuery() {
    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();

    actionableDynamicQuery.setBaseLocalService(
        com.liferay.portal.service.EmailAddressLocalServiceUtil.getService());
    actionableDynamicQuery.setClassLoader(getClassLoader());
    actionableDynamicQuery.setModelClass(EmailAddress.class);

    actionableDynamicQuery.setPrimaryKeyPropertyName("emailAddressId");

    return actionableDynamicQuery;
  }
Ejemplo n.º 4
0
 public List<EmailAddress> getEmailAddresses() throws SystemException {
   return EmailAddressLocalServiceUtil.getEmailAddresses(
       getCompanyId(), Contact.class.getName(), getContactId());
 }