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

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

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

import com.arcusys.learn.persistence.liferay.model.LFRollupContribution;
import com.arcusys.learn.persistence.liferay.model.LFRollupContributionModel;

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.math.BigDecimal;

import java.sql.Types;

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

/**
* The base model implementation for the LFRollupContribution service. Represents a row in the "Learn_LFRollupContribution" 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.LFRollupContributionModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link LFRollupContributionImpl}.
* </p>
*
* @author Brian Wing Shun Chan
* @see LFRollupContributionImpl
* @see com.arcusys.learn.persistence.liferay.model.LFRollupContribution
* @see com.arcusys.learn.persistence.liferay.model.LFRollupContributionModel
* @generated
*/
public class LFRollupContributionModelImpl extends BaseModelImpl<LFRollupContribution>
    implements LFRollupContributionModel {
    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify or reference this class directly. All methods that expect a l f rollup contribution model instance should use the {@link com.arcusys.learn.persistence.liferay.model.LFRollupContribution} interface instead.
     */
    public static final String TABLE_NAME = "Learn_LFRollupContribution";
    public static final Object[][] TABLE_COLUMNS = {
            { "id_", Types.BIGINT },
            { "sequencingID", Types.INTEGER },
            { "contributeToSatisfied", Types.CLOB },
            { "contributeToNotSatisfied", Types.CLOB },
            { "contributeToCompleted", Types.CLOB },
            { "contributeToIncomplete", Types.CLOB },
            { "objectiveMeasureWeight", Types.NUMERIC },
            { "measureSatisfactionIfActive", Types.BOOLEAN }
        };
    public static final String TABLE_SQL_CREATE = "create table Learn_LFRollupContribution (id_ LONG not null primary key,sequencingID INTEGER null,contributeToSatisfied TEXT null,contributeToNotSatisfied TEXT null,contributeToCompleted TEXT null,contributeToIncomplete TEXT null,objectiveMeasureWeight NUMERIC(20,2),measureSatisfactionIfActive BOOLEAN null)";
    public static final String TABLE_SQL_DROP = "drop table Learn_LFRollupContribution";
    public static final String ORDER_BY_JPQL = " ORDER BY lfRollupContribution.id ASC";
    public static final String ORDER_BY_SQL = " ORDER BY Learn_LFRollupContribution.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.LFRollupContribution"),
            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.LFRollupContribution"),
            false);
    public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.column.bitmask.enabled.com.arcusys.learn.persistence.liferay.model.LFRollupContribution"),
            true);
    public static long SEQUENCINGID_COLUMN_BITMASK = 1L;
    public static long ID_COLUMN_BITMASK = 2L;
    public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
                "lock.expiration.time.com.arcusys.learn.persistence.liferay.model.LFRollupContribution"));
    private static ClassLoader _classLoader = LFRollupContribution.class.getClassLoader();
    private static Class<?>[] _escapedModelInterfaces = new Class[] {
            LFRollupContribution.class
        };
    private long _id;
    private Integer _sequencingID;
    private Integer _originalSequencingID;
    private boolean _setOriginalSequencingID;
    private String _contributeToSatisfied;
    private String _contributeToNotSatisfied;
    private String _contributeToCompleted;
    private String _contributeToIncomplete;
    private BigDecimal _objectiveMeasureWeight;
    private boolean _measureSatisfactionIfActive;
    private long _columnBitmask;
    private LFRollupContribution _escapedModel;

    public LFRollupContributionModelImpl() {
    }

    @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 LFRollupContribution.class;
    }

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

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

        attributes.put("id", getId());
        attributes.put("sequencingID", getSequencingID());
        attributes.put("contributeToSatisfied", getContributeToSatisfied());
        attributes.put("contributeToNotSatisfied", getContributeToNotSatisfied());
        attributes.put("contributeToCompleted", getContributeToCompleted());
        attributes.put("contributeToIncomplete", getContributeToIncomplete());
        attributes.put("objectiveMeasureWeight", getObjectiveMeasureWeight());
        attributes.put("measureSatisfactionIfActive",
            getMeasureSatisfactionIfActive());

        return attributes;
    }

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

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

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

        if (sequencingID != null) {
            setSequencingID(sequencingID);
        }

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

        if (contributeToSatisfied != null) {
            setContributeToSatisfied(contributeToSatisfied);
        }

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

        if (contributeToNotSatisfied != null) {
            setContributeToNotSatisfied(contributeToNotSatisfied);
        }

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

        if (contributeToCompleted != null) {
            setContributeToCompleted(contributeToCompleted);
        }

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

        if (contributeToIncomplete != null) {
            setContributeToIncomplete(contributeToIncomplete);
        }

        BigDecimal objectiveMeasureWeight = (BigDecimal) attributes.get(
                "objectiveMeasureWeight");

        if (objectiveMeasureWeight != null) {
            setObjectiveMeasureWeight(objectiveMeasureWeight);
        }

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

        if (measureSatisfactionIfActive != null) {
            setMeasureSatisfactionIfActive(measureSatisfactionIfActive);
        }
    }

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

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

    @Override
    public Integer getSequencingID() {
        return _sequencingID;
    }

    @Override
    public void setSequencingID(Integer sequencingID) {
        _columnBitmask |= SEQUENCINGID_COLUMN_BITMASK;

        if (!_setOriginalSequencingID) {
            _setOriginalSequencingID = true;

            _originalSequencingID = _sequencingID;
        }

        _sequencingID = sequencingID;
    }

    public Integer getOriginalSequencingID() {
        return _originalSequencingID;
    }

    @Override
    public String getContributeToSatisfied() {
        return _contributeToSatisfied;
    }

    @Override
    public void setContributeToSatisfied(String contributeToSatisfied) {
        _contributeToSatisfied = contributeToSatisfied;
    }

    @Override
    public String getContributeToNotSatisfied() {
        return _contributeToNotSatisfied;
    }

    @Override
    public void setContributeToNotSatisfied(String contributeToNotSatisfied) {
        _contributeToNotSatisfied = contributeToNotSatisfied;
    }

    @Override
    public String getContributeToCompleted() {
        return _contributeToCompleted;
    }

    @Override
    public void setContributeToCompleted(String contributeToCompleted) {
        _contributeToCompleted = contributeToCompleted;
    }

    @Override
    public String getContributeToIncomplete() {
        return _contributeToIncomplete;
    }

    @Override
    public void setContributeToIncomplete(String contributeToIncomplete) {
        _contributeToIncomplete = contributeToIncomplete;
    }

    @Override
    public BigDecimal getObjectiveMeasureWeight() {
        return _objectiveMeasureWeight;
    }

    @Override
    public void setObjectiveMeasureWeight(BigDecimal objectiveMeasureWeight) {
        _objectiveMeasureWeight = objectiveMeasureWeight;
    }

    @Override
    public boolean getMeasureSatisfactionIfActive() {
        return _measureSatisfactionIfActive;
    }

    @Override
    public boolean isMeasureSatisfactionIfActive() {
        return _measureSatisfactionIfActive;
    }

    @Override
    public void setMeasureSatisfactionIfActive(
        boolean measureSatisfactionIfActive) {
        _measureSatisfactionIfActive = measureSatisfactionIfActive;
    }

    public long getColumnBitmask() {
        return _columnBitmask;
    }

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

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

        expandoBridge.setAttributes(serviceContext);
    }

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

        return _escapedModel;
    }

    @Override
    public Object clone() {
        LFRollupContributionImpl lfRollupContributionImpl = new LFRollupContributionImpl();

        lfRollupContributionImpl.setId(getId());
        lfRollupContributionImpl.setSequencingID(getSequencingID());
        lfRollupContributionImpl.setContributeToSatisfied(getContributeToSatisfied());
        lfRollupContributionImpl.setContributeToNotSatisfied(getContributeToNotSatisfied());
        lfRollupContributionImpl.setContributeToCompleted(getContributeToCompleted());
        lfRollupContributionImpl.setContributeToIncomplete(getContributeToIncomplete());
        lfRollupContributionImpl.setObjectiveMeasureWeight(getObjectiveMeasureWeight());
        lfRollupContributionImpl.setMeasureSatisfactionIfActive(getMeasureSatisfactionIfActive());

        lfRollupContributionImpl.resetOriginalValues();

        return lfRollupContributionImpl;
    }

    @Override
    public int compareTo(LFRollupContribution lfRollupContribution) {
        long primaryKey = lfRollupContribution.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 LFRollupContribution)) {
            return false;
        }

        LFRollupContribution lfRollupContribution = (LFRollupContribution) obj;

        long primaryKey = lfRollupContribution.getPrimaryKey();

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

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

    @Override
    public void resetOriginalValues() {
        LFRollupContributionModelImpl lfRollupContributionModelImpl = this;

        lfRollupContributionModelImpl._originalSequencingID = lfRollupContributionModelImpl._sequencingID;

        lfRollupContributionModelImpl._setOriginalSequencingID = false;

        lfRollupContributionModelImpl._columnBitmask = 0;
    }

    @Override
    public CacheModel<LFRollupContribution> toCacheModel() {
        LFRollupContributionCacheModel lfRollupContributionCacheModel = new LFRollupContributionCacheModel();

        lfRollupContributionCacheModel.id = getId();

        lfRollupContributionCacheModel.sequencingID = getSequencingID();

        lfRollupContributionCacheModel.contributeToSatisfied = getContributeToSatisfied();

        String contributeToSatisfied = lfRollupContributionCacheModel.contributeToSatisfied;

        if ((contributeToSatisfied != null) &&
                (contributeToSatisfied.length() == 0)) {
            lfRollupContributionCacheModel.contributeToSatisfied = null;
        }

        lfRollupContributionCacheModel.contributeToNotSatisfied = getContributeToNotSatisfied();

        String contributeToNotSatisfied = lfRollupContributionCacheModel.contributeToNotSatisfied;

        if ((contributeToNotSatisfied != null) &&
                (contributeToNotSatisfied.length() == 0)) {
            lfRollupContributionCacheModel.contributeToNotSatisfied = null;
        }

        lfRollupContributionCacheModel.contributeToCompleted = getContributeToCompleted();

        String contributeToCompleted = lfRollupContributionCacheModel.contributeToCompleted;

        if ((contributeToCompleted != null) &&
                (contributeToCompleted.length() == 0)) {
            lfRollupContributionCacheModel.contributeToCompleted = null;
        }

        lfRollupContributionCacheModel.contributeToIncomplete = getContributeToIncomplete();

        String contributeToIncomplete = lfRollupContributionCacheModel.contributeToIncomplete;

        if ((contributeToIncomplete != null) &&
                (contributeToIncomplete.length() == 0)) {
            lfRollupContributionCacheModel.contributeToIncomplete = null;
        }

        lfRollupContributionCacheModel.objectiveMeasureWeight = getObjectiveMeasureWeight();

        lfRollupContributionCacheModel.measureSatisfactionIfActive = getMeasureSatisfactionIfActive();

        return lfRollupContributionCacheModel;
    }

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

        sb.append("{id=");
        sb.append(getId());
        sb.append(", sequencingID=");
        sb.append(getSequencingID());
        sb.append(", contributeToSatisfied=");
        sb.append(getContributeToSatisfied());
        sb.append(", contributeToNotSatisfied=");
        sb.append(getContributeToNotSatisfied());
        sb.append(", contributeToCompleted=");
        sb.append(getContributeToCompleted());
        sb.append(", contributeToIncomplete=");
        sb.append(getContributeToIncomplete());
        sb.append(", objectiveMeasureWeight=");
        sb.append(getObjectiveMeasureWeight());
        sb.append(", measureSatisfactionIfActive=");
        sb.append(getMeasureSatisfactionIfActive());
        sb.append("}");

        return sb.toString();
    }

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

        sb.append("<model><model-name>");
        sb.append(
            "com.arcusys.learn.persistence.liferay.model.LFRollupContribution");
        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>sequencingID</column-name><column-value><![CDATA[");
        sb.append(getSequencingID());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>contributeToSatisfied</column-name><column-value><![CDATA[");
        sb.append(getContributeToSatisfied());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>contributeToNotSatisfied</column-name><column-value><![CDATA[");
        sb.append(getContributeToNotSatisfied());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>contributeToCompleted</column-name><column-value><![CDATA[");
        sb.append(getContributeToCompleted());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>contributeToIncomplete</column-name><column-value><![CDATA[");
        sb.append(getContributeToIncomplete());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>objectiveMeasureWeight</column-name><column-value><![CDATA[");
        sb.append(getObjectiveMeasureWeight());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>measureSatisfactionIfActive</column-name><column-value><![CDATA[");
        sb.append(getMeasureSatisfactionIfActive());
        sb.append("]]></column-value></column>");

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

        return sb.toString();
    }
}
TOP

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

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.