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.Date;
import java.util.HashMap;
import java.util.Map;

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

    public TemplateWrapper(Template template) {
        _template = template;
    }

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

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

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

        attributes.put("uuid", getUuid());
        attributes.put("templateId", getTemplateId());
        attributes.put("companyId", getCompanyId());
        attributes.put("groupId", getGroupId());
        attributes.put("userId", getUserId());
        attributes.put("nome", getNome());
        attributes.put("estilo", getEstilo());
        attributes.put("ativo", getAtivo());
        attributes.put("cabecalho", getCabecalho());
        attributes.put("rodape", getRodape());
        attributes.put("corpo", getCorpo());
        attributes.put("dataCriacao", getDataCriacao());
        attributes.put("dataAtualizacao", getDataAtualizacao());
        attributes.put("thumbnailFileEntryId", getThumbnailFileEntryId());
        attributes.put("thumbnailURL", getThumbnailURL());

        return attributes;
    }

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

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

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

        if (templateId != null) {
            setTemplateId(templateId);
        }

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

        if (companyId != null) {
            setCompanyId(companyId);
        }

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

        if (groupId != null) {
            setGroupId(groupId);
        }

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

        if (userId != null) {
            setUserId(userId);
        }

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

        if (nome != null) {
            setNome(nome);
        }

        Integer estilo = (Integer) attributes.get("estilo");

        if (estilo != null) {
            setEstilo(estilo);
        }

        Boolean ativo = (Boolean) attributes.get("ativo");

        if (ativo != null) {
            setAtivo(ativo);
        }

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

        if (cabecalho != null) {
            setCabecalho(cabecalho);
        }

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

        if (rodape != null) {
            setRodape(rodape);
        }

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

        if (corpo != null) {
            setCorpo(corpo);
        }

        Date dataCriacao = (Date) attributes.get("dataCriacao");

        if (dataCriacao != null) {
            setDataCriacao(dataCriacao);
        }

        Date dataAtualizacao = (Date) attributes.get("dataAtualizacao");

        if (dataAtualizacao != null) {
            setDataAtualizacao(dataAtualizacao);
        }

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

        if (thumbnailFileEntryId != null) {
            setThumbnailFileEntryId(thumbnailFileEntryId);
        }

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

        if (thumbnailURL != null) {
            setThumbnailURL(thumbnailURL);
        }
    }

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

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

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

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

    /**
    * Returns the template ID of this template.
    *
    * @return the template ID of this template
    */
    @Override
    public long getTemplateId() {
        return _template.getTemplateId();
    }

    /**
    * Sets the template ID of this template.
    *
    * @param templateId the template ID of this template
    */
    @Override
    public void setTemplateId(long templateId) {
        _template.setTemplateId(templateId);
    }

    /**
    * Returns the company ID of this template.
    *
    * @return the company ID of this template
    */
    @Override
    public long getCompanyId() {
        return _template.getCompanyId();
    }

    /**
    * Sets the company ID of this template.
    *
    * @param companyId the company ID of this template
    */
    @Override
    public void setCompanyId(long companyId) {
        _template.setCompanyId(companyId);
    }

    /**
    * Returns the group ID of this template.
    *
    * @return the group ID of this template
    */
    @Override
    public long getGroupId() {
        return _template.getGroupId();
    }

    /**
    * Sets the group ID of this template.
    *
    * @param groupId the group ID of this template
    */
    @Override
    public void setGroupId(long groupId) {
        _template.setGroupId(groupId);
    }

    /**
    * Returns the user ID of this template.
    *
    * @return the user ID of this template
    */
    @Override
    public long getUserId() {
        return _template.getUserId();
    }

    /**
    * Sets the user ID of this template.
    *
    * @param userId the user ID of this template
    */
    @Override
    public void setUserId(long userId) {
        _template.setUserId(userId);
    }

    /**
    * Returns the user uuid of this template.
    *
    * @return the user uuid of this template
    * @throws SystemException if a system exception occurred
    */
    @Override
    public java.lang.String getUserUuid()
        throws com.liferay.portal.kernel.exception.SystemException {
        return _template.getUserUuid();
    }

    /**
    * Sets the user uuid of this template.
    *
    * @param userUuid the user uuid of this template
    */
    @Override
    public void setUserUuid(java.lang.String userUuid) {
        _template.setUserUuid(userUuid);
    }

    /**
    * Returns the nome of this template.
    *
    * @return the nome of this template
    */
    @Override
    public java.lang.String getNome() {
        return _template.getNome();
    }

    /**
    * Sets the nome of this template.
    *
    * @param nome the nome of this template
    */
    @Override
    public void setNome(java.lang.String nome) {
        _template.setNome(nome);
    }

    /**
    * Returns the estilo of this template.
    *
    * @return the estilo of this template
    */
    @Override
    public int getEstilo() {
        return _template.getEstilo();
    }

    /**
    * Sets the estilo of this template.
    *
    * @param estilo the estilo of this template
    */
    @Override
    public void setEstilo(int estilo) {
        _template.setEstilo(estilo);
    }

    /**
    * Returns the ativo of this template.
    *
    * @return the ativo of this template
    */
    @Override
    public boolean getAtivo() {
        return _template.getAtivo();
    }

    /**
    * Returns <code>true</code> if this template is ativo.
    *
    * @return <code>true</code> if this template is ativo; <code>false</code> otherwise
    */
    @Override
    public boolean isAtivo() {
        return _template.isAtivo();
    }

    /**
    * Sets whether this template is ativo.
    *
    * @param ativo the ativo of this template
    */
    @Override
    public void setAtivo(boolean ativo) {
        _template.setAtivo(ativo);
    }

    /**
    * Returns the cabecalho of this template.
    *
    * @return the cabecalho of this template
    */
    @Override
    public java.lang.String getCabecalho() {
        return _template.getCabecalho();
    }

    /**
    * Sets the cabecalho of this template.
    *
    * @param cabecalho the cabecalho of this template
    */
    @Override
    public void setCabecalho(java.lang.String cabecalho) {
        _template.setCabecalho(cabecalho);
    }

    /**
    * Returns the rodape of this template.
    *
    * @return the rodape of this template
    */
    @Override
    public java.lang.String getRodape() {
        return _template.getRodape();
    }

    /**
    * Sets the rodape of this template.
    *
    * @param rodape the rodape of this template
    */
    @Override
    public void setRodape(java.lang.String rodape) {
        _template.setRodape(rodape);
    }

    /**
    * Returns the corpo of this template.
    *
    * @return the corpo of this template
    */
    @Override
    public java.lang.String getCorpo() {
        return _template.getCorpo();
    }

    /**
    * Sets the corpo of this template.
    *
    * @param corpo the corpo of this template
    */
    @Override
    public void setCorpo(java.lang.String corpo) {
        _template.setCorpo(corpo);
    }

    /**
    * Returns the data criacao of this template.
    *
    * @return the data criacao of this template
    */
    @Override
    public java.util.Date getDataCriacao() {
        return _template.getDataCriacao();
    }

    /**
    * Sets the data criacao of this template.
    *
    * @param dataCriacao the data criacao of this template
    */
    @Override
    public void setDataCriacao(java.util.Date dataCriacao) {
        _template.setDataCriacao(dataCriacao);
    }

    /**
    * Returns the data atualizacao of this template.
    *
    * @return the data atualizacao of this template
    */
    @Override
    public java.util.Date getDataAtualizacao() {
        return _template.getDataAtualizacao();
    }

    /**
    * Sets the data atualizacao of this template.
    *
    * @param dataAtualizacao the data atualizacao of this template
    */
    @Override
    public void setDataAtualizacao(java.util.Date dataAtualizacao) {
        _template.setDataAtualizacao(dataAtualizacao);
    }

    /**
    * Returns the thumbnail file entry ID of this template.
    *
    * @return the thumbnail file entry ID of this template
    */
    @Override
    public long getThumbnailFileEntryId() {
        return _template.getThumbnailFileEntryId();
    }

    /**
    * Sets the thumbnail file entry ID of this template.
    *
    * @param thumbnailFileEntryId the thumbnail file entry ID of this template
    */
    @Override
    public void setThumbnailFileEntryId(long thumbnailFileEntryId) {
        _template.setThumbnailFileEntryId(thumbnailFileEntryId);
    }

    /**
    * Returns the thumbnail u r l of this template.
    *
    * @return the thumbnail u r l of this template
    */
    @Override
    public java.lang.String getThumbnailURL() {
        return _template.getThumbnailURL();
    }

    /**
    * Sets the thumbnail u r l of this template.
    *
    * @param thumbnailURL the thumbnail u r l of this template
    */
    @Override
    public void setThumbnailURL(java.lang.String thumbnailURL) {
        _template.setThumbnailURL(thumbnailURL);
    }

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

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

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

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

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

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

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

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

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

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

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

    @Override
    public java.lang.Object clone() {
        return new TemplateWrapper((Template) _template.clone());
    }

    @Override
    public int compareTo(
        br.mp.mprj.portal.portlet.gestaomensagens.service.model.Template template) {
        return _template.compareTo(template);
    }

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

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

    @Override
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.Template toEscapedModel() {
        return new TemplateWrapper(_template.toEscapedModel());
    }

    @Override
    public br.mp.mprj.portal.portlet.gestaomensagens.service.model.Template toUnescapedModel() {
        return new TemplateWrapper(_template.toUnescapedModel());
    }

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

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

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

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

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

        TemplateWrapper templateWrapper = (TemplateWrapper) obj;

        if (Validator.equals(_template, templateWrapper._template)) {
            return true;
        }

        return false;
    }

    /**
     * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
     */
    public Template getWrappedTemplate() {
        return _template;
    }

    @Override
    public Template getWrappedModel() {
        return _template;
    }

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