001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.mobiledevicerules.model.impl;
016    
017    import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.json.JSON;
020    import com.liferay.portal.kernel.util.GetterUtil;
021    import com.liferay.portal.kernel.util.ProxyUtil;
022    import com.liferay.portal.kernel.util.StringBundler;
023    import com.liferay.portal.kernel.util.StringPool;
024    import com.liferay.portal.kernel.util.Validator;
025    import com.liferay.portal.model.CacheModel;
026    import com.liferay.portal.model.impl.BaseModelImpl;
027    import com.liferay.portal.service.ServiceContext;
028    import com.liferay.portal.util.PortalUtil;
029    
030    import com.liferay.portlet.expando.model.ExpandoBridge;
031    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
032    import com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance;
033    import com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstanceModel;
034    import com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstanceSoap;
035    
036    import java.io.Serializable;
037    
038    import java.sql.Types;
039    
040    import java.util.ArrayList;
041    import java.util.Date;
042    import java.util.HashMap;
043    import java.util.List;
044    import java.util.Map;
045    
046    /**
047     * The base model implementation for the MDRRuleGroupInstance service. Represents a row in the "MDRRuleGroupInstance" database table, with each column mapped to a property of this class.
048     *
049     * <p>
050     * This implementation and its corresponding interface {@link com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstanceModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link MDRRuleGroupInstanceImpl}.
051     * </p>
052     *
053     * @author Edward C. Han
054     * @see MDRRuleGroupInstanceImpl
055     * @see com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance
056     * @see com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstanceModel
057     * @generated
058     */
059    @JSON(strict = true)
060    public class MDRRuleGroupInstanceModelImpl extends BaseModelImpl<MDRRuleGroupInstance>
061            implements MDRRuleGroupInstanceModel {
062            /*
063             * NOTE FOR DEVELOPERS:
064             *
065             * Never modify or reference this class directly. All methods that expect a m d r rule group instance model instance should use the {@link com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance} interface instead.
066             */
067            public static final String TABLE_NAME = "MDRRuleGroupInstance";
068            public static final Object[][] TABLE_COLUMNS = {
069                            { "uuid_", Types.VARCHAR },
070                            { "ruleGroupInstanceId", Types.BIGINT },
071                            { "groupId", Types.BIGINT },
072                            { "companyId", Types.BIGINT },
073                            { "userId", Types.BIGINT },
074                            { "userName", Types.VARCHAR },
075                            { "createDate", Types.TIMESTAMP },
076                            { "modifiedDate", Types.TIMESTAMP },
077                            { "classNameId", Types.BIGINT },
078                            { "classPK", Types.BIGINT },
079                            { "ruleGroupId", Types.BIGINT },
080                            { "priority", Types.INTEGER }
081                    };
082            public static final String TABLE_SQL_CREATE = "create table MDRRuleGroupInstance (uuid_ VARCHAR(75) null,ruleGroupInstanceId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,classNameId LONG,classPK LONG,ruleGroupId LONG,priority INTEGER)";
083            public static final String TABLE_SQL_DROP = "drop table MDRRuleGroupInstance";
084            public static final String DATA_SOURCE = "liferayDataSource";
085            public static final String SESSION_FACTORY = "liferaySessionFactory";
086            public static final String TX_MANAGER = "liferayTransactionManager";
087            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
088                                    "value.object.entity.cache.enabled.com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance"),
089                            true);
090            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
091                                    "value.object.finder.cache.enabled.com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance"),
092                            true);
093            public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
094                                    "value.object.column.bitmask.enabled.com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance"),
095                            true);
096            public static long CLASSNAMEID_COLUMN_BITMASK = 1L;
097            public static long CLASSPK_COLUMN_BITMASK = 2L;
098            public static long GROUPID_COLUMN_BITMASK = 4L;
099            public static long RULEGROUPID_COLUMN_BITMASK = 8L;
100            public static long UUID_COLUMN_BITMASK = 16L;
101    
102            /**
103             * Converts the soap model instance into a normal model instance.
104             *
105             * @param soapModel the soap model instance to convert
106             * @return the normal model instance
107             */
108            public static MDRRuleGroupInstance toModel(
109                    MDRRuleGroupInstanceSoap soapModel) {
110                    if (soapModel == null) {
111                            return null;
112                    }
113    
114                    MDRRuleGroupInstance model = new MDRRuleGroupInstanceImpl();
115    
116                    model.setUuid(soapModel.getUuid());
117                    model.setRuleGroupInstanceId(soapModel.getRuleGroupInstanceId());
118                    model.setGroupId(soapModel.getGroupId());
119                    model.setCompanyId(soapModel.getCompanyId());
120                    model.setUserId(soapModel.getUserId());
121                    model.setUserName(soapModel.getUserName());
122                    model.setCreateDate(soapModel.getCreateDate());
123                    model.setModifiedDate(soapModel.getModifiedDate());
124                    model.setClassNameId(soapModel.getClassNameId());
125                    model.setClassPK(soapModel.getClassPK());
126                    model.setRuleGroupId(soapModel.getRuleGroupId());
127                    model.setPriority(soapModel.getPriority());
128    
129                    return model;
130            }
131    
132            /**
133             * Converts the soap model instances into normal model instances.
134             *
135             * @param soapModels the soap model instances to convert
136             * @return the normal model instances
137             */
138            public static List<MDRRuleGroupInstance> toModels(
139                    MDRRuleGroupInstanceSoap[] soapModels) {
140                    if (soapModels == null) {
141                            return null;
142                    }
143    
144                    List<MDRRuleGroupInstance> models = new ArrayList<MDRRuleGroupInstance>(soapModels.length);
145    
146                    for (MDRRuleGroupInstanceSoap soapModel : soapModels) {
147                            models.add(toModel(soapModel));
148                    }
149    
150                    return models;
151            }
152    
153            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
154                                    "lock.expiration.time.com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance"));
155    
156            public MDRRuleGroupInstanceModelImpl() {
157            }
158    
159            public long getPrimaryKey() {
160                    return _ruleGroupInstanceId;
161            }
162    
163            public void setPrimaryKey(long primaryKey) {
164                    setRuleGroupInstanceId(primaryKey);
165            }
166    
167            public Serializable getPrimaryKeyObj() {
168                    return new Long(_ruleGroupInstanceId);
169            }
170    
171            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
172                    setPrimaryKey(((Long)primaryKeyObj).longValue());
173            }
174    
175            public Class<?> getModelClass() {
176                    return MDRRuleGroupInstance.class;
177            }
178    
179            public String getModelClassName() {
180                    return MDRRuleGroupInstance.class.getName();
181            }
182    
183            @Override
184            public Map<String, Object> getModelAttributes() {
185                    Map<String, Object> attributes = new HashMap<String, Object>();
186    
187                    attributes.put("uuid", getUuid());
188                    attributes.put("ruleGroupInstanceId", getRuleGroupInstanceId());
189                    attributes.put("groupId", getGroupId());
190                    attributes.put("companyId", getCompanyId());
191                    attributes.put("userId", getUserId());
192                    attributes.put("userName", getUserName());
193                    attributes.put("createDate", getCreateDate());
194                    attributes.put("modifiedDate", getModifiedDate());
195                    attributes.put("classNameId", getClassNameId());
196                    attributes.put("classPK", getClassPK());
197                    attributes.put("ruleGroupId", getRuleGroupId());
198                    attributes.put("priority", getPriority());
199    
200                    return attributes;
201            }
202    
203            @Override
204            public void setModelAttributes(Map<String, Object> attributes) {
205                    String uuid = (String)attributes.get("uuid");
206    
207                    if (uuid != null) {
208                            setUuid(uuid);
209                    }
210    
211                    Long ruleGroupInstanceId = (Long)attributes.get("ruleGroupInstanceId");
212    
213                    if (ruleGroupInstanceId != null) {
214                            setRuleGroupInstanceId(ruleGroupInstanceId);
215                    }
216    
217                    Long groupId = (Long)attributes.get("groupId");
218    
219                    if (groupId != null) {
220                            setGroupId(groupId);
221                    }
222    
223                    Long companyId = (Long)attributes.get("companyId");
224    
225                    if (companyId != null) {
226                            setCompanyId(companyId);
227                    }
228    
229                    Long userId = (Long)attributes.get("userId");
230    
231                    if (userId != null) {
232                            setUserId(userId);
233                    }
234    
235                    String userName = (String)attributes.get("userName");
236    
237                    if (userName != null) {
238                            setUserName(userName);
239                    }
240    
241                    Date createDate = (Date)attributes.get("createDate");
242    
243                    if (createDate != null) {
244                            setCreateDate(createDate);
245                    }
246    
247                    Date modifiedDate = (Date)attributes.get("modifiedDate");
248    
249                    if (modifiedDate != null) {
250                            setModifiedDate(modifiedDate);
251                    }
252    
253                    Long classNameId = (Long)attributes.get("classNameId");
254    
255                    if (classNameId != null) {
256                            setClassNameId(classNameId);
257                    }
258    
259                    Long classPK = (Long)attributes.get("classPK");
260    
261                    if (classPK != null) {
262                            setClassPK(classPK);
263                    }
264    
265                    Long ruleGroupId = (Long)attributes.get("ruleGroupId");
266    
267                    if (ruleGroupId != null) {
268                            setRuleGroupId(ruleGroupId);
269                    }
270    
271                    Integer priority = (Integer)attributes.get("priority");
272    
273                    if (priority != null) {
274                            setPriority(priority);
275                    }
276            }
277    
278            @JSON
279            public String getUuid() {
280                    if (_uuid == null) {
281                            return StringPool.BLANK;
282                    }
283                    else {
284                            return _uuid;
285                    }
286            }
287    
288            public void setUuid(String uuid) {
289                    if (_originalUuid == null) {
290                            _originalUuid = _uuid;
291                    }
292    
293                    _uuid = uuid;
294            }
295    
296            public String getOriginalUuid() {
297                    return GetterUtil.getString(_originalUuid);
298            }
299    
300            @JSON
301            public long getRuleGroupInstanceId() {
302                    return _ruleGroupInstanceId;
303            }
304    
305            public void setRuleGroupInstanceId(long ruleGroupInstanceId) {
306                    _ruleGroupInstanceId = ruleGroupInstanceId;
307            }
308    
309            @JSON
310            public long getGroupId() {
311                    return _groupId;
312            }
313    
314            public void setGroupId(long groupId) {
315                    _columnBitmask |= GROUPID_COLUMN_BITMASK;
316    
317                    if (!_setOriginalGroupId) {
318                            _setOriginalGroupId = true;
319    
320                            _originalGroupId = _groupId;
321                    }
322    
323                    _groupId = groupId;
324            }
325    
326            public long getOriginalGroupId() {
327                    return _originalGroupId;
328            }
329    
330            @JSON
331            public long getCompanyId() {
332                    return _companyId;
333            }
334    
335            public void setCompanyId(long companyId) {
336                    _companyId = companyId;
337            }
338    
339            @JSON
340            public long getUserId() {
341                    return _userId;
342            }
343    
344            public void setUserId(long userId) {
345                    _userId = userId;
346            }
347    
348            public String getUserUuid() throws SystemException {
349                    return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
350            }
351    
352            public void setUserUuid(String userUuid) {
353                    _userUuid = userUuid;
354            }
355    
356            @JSON
357            public String getUserName() {
358                    if (_userName == null) {
359                            return StringPool.BLANK;
360                    }
361                    else {
362                            return _userName;
363                    }
364            }
365    
366            public void setUserName(String userName) {
367                    _userName = userName;
368            }
369    
370            @JSON
371            public Date getCreateDate() {
372                    return _createDate;
373            }
374    
375            public void setCreateDate(Date createDate) {
376                    _createDate = createDate;
377            }
378    
379            @JSON
380            public Date getModifiedDate() {
381                    return _modifiedDate;
382            }
383    
384            public void setModifiedDate(Date modifiedDate) {
385                    _modifiedDate = modifiedDate;
386            }
387    
388            public String getClassName() {
389                    if (getClassNameId() <= 0) {
390                            return StringPool.BLANK;
391                    }
392    
393                    return PortalUtil.getClassName(getClassNameId());
394            }
395    
396            public void setClassName(String className) {
397                    long classNameId = 0;
398    
399                    if (Validator.isNotNull(className)) {
400                            classNameId = PortalUtil.getClassNameId(className);
401                    }
402    
403                    setClassNameId(classNameId);
404            }
405    
406            @JSON
407            public long getClassNameId() {
408                    return _classNameId;
409            }
410    
411            public void setClassNameId(long classNameId) {
412                    _columnBitmask |= CLASSNAMEID_COLUMN_BITMASK;
413    
414                    if (!_setOriginalClassNameId) {
415                            _setOriginalClassNameId = true;
416    
417                            _originalClassNameId = _classNameId;
418                    }
419    
420                    _classNameId = classNameId;
421            }
422    
423            public long getOriginalClassNameId() {
424                    return _originalClassNameId;
425            }
426    
427            @JSON
428            public long getClassPK() {
429                    return _classPK;
430            }
431    
432            public void setClassPK(long classPK) {
433                    _columnBitmask |= CLASSPK_COLUMN_BITMASK;
434    
435                    if (!_setOriginalClassPK) {
436                            _setOriginalClassPK = true;
437    
438                            _originalClassPK = _classPK;
439                    }
440    
441                    _classPK = classPK;
442            }
443    
444            public long getOriginalClassPK() {
445                    return _originalClassPK;
446            }
447    
448            @JSON
449            public long getRuleGroupId() {
450                    return _ruleGroupId;
451            }
452    
453            public void setRuleGroupId(long ruleGroupId) {
454                    _columnBitmask |= RULEGROUPID_COLUMN_BITMASK;
455    
456                    if (!_setOriginalRuleGroupId) {
457                            _setOriginalRuleGroupId = true;
458    
459                            _originalRuleGroupId = _ruleGroupId;
460                    }
461    
462                    _ruleGroupId = ruleGroupId;
463            }
464    
465            public long getOriginalRuleGroupId() {
466                    return _originalRuleGroupId;
467            }
468    
469            @JSON
470            public int getPriority() {
471                    return _priority;
472            }
473    
474            public void setPriority(int priority) {
475                    _priority = priority;
476            }
477    
478            public long getColumnBitmask() {
479                    return _columnBitmask;
480            }
481    
482            @Override
483            public ExpandoBridge getExpandoBridge() {
484                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
485                            MDRRuleGroupInstance.class.getName(), getPrimaryKey());
486            }
487    
488            @Override
489            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
490                    ExpandoBridge expandoBridge = getExpandoBridge();
491    
492                    expandoBridge.setAttributes(serviceContext);
493            }
494    
495            @Override
496            public MDRRuleGroupInstance toEscapedModel() {
497                    if (_escapedModel == null) {
498                            _escapedModel = (MDRRuleGroupInstance)ProxyUtil.newProxyInstance(_classLoader,
499                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
500                    }
501    
502                    return _escapedModel;
503            }
504    
505            public MDRRuleGroupInstance toUnescapedModel() {
506                    return (MDRRuleGroupInstance)this;
507            }
508    
509            @Override
510            public Object clone() {
511                    MDRRuleGroupInstanceImpl mdrRuleGroupInstanceImpl = new MDRRuleGroupInstanceImpl();
512    
513                    mdrRuleGroupInstanceImpl.setUuid(getUuid());
514                    mdrRuleGroupInstanceImpl.setRuleGroupInstanceId(getRuleGroupInstanceId());
515                    mdrRuleGroupInstanceImpl.setGroupId(getGroupId());
516                    mdrRuleGroupInstanceImpl.setCompanyId(getCompanyId());
517                    mdrRuleGroupInstanceImpl.setUserId(getUserId());
518                    mdrRuleGroupInstanceImpl.setUserName(getUserName());
519                    mdrRuleGroupInstanceImpl.setCreateDate(getCreateDate());
520                    mdrRuleGroupInstanceImpl.setModifiedDate(getModifiedDate());
521                    mdrRuleGroupInstanceImpl.setClassNameId(getClassNameId());
522                    mdrRuleGroupInstanceImpl.setClassPK(getClassPK());
523                    mdrRuleGroupInstanceImpl.setRuleGroupId(getRuleGroupId());
524                    mdrRuleGroupInstanceImpl.setPriority(getPriority());
525    
526                    mdrRuleGroupInstanceImpl.resetOriginalValues();
527    
528                    return mdrRuleGroupInstanceImpl;
529            }
530    
531            public int compareTo(MDRRuleGroupInstance mdrRuleGroupInstance) {
532                    long primaryKey = mdrRuleGroupInstance.getPrimaryKey();
533    
534                    if (getPrimaryKey() < primaryKey) {
535                            return -1;
536                    }
537                    else if (getPrimaryKey() > primaryKey) {
538                            return 1;
539                    }
540                    else {
541                            return 0;
542                    }
543            }
544    
545            @Override
546            public boolean equals(Object obj) {
547                    if (this == obj) {
548                            return true;
549                    }
550    
551                    if (!(obj instanceof MDRRuleGroupInstance)) {
552                            return false;
553                    }
554    
555                    MDRRuleGroupInstance mdrRuleGroupInstance = (MDRRuleGroupInstance)obj;
556    
557                    long primaryKey = mdrRuleGroupInstance.getPrimaryKey();
558    
559                    if (getPrimaryKey() == primaryKey) {
560                            return true;
561                    }
562                    else {
563                            return false;
564                    }
565            }
566    
567            @Override
568            public int hashCode() {
569                    return (int)getPrimaryKey();
570            }
571    
572            @Override
573            public void resetOriginalValues() {
574                    MDRRuleGroupInstanceModelImpl mdrRuleGroupInstanceModelImpl = this;
575    
576                    mdrRuleGroupInstanceModelImpl._originalUuid = mdrRuleGroupInstanceModelImpl._uuid;
577    
578                    mdrRuleGroupInstanceModelImpl._originalGroupId = mdrRuleGroupInstanceModelImpl._groupId;
579    
580                    mdrRuleGroupInstanceModelImpl._setOriginalGroupId = false;
581    
582                    mdrRuleGroupInstanceModelImpl._originalClassNameId = mdrRuleGroupInstanceModelImpl._classNameId;
583    
584                    mdrRuleGroupInstanceModelImpl._setOriginalClassNameId = false;
585    
586                    mdrRuleGroupInstanceModelImpl._originalClassPK = mdrRuleGroupInstanceModelImpl._classPK;
587    
588                    mdrRuleGroupInstanceModelImpl._setOriginalClassPK = false;
589    
590                    mdrRuleGroupInstanceModelImpl._originalRuleGroupId = mdrRuleGroupInstanceModelImpl._ruleGroupId;
591    
592                    mdrRuleGroupInstanceModelImpl._setOriginalRuleGroupId = false;
593    
594                    mdrRuleGroupInstanceModelImpl._columnBitmask = 0;
595            }
596    
597            @Override
598            public CacheModel<MDRRuleGroupInstance> toCacheModel() {
599                    MDRRuleGroupInstanceCacheModel mdrRuleGroupInstanceCacheModel = new MDRRuleGroupInstanceCacheModel();
600    
601                    mdrRuleGroupInstanceCacheModel.uuid = getUuid();
602    
603                    String uuid = mdrRuleGroupInstanceCacheModel.uuid;
604    
605                    if ((uuid != null) && (uuid.length() == 0)) {
606                            mdrRuleGroupInstanceCacheModel.uuid = null;
607                    }
608    
609                    mdrRuleGroupInstanceCacheModel.ruleGroupInstanceId = getRuleGroupInstanceId();
610    
611                    mdrRuleGroupInstanceCacheModel.groupId = getGroupId();
612    
613                    mdrRuleGroupInstanceCacheModel.companyId = getCompanyId();
614    
615                    mdrRuleGroupInstanceCacheModel.userId = getUserId();
616    
617                    mdrRuleGroupInstanceCacheModel.userName = getUserName();
618    
619                    String userName = mdrRuleGroupInstanceCacheModel.userName;
620    
621                    if ((userName != null) && (userName.length() == 0)) {
622                            mdrRuleGroupInstanceCacheModel.userName = null;
623                    }
624    
625                    Date createDate = getCreateDate();
626    
627                    if (createDate != null) {
628                            mdrRuleGroupInstanceCacheModel.createDate = createDate.getTime();
629                    }
630                    else {
631                            mdrRuleGroupInstanceCacheModel.createDate = Long.MIN_VALUE;
632                    }
633    
634                    Date modifiedDate = getModifiedDate();
635    
636                    if (modifiedDate != null) {
637                            mdrRuleGroupInstanceCacheModel.modifiedDate = modifiedDate.getTime();
638                    }
639                    else {
640                            mdrRuleGroupInstanceCacheModel.modifiedDate = Long.MIN_VALUE;
641                    }
642    
643                    mdrRuleGroupInstanceCacheModel.classNameId = getClassNameId();
644    
645                    mdrRuleGroupInstanceCacheModel.classPK = getClassPK();
646    
647                    mdrRuleGroupInstanceCacheModel.ruleGroupId = getRuleGroupId();
648    
649                    mdrRuleGroupInstanceCacheModel.priority = getPriority();
650    
651                    return mdrRuleGroupInstanceCacheModel;
652            }
653    
654            @Override
655            public String toString() {
656                    StringBundler sb = new StringBundler(25);
657    
658                    sb.append("{uuid=");
659                    sb.append(getUuid());
660                    sb.append(", ruleGroupInstanceId=");
661                    sb.append(getRuleGroupInstanceId());
662                    sb.append(", groupId=");
663                    sb.append(getGroupId());
664                    sb.append(", companyId=");
665                    sb.append(getCompanyId());
666                    sb.append(", userId=");
667                    sb.append(getUserId());
668                    sb.append(", userName=");
669                    sb.append(getUserName());
670                    sb.append(", createDate=");
671                    sb.append(getCreateDate());
672                    sb.append(", modifiedDate=");
673                    sb.append(getModifiedDate());
674                    sb.append(", classNameId=");
675                    sb.append(getClassNameId());
676                    sb.append(", classPK=");
677                    sb.append(getClassPK());
678                    sb.append(", ruleGroupId=");
679                    sb.append(getRuleGroupId());
680                    sb.append(", priority=");
681                    sb.append(getPriority());
682                    sb.append("}");
683    
684                    return sb.toString();
685            }
686    
687            public String toXmlString() {
688                    StringBundler sb = new StringBundler(40);
689    
690                    sb.append("<model><model-name>");
691                    sb.append(
692                            "com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupInstance");
693                    sb.append("</model-name>");
694    
695                    sb.append(
696                            "<column><column-name>uuid</column-name><column-value><![CDATA[");
697                    sb.append(getUuid());
698                    sb.append("]]></column-value></column>");
699                    sb.append(
700                            "<column><column-name>ruleGroupInstanceId</column-name><column-value><![CDATA[");
701                    sb.append(getRuleGroupInstanceId());
702                    sb.append("]]></column-value></column>");
703                    sb.append(
704                            "<column><column-name>groupId</column-name><column-value><![CDATA[");
705                    sb.append(getGroupId());
706                    sb.append("]]></column-value></column>");
707                    sb.append(
708                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
709                    sb.append(getCompanyId());
710                    sb.append("]]></column-value></column>");
711                    sb.append(
712                            "<column><column-name>userId</column-name><column-value><![CDATA[");
713                    sb.append(getUserId());
714                    sb.append("]]></column-value></column>");
715                    sb.append(
716                            "<column><column-name>userName</column-name><column-value><![CDATA[");
717                    sb.append(getUserName());
718                    sb.append("]]></column-value></column>");
719                    sb.append(
720                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
721                    sb.append(getCreateDate());
722                    sb.append("]]></column-value></column>");
723                    sb.append(
724                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
725                    sb.append(getModifiedDate());
726                    sb.append("]]></column-value></column>");
727                    sb.append(
728                            "<column><column-name>classNameId</column-name><column-value><![CDATA[");
729                    sb.append(getClassNameId());
730                    sb.append("]]></column-value></column>");
731                    sb.append(
732                            "<column><column-name>classPK</column-name><column-value><![CDATA[");
733                    sb.append(getClassPK());
734                    sb.append("]]></column-value></column>");
735                    sb.append(
736                            "<column><column-name>ruleGroupId</column-name><column-value><![CDATA[");
737                    sb.append(getRuleGroupId());
738                    sb.append("]]></column-value></column>");
739                    sb.append(
740                            "<column><column-name>priority</column-name><column-value><![CDATA[");
741                    sb.append(getPriority());
742                    sb.append("]]></column-value></column>");
743    
744                    sb.append("</model>");
745    
746                    return sb.toString();
747            }
748    
749            private static ClassLoader _classLoader = MDRRuleGroupInstance.class.getClassLoader();
750            private static Class<?>[] _escapedModelInterfaces = new Class[] {
751                            MDRRuleGroupInstance.class
752                    };
753            private String _uuid;
754            private String _originalUuid;
755            private long _ruleGroupInstanceId;
756            private long _groupId;
757            private long _originalGroupId;
758            private boolean _setOriginalGroupId;
759            private long _companyId;
760            private long _userId;
761            private String _userUuid;
762            private String _userName;
763            private Date _createDate;
764            private Date _modifiedDate;
765            private long _classNameId;
766            private long _originalClassNameId;
767            private boolean _setOriginalClassNameId;
768            private long _classPK;
769            private long _originalClassPK;
770            private boolean _setOriginalClassPK;
771            private long _ruleGroupId;
772            private long _originalRuleGroupId;
773            private boolean _setOriginalRuleGroupId;
774            private int _priority;
775            private long _columnBitmask;
776            private MDRRuleGroupInstance _escapedModel;
777    }