package br.mp.mprj.portal.portlet.gestaomensagens.service.model;

import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.ModelWrapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link EmailDestinatario}.
 * </p>
 *
 * @author Henrique Simoes
 * @see EmailDestinatario
 * @generated
 */
public class EmailDestinatarioWrapper implements EmailDestinatario,
    ModelWrapper<EmailDestinatario> {
    private EmailDestinatario _emailDestinatario;

    public EmailDestinatarioWrapper(EmailDestinatario emailDestinatario) {
        _emailDestinatario = emailDestinatario;
    }

    @Override
    public Class<?> getModelClass() {
        return EmailDestinatario.class;
    }

    @Override
    public String getModelClassName() {
        return EmailDestinatario.class.getName();
    }

    @Override
    public Map<String, Object> getModelAttributes() {
        Map<String, Object> attributes = new HashMap<String, Object>();

        attributes.put("uuid", getUuid());
        attributes.put("emailDestinatarioId", getEmailDestinatarioId());
        attributes.put("email", getEmail());
        attributes.put("grupoDestinatarioId", getGrupoDestinatarioId());

        return attributes;
    }

    @Override
    public void setModelAttributes(Map<String, Object> attributes) {
        String uuid = (String) attributes.get("uuid");

        if (uuid != null) {
            setUuid(uuid);
        }

        Long emailDestinatarioId = (Long) attributes.get("emailDestinatarioId");

        if (emailDestinatarioId != null) {
            setEmailDestinatarioId(emailDestinatarioId);
        }

        String email = (String) attributes.get("email");

        if (email != null) {
            setEmail(email);
        }

        Long grupoDestinatarioId = (Long) attributes.get("grupoDestinatarioId");

        if (grupoDestinatarioId != null) {
            setGrupoDestinatarioId(grupoDestinatarioId);
        }
    }

    /**
    * Returns the primary key of this email destinatario.
    *
    * @return the primary key of this email destinatario
    */
    @Override
    public long getPrimaryKey() {
        return _emailDestinatario.getPrimaryKey();
    }

    /**
    * Sets the primary key of this email destinatario.
    *
    * @param primaryKey the primary key of this email destinatario
    */
    @Override
    public void setPrimaryKey(long primaryKey) {
        _emailDestinatario.setPrimaryKey(primaryKey);
    }

    /**
    * Returns the uuid of this email destinatario.
    *
    * @return the uuid of this email destinatario
    */
    @Override
    public java.lang.String getUuid() {
        return _emailDestinatario.getUuid();
    }

    /**
    * Sets the uuid of this email destinatario.
    *
    * @param uuid the uuid of this email destinatario
    */
    @Override
    public void setUuid(java.lang.String uuid) {
        _emailDestinatario.setUuid(uuid);
    }

    /**
    * Returns the email destinatario ID of this email destinatario.
    *
    * @return the email destinatario ID of this email destinatario
    */
    @Override
    public long getEmailDestinatarioId() {
        return _emailDestinatario.getEmailDestinatarioId();
    }

    /**
    * Sets the email destinatario ID of this email destinatario.
    *
    * @param emailDestinatarioId the email destinatario ID of this email destinatario
    */
    @Override
    public void setEmailDestinatarioId(long emailDestinatarioId) {
        _emailDestinatario.setEmailDestinatarioId(emailDestinatarioId);
    }

    /**
    * Returns the email of this email destinatario.
    *
    * @return the email of this email destinatario
    */
    @Override
    public java.lang.String getEmail() {
        return _emailDestinatario.getEmail();
    }

    /**
    * Sets the email of this email destinatario.
    *
    * @param email the email of this email destinatario
    */
    @Override
    public void setEmail(java.lang.String email) {
        _emailDestinatario.setEmail(email);
    }

    /**
    * Returns the grupo destinatario ID of this email destinatario.
    *
    * @return the grupo destinatario ID of this email destinatario
    */
    @Override
    public long getGrupoDestinatarioId() {
        return _emailDestinatario.getGrupoDestinatarioId();
    }

    /**
    * Sets the grupo destinatario ID of this email destinatario.
    *
    * @param grupoDestinatarioId the grupo destinatario ID of this email destinatario
    */
    @Override
    public void setGrupoDestinatarioId(long grupoDestinatarioId) {
        _emailDestinatario.setGrupoDestinatarioId(grupoDestinatarioId);
    }

    @Override
    public boolean isNew() {
        return _emailDestinatario.isNew();
    }

    @Override
    public void setNew(boolean n) {
        _emailDestinatario.setNew(n);
    }

    @Override
    public boolean isCachedModel() {
        return _emailDestinatario.isCachedModel();
    }

    @Override
    public void setCachedModel(boolean cachedModel) {
        _emailDestinatario.setCachedModel(cachedModel);
    }

    @Override
    public boolean isEscapedModel() {
        return _emailDestinatario.isEscapedModel();
    }

    @Override
    public java.io.Serializable getPrimaryKeyObj() {
        return _emailDestinatario.getPrimaryKeyObj();
    }

    @Override
    public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
        _emailDestinatario.setPrimaryKeyObj(primaryKeyObj);
    }

    @Override
    public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
        return _emailDestinatario.getExpandoBridge();
    }

    @Override
    public void setExpandoBridgeAttributes(
        com.liferay.portal.model.BaseModel<?> baseModel) {
        _emailDestinatario.setExpandoBridgeAttributes(baseModel);
    }

    @Override
    public void setExpandoBridgeAttributes(
        com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
        _emailDestinatario.setExpandoBridgeAttributes(expandoBridge);
    }

    @Override
    public void setExpandoBridgeAttributes(
        com.liferay.portal.service.ServiceContext serviceContext) {
        _emailDestinatario.setExpandoBridgeAttributes(serviceContext);
    }

    @Override
    public java.lang.Object clone() {
        return new EmailDestinatarioWrapper((EmailDestinatario) _emailDestinatario.clone());
    }

    @Override
    public int compareTo(
        br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario emailDestinatario) {
        return _emailDestinatario.compareTo(emailDestinatario);
    }

    @Override
    public int hashCode() {
        return _emailDestinatario.hashCode();
    }

    @Override
    public com.liferay.portal.model.CacheModel<br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario> toCacheModel() {
        return _emailDestinatario.toCacheModel();
    }

    @Override
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario toEscapedModel() {
        return new EmailDestinatarioWrapper(_emailDestinatario.toEscapedModel());
    }

    @Override
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.EmailDestinatario toUnescapedModel() {
        return new EmailDestinatarioWrapper(_emailDestinatario.toUnescapedModel());
    }

    @Override
    public java.lang.String toString() {
        return _emailDestinatario.toString();
    }

    @Override
    public java.lang.String toXmlString() {
        return _emailDestinatario.toXmlString();
    }

    @Override
    public void persist()
        throws com.liferay.portal.kernel.exception.SystemException {
        _emailDestinatario.persist();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }

        if (!(obj instanceof EmailDestinatarioWrapper)) {
            return false;
        }

        EmailDestinatarioWrapper emailDestinatarioWrapper = (EmailDestinatarioWrapper) obj;

        if (Validator.equals(_emailDestinatario,
                    emailDestinatarioWrapper._emailDestinatario)) {
            return true;
        }

        return false;
    }

    /**
     * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
     */
    public EmailDestinatario getWrappedEmailDestinatario() {
        return _emailDestinatario;
    }

    @Override
    public EmailDestinatario getWrappedModel() {
        return _emailDestinatario;
    }

    @Override
    public void resetOriginalValues() {
        _emailDestinatario.resetOriginalValues();
    }
}
