/* * NOTE FOR DEVELOPERS: * * Never modify or reference this class directly. All methods that expect a password policy rel model instance should use the {@link PasswordPolicyRel} interface instead. */ @Override public void persist() throws SystemException { if (this.isNew()) { PasswordPolicyRelLocalServiceUtil.addPasswordPolicyRel(this); } else { PasswordPolicyRelLocalServiceUtil.updatePasswordPolicyRel(this); } }
public static PasswordPolicy addPasswordPolicyRel( Organization organization, ServiceContext serviceContext) throws Exception { PasswordPolicy passwordPolicy = PasswordPolicyTestUtil.addPasswordPolicy(serviceContext); PasswordPolicyRelLocalServiceUtil.addPasswordPolicyRel( passwordPolicy.getPasswordPolicyId(), organization.getModelClassName(), organization.getOrganizationId()); return passwordPolicy; }