com.liferay.gs.hack.model.impl.TimesheetTaskDurationModelImpl.java Source code

Java tutorial

Introduction

Here is the source code for com.liferay.gs.hack.model.impl.TimesheetTaskDurationModelImpl.java

Source

/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.liferay.gs.hack.model.impl;

import aQute.bnd.annotation.ProviderType;

import com.liferay.exportimport.kernel.lar.StagedModelType;

import com.liferay.gs.hack.model.TimesheetTaskDuration;
import com.liferay.gs.hack.model.TimesheetTaskDurationModel;
import com.liferay.gs.hack.model.TimesheetTaskDurationSoap;
import com.liferay.gs.hack.service.persistence.TimesheetTaskDurationPK;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.json.JSON;
import com.liferay.portal.kernel.model.CacheModel;
import com.liferay.portal.kernel.model.User;
import com.liferay.portal.kernel.model.impl.BaseModelImpl;
import com.liferay.portal.kernel.service.UserLocalServiceUtil;
import com.liferay.portal.kernel.util.DateUtil;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.PortalUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;

import java.io.Serializable;

import java.sql.Types;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * The base model implementation for the TimesheetTaskDuration service. Represents a row in the "gw_TimesheetTaskDuration" database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link TimesheetTaskDurationModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link TimesheetTaskDurationImpl}.
 * </p>
 *
 * @author Brian Wing Shun Chan
 * @see TimesheetTaskDurationImpl
 * @see TimesheetTaskDuration
 * @see TimesheetTaskDurationModel
 * @generated
 */
@JSON(strict = true)
@ProviderType
public class TimesheetTaskDurationModelImpl extends BaseModelImpl<TimesheetTaskDuration>
        implements TimesheetTaskDurationModel {
    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify or reference this class directly. All methods that expect a timesheet task duration model instance should use the {@link TimesheetTaskDuration} interface instead.
     */
    public static final String TABLE_NAME = "gw_TimesheetTaskDuration";
    public static final Object[][] TABLE_COLUMNS = { { "uuid_", Types.VARCHAR },
            { "timesheetTaskDurationId", Types.BIGINT }, { "groupId", Types.BIGINT },
            { "timesheetId", Types.BIGINT }, { "timesheetTaskId", Types.BIGINT }, { "companyId", Types.BIGINT },
            { "userId", Types.BIGINT }, { "userName", Types.VARCHAR }, { "createDate", Types.TIMESTAMP },
            { "modifiedDate", Types.TIMESTAMP }, { "duration", Types.DOUBLE }, { "comment_", Types.VARCHAR },
            { "taskDate", Types.TIMESTAMP } };
    public static final Map<String, Integer> TABLE_COLUMNS_MAP = new HashMap<String, Integer>();

    static {
        TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR);
        TABLE_COLUMNS_MAP.put("timesheetTaskDurationId", Types.BIGINT);
        TABLE_COLUMNS_MAP.put("groupId", Types.BIGINT);
        TABLE_COLUMNS_MAP.put("timesheetId", Types.BIGINT);
        TABLE_COLUMNS_MAP.put("timesheetTaskId", Types.BIGINT);
        TABLE_COLUMNS_MAP.put("companyId", Types.BIGINT);
        TABLE_COLUMNS_MAP.put("userId", Types.BIGINT);
        TABLE_COLUMNS_MAP.put("userName", Types.VARCHAR);
        TABLE_COLUMNS_MAP.put("createDate", Types.TIMESTAMP);
        TABLE_COLUMNS_MAP.put("modifiedDate", Types.TIMESTAMP);
        TABLE_COLUMNS_MAP.put("duration", Types.DOUBLE);
        TABLE_COLUMNS_MAP.put("comment_", Types.VARCHAR);
        TABLE_COLUMNS_MAP.put("taskDate", Types.TIMESTAMP);
    }

    public static final String TABLE_SQL_CREATE = "create table gw_TimesheetTaskDuration (uuid_ VARCHAR(75) null,timesheetTaskDurationId LONG not null,groupId LONG,timesheetId LONG not null,timesheetTaskId LONG not null,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,duration DOUBLE,comment_ VARCHAR(75) null,taskDate DATE null,primary key (timesheetTaskDurationId, timesheetId, timesheetTaskId))";
    public static final String TABLE_SQL_DROP = "drop table gw_TimesheetTaskDuration";
    public static final String ORDER_BY_JPQL = " ORDER BY timesheetTaskDuration.createDate ASC";
    public static final String ORDER_BY_SQL = " ORDER BY gw_TimesheetTaskDuration.createDate 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.gs.hack.service.util.ServiceProps.get(
                            "value.object.entity.cache.enabled.com.liferay.gs.hack.model.TimesheetTaskDuration"),
                    true);
    public static final boolean FINDER_CACHE_ENABLED = GetterUtil
            .getBoolean(
                    com.liferay.gs.hack.service.util.ServiceProps.get(
                            "value.object.finder.cache.enabled.com.liferay.gs.hack.model.TimesheetTaskDuration"),
                    true);
    public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil
            .getBoolean(
                    com.liferay.gs.hack.service.util.ServiceProps.get(
                            "value.object.column.bitmask.enabled.com.liferay.gs.hack.model.TimesheetTaskDuration"),
                    true);
    public static final long COMPANYID_COLUMN_BITMASK = 1L;
    public static final long GROUPID_COLUMN_BITMASK = 2L;
    public static final long TIMESHEETID_COLUMN_BITMASK = 4L;
    public static final long TIMESHEETTASKID_COLUMN_BITMASK = 8L;
    public static final long UUID_COLUMN_BITMASK = 16L;
    public static final long CREATEDATE_COLUMN_BITMASK = 32L;

    /**
     * Converts the soap model instance into a normal model instance.
     *
     * @param soapModel the soap model instance to convert
     * @return the normal model instance
     */
    public static TimesheetTaskDuration toModel(TimesheetTaskDurationSoap soapModel) {
        if (soapModel == null) {
            return null;
        }

        TimesheetTaskDuration model = new TimesheetTaskDurationImpl();

        model.setUuid(soapModel.getUuid());
        model.setTimesheetTaskDurationId(soapModel.getTimesheetTaskDurationId());
        model.setGroupId(soapModel.getGroupId());
        model.setTimesheetId(soapModel.getTimesheetId());
        model.setTimesheetTaskId(soapModel.getTimesheetTaskId());
        model.setCompanyId(soapModel.getCompanyId());
        model.setUserId(soapModel.getUserId());
        model.setUserName(soapModel.getUserName());
        model.setCreateDate(soapModel.getCreateDate());
        model.setModifiedDate(soapModel.getModifiedDate());
        model.setDuration(soapModel.getDuration());
        model.setComment(soapModel.getComment());
        model.setTaskDate(soapModel.getTaskDate());

        return model;
    }

    /**
     * Converts the soap model instances into normal model instances.
     *
     * @param soapModels the soap model instances to convert
     * @return the normal model instances
     */
    public static List<TimesheetTaskDuration> toModels(TimesheetTaskDurationSoap[] soapModels) {
        if (soapModels == null) {
            return null;
        }

        List<TimesheetTaskDuration> models = new ArrayList<TimesheetTaskDuration>(soapModels.length);

        for (TimesheetTaskDurationSoap soapModel : soapModels) {
            models.add(toModel(soapModel));
        }

        return models;
    }

    public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.gs.hack.service.util.ServiceProps
            .get("lock.expiration.time.com.liferay.gs.hack.model.TimesheetTaskDuration"));

    public TimesheetTaskDurationModelImpl() {
    }

    @Override
    public TimesheetTaskDurationPK getPrimaryKey() {
        return new TimesheetTaskDurationPK(_timesheetTaskDurationId, _timesheetId, _timesheetTaskId);
    }

    @Override
    public void setPrimaryKey(TimesheetTaskDurationPK primaryKey) {
        setTimesheetTaskDurationId(primaryKey.timesheetTaskDurationId);
        setTimesheetId(primaryKey.timesheetId);
        setTimesheetTaskId(primaryKey.timesheetTaskId);
    }

    @Override
    public Serializable getPrimaryKeyObj() {
        return new TimesheetTaskDurationPK(_timesheetTaskDurationId, _timesheetId, _timesheetTaskId);
    }

    @Override
    public void setPrimaryKeyObj(Serializable primaryKeyObj) {
        setPrimaryKey((TimesheetTaskDurationPK) primaryKeyObj);
    }

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

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

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

        attributes.put("uuid", getUuid());
        attributes.put("timesheetTaskDurationId", getTimesheetTaskDurationId());
        attributes.put("groupId", getGroupId());
        attributes.put("timesheetId", getTimesheetId());
        attributes.put("timesheetTaskId", getTimesheetTaskId());
        attributes.put("companyId", getCompanyId());
        attributes.put("userId", getUserId());
        attributes.put("userName", getUserName());
        attributes.put("createDate", getCreateDate());
        attributes.put("modifiedDate", getModifiedDate());
        attributes.put("duration", getDuration());
        attributes.put("comment", getComment());
        attributes.put("taskDate", getTaskDate());

        attributes.put("entityCacheEnabled", isEntityCacheEnabled());
        attributes.put("finderCacheEnabled", isFinderCacheEnabled());

        return attributes;
    }

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

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

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

        if (timesheetTaskDurationId != null) {
            setTimesheetTaskDurationId(timesheetTaskDurationId);
        }

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

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

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

        if (timesheetId != null) {
            setTimesheetId(timesheetId);
        }

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

        if (timesheetTaskId != null) {
            setTimesheetTaskId(timesheetTaskId);
        }

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

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

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

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

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

        if (userName != null) {
            setUserName(userName);
        }

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

        if (createDate != null) {
            setCreateDate(createDate);
        }

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

        if (modifiedDate != null) {
            setModifiedDate(modifiedDate);
        }

        Double duration = (Double) attributes.get("duration");

        if (duration != null) {
            setDuration(duration);
        }

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

        if (comment != null) {
            setComment(comment);
        }

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

        if (taskDate != null) {
            setTaskDate(taskDate);
        }
    }

    @JSON
    @Override
    public String getUuid() {
        if (_uuid == null) {
            return StringPool.BLANK;
        } else {
            return _uuid;
        }
    }

    @Override
    public void setUuid(String uuid) {
        if (_originalUuid == null) {
            _originalUuid = _uuid;
        }

        _uuid = uuid;
    }

    public String getOriginalUuid() {
        return GetterUtil.getString(_originalUuid);
    }

    @JSON
    @Override
    public long getTimesheetTaskDurationId() {
        return _timesheetTaskDurationId;
    }

    @Override
    public void setTimesheetTaskDurationId(long timesheetTaskDurationId) {
        _timesheetTaskDurationId = timesheetTaskDurationId;
    }

    @JSON
    @Override
    public long getGroupId() {
        return _groupId;
    }

    @Override
    public void setGroupId(long groupId) {
        _columnBitmask |= GROUPID_COLUMN_BITMASK;

        if (!_setOriginalGroupId) {
            _setOriginalGroupId = true;

            _originalGroupId = _groupId;
        }

        _groupId = groupId;
    }

    public long getOriginalGroupId() {
        return _originalGroupId;
    }

    @JSON
    @Override
    public long getTimesheetId() {
        return _timesheetId;
    }

    @Override
    public void setTimesheetId(long timesheetId) {
        _columnBitmask |= TIMESHEETID_COLUMN_BITMASK;

        if (!_setOriginalTimesheetId) {
            _setOriginalTimesheetId = true;

            _originalTimesheetId = _timesheetId;
        }

        _timesheetId = timesheetId;
    }

    public long getOriginalTimesheetId() {
        return _originalTimesheetId;
    }

    @JSON
    @Override
    public long getTimesheetTaskId() {
        return _timesheetTaskId;
    }

    @Override
    public void setTimesheetTaskId(long timesheetTaskId) {
        _columnBitmask |= TIMESHEETTASKID_COLUMN_BITMASK;

        if (!_setOriginalTimesheetTaskId) {
            _setOriginalTimesheetTaskId = true;

            _originalTimesheetTaskId = _timesheetTaskId;
        }

        _timesheetTaskId = timesheetTaskId;
    }

    public long getOriginalTimesheetTaskId() {
        return _originalTimesheetTaskId;
    }

    @JSON
    @Override
    public long getCompanyId() {
        return _companyId;
    }

    @Override
    public void setCompanyId(long companyId) {
        _columnBitmask |= COMPANYID_COLUMN_BITMASK;

        if (!_setOriginalCompanyId) {
            _setOriginalCompanyId = true;

            _originalCompanyId = _companyId;
        }

        _companyId = companyId;
    }

    public long getOriginalCompanyId() {
        return _originalCompanyId;
    }

    @JSON
    @Override
    public long getUserId() {
        return _userId;
    }

    @Override
    public void setUserId(long userId) {
        _userId = userId;
    }

    @Override
    public String getUserUuid() {
        try {
            User user = UserLocalServiceUtil.getUserById(getUserId());

            return user.getUuid();
        } catch (PortalException pe) {
            return StringPool.BLANK;
        }
    }

    @Override
    public void setUserUuid(String userUuid) {
    }

    @JSON
    @Override
    public String getUserName() {
        if (_userName == null) {
            return StringPool.BLANK;
        } else {
            return _userName;
        }
    }

    @Override
    public void setUserName(String userName) {
        _userName = userName;
    }

    @JSON
    @Override
    public Date getCreateDate() {
        return _createDate;
    }

    @Override
    public void setCreateDate(Date createDate) {
        _columnBitmask = -1L;

        _createDate = createDate;
    }

    @JSON
    @Override
    public Date getModifiedDate() {
        return _modifiedDate;
    }

    public boolean hasSetModifiedDate() {
        return _setModifiedDate;
    }

    @Override
    public void setModifiedDate(Date modifiedDate) {
        _setModifiedDate = true;

        _modifiedDate = modifiedDate;
    }

    @JSON
    @Override
    public double getDuration() {
        return _duration;
    }

    @Override
    public void setDuration(double duration) {
        _duration = duration;
    }

    @JSON
    @Override
    public String getComment() {
        if (_comment == null) {
            return StringPool.BLANK;
        } else {
            return _comment;
        }
    }

    @Override
    public void setComment(String comment) {
        _comment = comment;
    }

    @JSON
    @Override
    public Date getTaskDate() {
        return _taskDate;
    }

    @Override
    public void setTaskDate(Date taskDate) {
        _taskDate = taskDate;
    }

    @Override
    public StagedModelType getStagedModelType() {
        return new StagedModelType(PortalUtil.getClassNameId(TimesheetTaskDuration.class.getName()));
    }

    public long getColumnBitmask() {
        return _columnBitmask;
    }

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

        return _escapedModel;
    }

    @Override
    public Object clone() {
        TimesheetTaskDurationImpl timesheetTaskDurationImpl = new TimesheetTaskDurationImpl();

        timesheetTaskDurationImpl.setUuid(getUuid());
        timesheetTaskDurationImpl.setTimesheetTaskDurationId(getTimesheetTaskDurationId());
        timesheetTaskDurationImpl.setGroupId(getGroupId());
        timesheetTaskDurationImpl.setTimesheetId(getTimesheetId());
        timesheetTaskDurationImpl.setTimesheetTaskId(getTimesheetTaskId());
        timesheetTaskDurationImpl.setCompanyId(getCompanyId());
        timesheetTaskDurationImpl.setUserId(getUserId());
        timesheetTaskDurationImpl.setUserName(getUserName());
        timesheetTaskDurationImpl.setCreateDate(getCreateDate());
        timesheetTaskDurationImpl.setModifiedDate(getModifiedDate());
        timesheetTaskDurationImpl.setDuration(getDuration());
        timesheetTaskDurationImpl.setComment(getComment());
        timesheetTaskDurationImpl.setTaskDate(getTaskDate());

        timesheetTaskDurationImpl.resetOriginalValues();

        return timesheetTaskDurationImpl;
    }

    @Override
    public int compareTo(TimesheetTaskDuration timesheetTaskDuration) {
        int value = 0;

        value = DateUtil.compareTo(getCreateDate(), timesheetTaskDuration.getCreateDate());

        if (value != 0) {
            return value;
        }

        return 0;
    }

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

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

        TimesheetTaskDuration timesheetTaskDuration = (TimesheetTaskDuration) obj;

        TimesheetTaskDurationPK primaryKey = timesheetTaskDuration.getPrimaryKey();

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

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

    @Override
    public boolean isEntityCacheEnabled() {
        return ENTITY_CACHE_ENABLED;
    }

    @Override
    public boolean isFinderCacheEnabled() {
        return FINDER_CACHE_ENABLED;
    }

    @Override
    public void resetOriginalValues() {
        TimesheetTaskDurationModelImpl timesheetTaskDurationModelImpl = this;

        timesheetTaskDurationModelImpl._originalUuid = timesheetTaskDurationModelImpl._uuid;

        timesheetTaskDurationModelImpl._originalGroupId = timesheetTaskDurationModelImpl._groupId;

        timesheetTaskDurationModelImpl._setOriginalGroupId = false;

        timesheetTaskDurationModelImpl._originalTimesheetId = timesheetTaskDurationModelImpl._timesheetId;

        timesheetTaskDurationModelImpl._setOriginalTimesheetId = false;

        timesheetTaskDurationModelImpl._originalTimesheetTaskId = timesheetTaskDurationModelImpl._timesheetTaskId;

        timesheetTaskDurationModelImpl._setOriginalTimesheetTaskId = false;

        timesheetTaskDurationModelImpl._originalCompanyId = timesheetTaskDurationModelImpl._companyId;

        timesheetTaskDurationModelImpl._setOriginalCompanyId = false;

        timesheetTaskDurationModelImpl._setModifiedDate = false;

        timesheetTaskDurationModelImpl._columnBitmask = 0;
    }

    @Override
    public CacheModel<TimesheetTaskDuration> toCacheModel() {
        TimesheetTaskDurationCacheModel timesheetTaskDurationCacheModel = new TimesheetTaskDurationCacheModel();

        timesheetTaskDurationCacheModel.timesheetTaskDurationPK = getPrimaryKey();

        timesheetTaskDurationCacheModel.uuid = getUuid();

        String uuid = timesheetTaskDurationCacheModel.uuid;

        if ((uuid != null) && (uuid.length() == 0)) {
            timesheetTaskDurationCacheModel.uuid = null;
        }

        timesheetTaskDurationCacheModel.timesheetTaskDurationId = getTimesheetTaskDurationId();

        timesheetTaskDurationCacheModel.groupId = getGroupId();

        timesheetTaskDurationCacheModel.timesheetId = getTimesheetId();

        timesheetTaskDurationCacheModel.timesheetTaskId = getTimesheetTaskId();

        timesheetTaskDurationCacheModel.companyId = getCompanyId();

        timesheetTaskDurationCacheModel.userId = getUserId();

        timesheetTaskDurationCacheModel.userName = getUserName();

        String userName = timesheetTaskDurationCacheModel.userName;

        if ((userName != null) && (userName.length() == 0)) {
            timesheetTaskDurationCacheModel.userName = null;
        }

        Date createDate = getCreateDate();

        if (createDate != null) {
            timesheetTaskDurationCacheModel.createDate = createDate.getTime();
        } else {
            timesheetTaskDurationCacheModel.createDate = Long.MIN_VALUE;
        }

        Date modifiedDate = getModifiedDate();

        if (modifiedDate != null) {
            timesheetTaskDurationCacheModel.modifiedDate = modifiedDate.getTime();
        } else {
            timesheetTaskDurationCacheModel.modifiedDate = Long.MIN_VALUE;
        }

        timesheetTaskDurationCacheModel.duration = getDuration();

        timesheetTaskDurationCacheModel.comment = getComment();

        String comment = timesheetTaskDurationCacheModel.comment;

        if ((comment != null) && (comment.length() == 0)) {
            timesheetTaskDurationCacheModel.comment = null;
        }

        Date taskDate = getTaskDate();

        if (taskDate != null) {
            timesheetTaskDurationCacheModel.taskDate = taskDate.getTime();
        } else {
            timesheetTaskDurationCacheModel.taskDate = Long.MIN_VALUE;
        }

        return timesheetTaskDurationCacheModel;
    }

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

        sb.append("{uuid=");
        sb.append(getUuid());
        sb.append(", timesheetTaskDurationId=");
        sb.append(getTimesheetTaskDurationId());
        sb.append(", groupId=");
        sb.append(getGroupId());
        sb.append(", timesheetId=");
        sb.append(getTimesheetId());
        sb.append(", timesheetTaskId=");
        sb.append(getTimesheetTaskId());
        sb.append(", companyId=");
        sb.append(getCompanyId());
        sb.append(", userId=");
        sb.append(getUserId());
        sb.append(", userName=");
        sb.append(getUserName());
        sb.append(", createDate=");
        sb.append(getCreateDate());
        sb.append(", modifiedDate=");
        sb.append(getModifiedDate());
        sb.append(", duration=");
        sb.append(getDuration());
        sb.append(", comment=");
        sb.append(getComment());
        sb.append(", taskDate=");
        sb.append(getTaskDate());
        sb.append("}");

        return sb.toString();
    }

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

        sb.append("<model><model-name>");
        sb.append("com.liferay.gs.hack.model.TimesheetTaskDuration");
        sb.append("</model-name>");

        sb.append("<column><column-name>uuid</column-name><column-value><![CDATA[");
        sb.append(getUuid());
        sb.append("]]></column-value></column>");
        sb.append("<column><column-name>timesheetTaskDurationId</column-name><column-value><![CDATA[");
        sb.append(getTimesheetTaskDurationId());
        sb.append("]]></column-value></column>");
        sb.append("<column><column-name>groupId</column-name><column-value><![CDATA[");
        sb.append(getGroupId());
        sb.append("]]></column-value></column>");
        sb.append("<column><column-name>timesheetId</column-name><column-value><![CDATA[");
        sb.append(getTimesheetId());
        sb.append("]]></column-value></column>");
        sb.append("<column><column-name>timesheetTaskId</column-name><column-value><![CDATA[");
        sb.append(getTimesheetTaskId());
        sb.append("]]></column-value></column>");
        sb.append("<column><column-name>companyId</column-name><column-value><![CDATA[");
        sb.append(getCompanyId());
        sb.append("]]></column-value></column>");
        sb.append("<column><column-name>userId</column-name><column-value><![CDATA[");
        sb.append(getUserId());
        sb.append("]]></column-value></column>");
        sb.append("<column><column-name>userName</column-name><column-value><![CDATA[");
        sb.append(getUserName());
        sb.append("]]></column-value></column>");
        sb.append("<column><column-name>createDate</column-name><column-value><![CDATA[");
        sb.append(getCreateDate());
        sb.append("]]></column-value></column>");
        sb.append("<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
        sb.append(getModifiedDate());
        sb.append("]]></column-value></column>");
        sb.append("<column><column-name>duration</column-name><column-value><![CDATA[");
        sb.append(getDuration());
        sb.append("]]></column-value></column>");
        sb.append("<column><column-name>comment</column-name><column-value><![CDATA[");
        sb.append(getComment());
        sb.append("]]></column-value></column>");
        sb.append("<column><column-name>taskDate</column-name><column-value><![CDATA[");
        sb.append(getTaskDate());
        sb.append("]]></column-value></column>");

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

        return sb.toString();
    }

    private static final ClassLoader _classLoader = TimesheetTaskDuration.class.getClassLoader();
    private static final Class<?>[] _escapedModelInterfaces = new Class[] { TimesheetTaskDuration.class };
    private String _uuid;
    private String _originalUuid;
    private long _timesheetTaskDurationId;
    private long _groupId;
    private long _originalGroupId;
    private boolean _setOriginalGroupId;
    private long _timesheetId;
    private long _originalTimesheetId;
    private boolean _setOriginalTimesheetId;
    private long _timesheetTaskId;
    private long _originalTimesheetTaskId;
    private boolean _setOriginalTimesheetTaskId;
    private long _companyId;
    private long _originalCompanyId;
    private boolean _setOriginalCompanyId;
    private long _userId;
    private String _userName;
    private Date _createDate;
    private Date _modifiedDate;
    private boolean _setModifiedDate;
    private double _duration;
    private String _comment;
    private Date _taskDate;
    private long _columnBitmask;
    private TimesheetTaskDuration _escapedModel;
}