Package com.arcusys.learn.persistence.liferay.model.impl

Source Code of com.arcusys.learn.persistence.liferay.model.impl.LFTincanLrsEndpointModelImpl

package com.arcusys.learn.persistence.liferay.model.impl;

import com.arcusys.learn.persistence.liferay.model.LFTincanLrsEndpoint;
import com.arcusys.learn.persistence.liferay.model.LFTincanLrsEndpointModel;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.CacheModel;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.service.ServiceContext;

import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;

import java.io.Serializable;

import java.sql.Types;

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

/**
* The base model implementation for the LFTincanLrsEndpoint service. Represents a row in the "Learn_LFTincanLrsEndpoint" database table, with each column mapped to a property of this class.
*
* <p>
* This implementation and its corresponding interface {@link com.arcusys.learn.persistence.liferay.model.LFTincanLrsEndpointModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link LFTincanLrsEndpointImpl}.
* </p>
*
* @author Brian Wing Shun Chan
* @see LFTincanLrsEndpointImpl
* @see com.arcusys.learn.persistence.liferay.model.LFTincanLrsEndpoint
* @see com.arcusys.learn.persistence.liferay.model.LFTincanLrsEndpointModel
* @generated
*/
public class LFTincanLrsEndpointModelImpl extends BaseModelImpl<LFTincanLrsEndpoint>
    implements LFTincanLrsEndpointModel {
    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify or reference this class directly. All methods that expect a l f tincan lrs endpoint model instance should use the {@link com.arcusys.learn.persistence.liferay.model.LFTincanLrsEndpoint} interface instead.
     */
    public static final String TABLE_NAME = "Learn_LFTincanLrsEndpoint";
    public static final Object[][] TABLE_COLUMNS = {
            { "id_", Types.BIGINT },
            { "endpoint", Types.VARCHAR },
            { "authType", Types.VARCHAR },
            { "key_", Types.VARCHAR },
            { "secret", Types.VARCHAR }
        };
    public static final String TABLE_SQL_CREATE = "create table Learn_LFTincanLrsEndpoint (id_ LONG not null primary key,endpoint VARCHAR(2000) null,authType VARCHAR(2000) null,key_ VARCHAR(2000) null,secret VARCHAR(2000) null)";
    public static final String TABLE_SQL_DROP = "drop table Learn_LFTincanLrsEndpoint";
    public static final String ORDER_BY_JPQL = " ORDER BY lfTincanLrsEndpoint.id ASC";
    public static final String ORDER_BY_SQL = " ORDER BY Learn_LFTincanLrsEndpoint.id_ ASC";
    public static final String DATA_SOURCE = "liferayDataSource";
    public static final String SESSION_FACTORY = "liferaySessionFactory";
    public static final String TX_MANAGER = "liferayTransactionManager";
    public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.entity.cache.enabled.com.arcusys.learn.persistence.liferay.model.LFTincanLrsEndpoint"),
            false);
    public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.finder.cache.enabled.com.arcusys.learn.persistence.liferay.model.LFTincanLrsEndpoint"),
            false);
    public static final boolean COLUMN_BITMASK_ENABLED = false;
    public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
                "lock.expiration.time.com.arcusys.learn.persistence.liferay.model.LFTincanLrsEndpoint"));
    private static ClassLoader _classLoader = LFTincanLrsEndpoint.class.getClassLoader();
    private static Class<?>[] _escapedModelInterfaces = new Class[] {
            LFTincanLrsEndpoint.class
        };
    private long _id;
    private String _endpoint;
    private String _authType;
    private String _key;
    private String _secret;
    private LFTincanLrsEndpoint _escapedModel;

    public LFTincanLrsEndpointModelImpl() {
    }

    @Override
    public long getPrimaryKey() {
        return _id;
    }

    @Override
    public void setPrimaryKey(long primaryKey) {
        setId(primaryKey);
    }

    @Override
    public Serializable getPrimaryKeyObj() {
        return _id;
    }

    @Override
    public void setPrimaryKeyObj(Serializable primaryKeyObj) {
        setPrimaryKey(((Long) primaryKeyObj).longValue());
    }

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

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

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

        attributes.put("id", getId());
        attributes.put("endpoint", getEndpoint());
        attributes.put("authType", getAuthType());
        attributes.put("key", getKey());
        attributes.put("secret", getSecret());

        return attributes;
    }

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

        if (id != null) {
            setId(id);
        }

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

        if (endpoint != null) {
            setEndpoint(endpoint);
        }

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

        if (authType != null) {
            setAuthType(authType);
        }

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

        if (key != null) {
            setKey(key);
        }

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

        if (secret != null) {
            setSecret(secret);
        }
    }

    @Override
    public long getId() {
        return _id;
    }

    @Override
    public void setId(long id) {
        _id = id;
    }

    @Override
    public String getEndpoint() {
        return _endpoint;
    }

    @Override
    public void setEndpoint(String endpoint) {
        _endpoint = endpoint;
    }

    @Override
    public String getAuthType() {
        return _authType;
    }

    @Override
    public void setAuthType(String authType) {
        _authType = authType;
    }

    @Override
    public String getKey() {
        return _key;
    }

    @Override
    public void setKey(String key) {
        _key = key;
    }

    @Override
    public String getSecret() {
        return _secret;
    }

    @Override
    public void setSecret(String secret) {
        _secret = secret;
    }

    @Override
    public ExpandoBridge getExpandoBridge() {
        return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
            LFTincanLrsEndpoint.class.getName(), getPrimaryKey());
    }

    @Override
    public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
        ExpandoBridge expandoBridge = getExpandoBridge();

        expandoBridge.setAttributes(serviceContext);
    }

    @Override
    public LFTincanLrsEndpoint toEscapedModel() {
        if (_escapedModel == null) {
            _escapedModel = (LFTincanLrsEndpoint) ProxyUtil.newProxyInstance(_classLoader,
                    _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
        }

        return _escapedModel;
    }

    @Override
    public Object clone() {
        LFTincanLrsEndpointImpl lfTincanLrsEndpointImpl = new LFTincanLrsEndpointImpl();

        lfTincanLrsEndpointImpl.setId(getId());
        lfTincanLrsEndpointImpl.setEndpoint(getEndpoint());
        lfTincanLrsEndpointImpl.setAuthType(getAuthType());
        lfTincanLrsEndpointImpl.setKey(getKey());
        lfTincanLrsEndpointImpl.setSecret(getSecret());

        lfTincanLrsEndpointImpl.resetOriginalValues();

        return lfTincanLrsEndpointImpl;
    }

    @Override
    public int compareTo(LFTincanLrsEndpoint lfTincanLrsEndpoint) {
        long primaryKey = lfTincanLrsEndpoint.getPrimaryKey();

        if (getPrimaryKey() < primaryKey) {
            return -1;
        } else if (getPrimaryKey() > primaryKey) {
            return 1;
        } else {
            return 0;
        }
    }

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

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

        LFTincanLrsEndpoint lfTincanLrsEndpoint = (LFTincanLrsEndpoint) obj;

        long primaryKey = lfTincanLrsEndpoint.getPrimaryKey();

        if (getPrimaryKey() == primaryKey) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return (int) getPrimaryKey();
    }

    @Override
    public void resetOriginalValues() {
    }

    @Override
    public CacheModel<LFTincanLrsEndpoint> toCacheModel() {
        LFTincanLrsEndpointCacheModel lfTincanLrsEndpointCacheModel = new LFTincanLrsEndpointCacheModel();

        lfTincanLrsEndpointCacheModel.id = getId();

        lfTincanLrsEndpointCacheModel.endpoint = getEndpoint();

        String endpoint = lfTincanLrsEndpointCacheModel.endpoint;

        if ((endpoint != null) && (endpoint.length() == 0)) {
            lfTincanLrsEndpointCacheModel.endpoint = null;
        }

        lfTincanLrsEndpointCacheModel.authType = getAuthType();

        String authType = lfTincanLrsEndpointCacheModel.authType;

        if ((authType != null) && (authType.length() == 0)) {
            lfTincanLrsEndpointCacheModel.authType = null;
        }

        lfTincanLrsEndpointCacheModel.key = getKey();

        String key = lfTincanLrsEndpointCacheModel.key;

        if ((key != null) && (key.length() == 0)) {
            lfTincanLrsEndpointCacheModel.key = null;
        }

        lfTincanLrsEndpointCacheModel.secret = getSecret();

        String secret = lfTincanLrsEndpointCacheModel.secret;

        if ((secret != null) && (secret.length() == 0)) {
            lfTincanLrsEndpointCacheModel.secret = null;
        }

        return lfTincanLrsEndpointCacheModel;
    }

    @Override
    public String toString() {
        StringBundler sb = new StringBundler(11);

        sb.append("{id=");
        sb.append(getId());
        sb.append(", endpoint=");
        sb.append(getEndpoint());
        sb.append(", authType=");
        sb.append(getAuthType());
        sb.append(", key=");
        sb.append(getKey());
        sb.append(", secret=");
        sb.append(getSecret());
        sb.append("}");

        return sb.toString();
    }

    @Override
    public String toXmlString() {
        StringBundler sb = new StringBundler(19);

        sb.append("<model><model-name>");
        sb.append(
            "com.arcusys.learn.persistence.liferay.model.LFTincanLrsEndpoint");
        sb.append("</model-name>");

        sb.append(
            "<column><column-name>id</column-name><column-value><![CDATA[");
        sb.append(getId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>endpoint</column-name><column-value><![CDATA[");
        sb.append(getEndpoint());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>authType</column-name><column-value><![CDATA[");
        sb.append(getAuthType());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>key</column-name><column-value><![CDATA[");
        sb.append(getKey());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>secret</column-name><column-value><![CDATA[");
        sb.append(getSecret());
        sb.append("]]></column-value></column>");

        sb.append("</model>");

        return sb.toString();
    }
}
TOP

Related Classes of com.arcusys.learn.persistence.liferay.model.impl.LFTincanLrsEndpointModelImpl

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.