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.portal.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.lar.StagedModelType;
021    import com.liferay.portal.kernel.util.DateUtil;
022    import com.liferay.portal.kernel.util.GetterUtil;
023    import com.liferay.portal.kernel.util.ProxyUtil;
024    import com.liferay.portal.kernel.util.StringBundler;
025    import com.liferay.portal.kernel.util.StringPool;
026    import com.liferay.portal.kernel.util.Validator;
027    import com.liferay.portal.model.CacheModel;
028    import com.liferay.portal.model.Website;
029    import com.liferay.portal.model.WebsiteModel;
030    import com.liferay.portal.model.WebsiteSoap;
031    import com.liferay.portal.service.ServiceContext;
032    import com.liferay.portal.util.PortalUtil;
033    
034    import com.liferay.portlet.expando.model.ExpandoBridge;
035    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
036    
037    import java.io.Serializable;
038    
039    import java.sql.Types;
040    
041    import java.util.ArrayList;
042    import java.util.Date;
043    import java.util.HashMap;
044    import java.util.List;
045    import java.util.Map;
046    
047    /**
048     * The base model implementation for the Website service. Represents a row in the "Website" database table, with each column mapped to a property of this class.
049     *
050     * <p>
051     * This implementation and its corresponding interface {@link com.liferay.portal.model.WebsiteModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link WebsiteImpl}.
052     * </p>
053     *
054     * @author Brian Wing Shun Chan
055     * @see WebsiteImpl
056     * @see com.liferay.portal.model.Website
057     * @see com.liferay.portal.model.WebsiteModel
058     * @generated
059     */
060    @JSON(strict = true)
061    public class WebsiteModelImpl extends BaseModelImpl<Website>
062            implements WebsiteModel {
063            /*
064             * NOTE FOR DEVELOPERS:
065             *
066             * Never modify or reference this class directly. All methods that expect a website model instance should use the {@link com.liferay.portal.model.Website} interface instead.
067             */
068            public static final String TABLE_NAME = "Website";
069            public static final Object[][] TABLE_COLUMNS = {
070                            { "uuid_", Types.VARCHAR },
071                            { "websiteId", 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                            { "url", Types.VARCHAR },
080                            { "typeId", Types.INTEGER },
081                            { "primary_", Types.BOOLEAN }
082                    };
083            public static final String TABLE_SQL_CREATE = "create table Website (uuid_ VARCHAR(75) null,websiteId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,classNameId LONG,classPK LONG,url STRING null,typeId INTEGER,primary_ BOOLEAN)";
084            public static final String TABLE_SQL_DROP = "drop table Website";
085            public static final String ORDER_BY_JPQL = " ORDER BY website.createDate ASC";
086            public static final String ORDER_BY_SQL = " ORDER BY Website.createDate ASC";
087            public static final String DATA_SOURCE = "liferayDataSource";
088            public static final String SESSION_FACTORY = "liferaySessionFactory";
089            public static final String TX_MANAGER = "liferayTransactionManager";
090            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
091                                    "value.object.entity.cache.enabled.com.liferay.portal.model.Website"),
092                            true);
093            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
094                                    "value.object.finder.cache.enabled.com.liferay.portal.model.Website"),
095                            true);
096            public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
097                                    "value.object.column.bitmask.enabled.com.liferay.portal.model.Website"),
098                            true);
099            public static long CLASSNAMEID_COLUMN_BITMASK = 1L;
100            public static long CLASSPK_COLUMN_BITMASK = 2L;
101            public static long COMPANYID_COLUMN_BITMASK = 4L;
102            public static long PRIMARY_COLUMN_BITMASK = 8L;
103            public static long USERID_COLUMN_BITMASK = 16L;
104            public static long UUID_COLUMN_BITMASK = 32L;
105            public static long CREATEDATE_COLUMN_BITMASK = 64L;
106    
107            /**
108             * Converts the soap model instance into a normal model instance.
109             *
110             * @param soapModel the soap model instance to convert
111             * @return the normal model instance
112             */
113            public static Website toModel(WebsiteSoap soapModel) {
114                    if (soapModel == null) {
115                            return null;
116                    }
117    
118                    Website model = new WebsiteImpl();
119    
120                    model.setUuid(soapModel.getUuid());
121                    model.setWebsiteId(soapModel.getWebsiteId());
122                    model.setCompanyId(soapModel.getCompanyId());
123                    model.setUserId(soapModel.getUserId());
124                    model.setUserName(soapModel.getUserName());
125                    model.setCreateDate(soapModel.getCreateDate());
126                    model.setModifiedDate(soapModel.getModifiedDate());
127                    model.setClassNameId(soapModel.getClassNameId());
128                    model.setClassPK(soapModel.getClassPK());
129                    model.setUrl(soapModel.getUrl());
130                    model.setTypeId(soapModel.getTypeId());
131                    model.setPrimary(soapModel.getPrimary());
132    
133                    return model;
134            }
135    
136            /**
137             * Converts the soap model instances into normal model instances.
138             *
139             * @param soapModels the soap model instances to convert
140             * @return the normal model instances
141             */
142            public static List<Website> toModels(WebsiteSoap[] soapModels) {
143                    if (soapModels == null) {
144                            return null;
145                    }
146    
147                    List<Website> models = new ArrayList<Website>(soapModels.length);
148    
149                    for (WebsiteSoap soapModel : soapModels) {
150                            models.add(toModel(soapModel));
151                    }
152    
153                    return models;
154            }
155    
156            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
157                                    "lock.expiration.time.com.liferay.portal.model.Website"));
158    
159            public WebsiteModelImpl() {
160            }
161    
162            @Override
163            public long getPrimaryKey() {
164                    return _websiteId;
165            }
166    
167            @Override
168            public void setPrimaryKey(long primaryKey) {
169                    setWebsiteId(primaryKey);
170            }
171    
172            @Override
173            public Serializable getPrimaryKeyObj() {
174                    return _websiteId;
175            }
176    
177            @Override
178            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
179                    setPrimaryKey(((Long)primaryKeyObj).longValue());
180            }
181    
182            @Override
183            public Class<?> getModelClass() {
184                    return Website.class;
185            }
186    
187            @Override
188            public String getModelClassName() {
189                    return Website.class.getName();
190            }
191    
192            @Override
193            public Map<String, Object> getModelAttributes() {
194                    Map<String, Object> attributes = new HashMap<String, Object>();
195    
196                    attributes.put("uuid", getUuid());
197                    attributes.put("websiteId", getWebsiteId());
198                    attributes.put("companyId", getCompanyId());
199                    attributes.put("userId", getUserId());
200                    attributes.put("userName", getUserName());
201                    attributes.put("createDate", getCreateDate());
202                    attributes.put("modifiedDate", getModifiedDate());
203                    attributes.put("classNameId", getClassNameId());
204                    attributes.put("classPK", getClassPK());
205                    attributes.put("url", getUrl());
206                    attributes.put("typeId", getTypeId());
207                    attributes.put("primary", getPrimary());
208    
209                    return attributes;
210            }
211    
212            @Override
213            public void setModelAttributes(Map<String, Object> attributes) {
214                    String uuid = (String)attributes.get("uuid");
215    
216                    if (uuid != null) {
217                            setUuid(uuid);
218                    }
219    
220                    Long websiteId = (Long)attributes.get("websiteId");
221    
222                    if (websiteId != null) {
223                            setWebsiteId(websiteId);
224                    }
225    
226                    Long companyId = (Long)attributes.get("companyId");
227    
228                    if (companyId != null) {
229                            setCompanyId(companyId);
230                    }
231    
232                    Long userId = (Long)attributes.get("userId");
233    
234                    if (userId != null) {
235                            setUserId(userId);
236                    }
237    
238                    String userName = (String)attributes.get("userName");
239    
240                    if (userName != null) {
241                            setUserName(userName);
242                    }
243    
244                    Date createDate = (Date)attributes.get("createDate");
245    
246                    if (createDate != null) {
247                            setCreateDate(createDate);
248                    }
249    
250                    Date modifiedDate = (Date)attributes.get("modifiedDate");
251    
252                    if (modifiedDate != null) {
253                            setModifiedDate(modifiedDate);
254                    }
255    
256                    Long classNameId = (Long)attributes.get("classNameId");
257    
258                    if (classNameId != null) {
259                            setClassNameId(classNameId);
260                    }
261    
262                    Long classPK = (Long)attributes.get("classPK");
263    
264                    if (classPK != null) {
265                            setClassPK(classPK);
266                    }
267    
268                    String url = (String)attributes.get("url");
269    
270                    if (url != null) {
271                            setUrl(url);
272                    }
273    
274                    Integer typeId = (Integer)attributes.get("typeId");
275    
276                    if (typeId != null) {
277                            setTypeId(typeId);
278                    }
279    
280                    Boolean primary = (Boolean)attributes.get("primary");
281    
282                    if (primary != null) {
283                            setPrimary(primary);
284                    }
285            }
286    
287            @JSON
288            @Override
289            public String getUuid() {
290                    if (_uuid == null) {
291                            return StringPool.BLANK;
292                    }
293                    else {
294                            return _uuid;
295                    }
296            }
297    
298            @Override
299            public void setUuid(String uuid) {
300                    if (_originalUuid == null) {
301                            _originalUuid = _uuid;
302                    }
303    
304                    _uuid = uuid;
305            }
306    
307            public String getOriginalUuid() {
308                    return GetterUtil.getString(_originalUuid);
309            }
310    
311            @JSON
312            @Override
313            public long getWebsiteId() {
314                    return _websiteId;
315            }
316    
317            @Override
318            public void setWebsiteId(long websiteId) {
319                    _websiteId = websiteId;
320            }
321    
322            @JSON
323            @Override
324            public long getCompanyId() {
325                    return _companyId;
326            }
327    
328            @Override
329            public void setCompanyId(long companyId) {
330                    _columnBitmask |= COMPANYID_COLUMN_BITMASK;
331    
332                    if (!_setOriginalCompanyId) {
333                            _setOriginalCompanyId = true;
334    
335                            _originalCompanyId = _companyId;
336                    }
337    
338                    _companyId = companyId;
339            }
340    
341            public long getOriginalCompanyId() {
342                    return _originalCompanyId;
343            }
344    
345            @JSON
346            @Override
347            public long getUserId() {
348                    return _userId;
349            }
350    
351            @Override
352            public void setUserId(long userId) {
353                    _columnBitmask |= USERID_COLUMN_BITMASK;
354    
355                    if (!_setOriginalUserId) {
356                            _setOriginalUserId = true;
357    
358                            _originalUserId = _userId;
359                    }
360    
361                    _userId = userId;
362            }
363    
364            @Override
365            public String getUserUuid() throws SystemException {
366                    return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
367            }
368    
369            @Override
370            public void setUserUuid(String userUuid) {
371                    _userUuid = userUuid;
372            }
373    
374            public long getOriginalUserId() {
375                    return _originalUserId;
376            }
377    
378            @JSON
379            @Override
380            public String getUserName() {
381                    if (_userName == null) {
382                            return StringPool.BLANK;
383                    }
384                    else {
385                            return _userName;
386                    }
387            }
388    
389            @Override
390            public void setUserName(String userName) {
391                    _userName = userName;
392            }
393    
394            @JSON
395            @Override
396            public Date getCreateDate() {
397                    return _createDate;
398            }
399    
400            @Override
401            public void setCreateDate(Date createDate) {
402                    _columnBitmask = -1L;
403    
404                    _createDate = createDate;
405            }
406    
407            @JSON
408            @Override
409            public Date getModifiedDate() {
410                    return _modifiedDate;
411            }
412    
413            @Override
414            public void setModifiedDate(Date modifiedDate) {
415                    _modifiedDate = modifiedDate;
416            }
417    
418            @Override
419            public String getClassName() {
420                    if (getClassNameId() <= 0) {
421                            return StringPool.BLANK;
422                    }
423    
424                    return PortalUtil.getClassName(getClassNameId());
425            }
426    
427            @Override
428            public void setClassName(String className) {
429                    long classNameId = 0;
430    
431                    if (Validator.isNotNull(className)) {
432                            classNameId = PortalUtil.getClassNameId(className);
433                    }
434    
435                    setClassNameId(classNameId);
436            }
437    
438            @JSON
439            @Override
440            public long getClassNameId() {
441                    return _classNameId;
442            }
443    
444            @Override
445            public void setClassNameId(long classNameId) {
446                    _columnBitmask |= CLASSNAMEID_COLUMN_BITMASK;
447    
448                    if (!_setOriginalClassNameId) {
449                            _setOriginalClassNameId = true;
450    
451                            _originalClassNameId = _classNameId;
452                    }
453    
454                    _classNameId = classNameId;
455            }
456    
457            public long getOriginalClassNameId() {
458                    return _originalClassNameId;
459            }
460    
461            @JSON
462            @Override
463            public long getClassPK() {
464                    return _classPK;
465            }
466    
467            @Override
468            public void setClassPK(long classPK) {
469                    _columnBitmask |= CLASSPK_COLUMN_BITMASK;
470    
471                    if (!_setOriginalClassPK) {
472                            _setOriginalClassPK = true;
473    
474                            _originalClassPK = _classPK;
475                    }
476    
477                    _classPK = classPK;
478            }
479    
480            public long getOriginalClassPK() {
481                    return _originalClassPK;
482            }
483    
484            @JSON
485            @Override
486            public String getUrl() {
487                    if (_url == null) {
488                            return StringPool.BLANK;
489                    }
490                    else {
491                            return _url;
492                    }
493            }
494    
495            @Override
496            public void setUrl(String url) {
497                    _url = url;
498            }
499    
500            @JSON
501            @Override
502            public int getTypeId() {
503                    return _typeId;
504            }
505    
506            @Override
507            public void setTypeId(int typeId) {
508                    _typeId = typeId;
509            }
510    
511            @JSON
512            @Override
513            public boolean getPrimary() {
514                    return _primary;
515            }
516    
517            @Override
518            public boolean isPrimary() {
519                    return _primary;
520            }
521    
522            @Override
523            public void setPrimary(boolean primary) {
524                    _columnBitmask |= PRIMARY_COLUMN_BITMASK;
525    
526                    if (!_setOriginalPrimary) {
527                            _setOriginalPrimary = true;
528    
529                            _originalPrimary = _primary;
530                    }
531    
532                    _primary = primary;
533            }
534    
535            public boolean getOriginalPrimary() {
536                    return _originalPrimary;
537            }
538    
539            @Override
540            public StagedModelType getStagedModelType() {
541                    return new StagedModelType(PortalUtil.getClassNameId(
542                                    Website.class.getName()), getClassNameId());
543            }
544    
545            public long getColumnBitmask() {
546                    return _columnBitmask;
547            }
548    
549            @Override
550            public ExpandoBridge getExpandoBridge() {
551                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
552                            Website.class.getName(), getPrimaryKey());
553            }
554    
555            @Override
556            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
557                    ExpandoBridge expandoBridge = getExpandoBridge();
558    
559                    expandoBridge.setAttributes(serviceContext);
560            }
561    
562            @Override
563            public Website toEscapedModel() {
564                    if (_escapedModel == null) {
565                            _escapedModel = (Website)ProxyUtil.newProxyInstance(_classLoader,
566                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
567                    }
568    
569                    return _escapedModel;
570            }
571    
572            @Override
573            public Object clone() {
574                    WebsiteImpl websiteImpl = new WebsiteImpl();
575    
576                    websiteImpl.setUuid(getUuid());
577                    websiteImpl.setWebsiteId(getWebsiteId());
578                    websiteImpl.setCompanyId(getCompanyId());
579                    websiteImpl.setUserId(getUserId());
580                    websiteImpl.setUserName(getUserName());
581                    websiteImpl.setCreateDate(getCreateDate());
582                    websiteImpl.setModifiedDate(getModifiedDate());
583                    websiteImpl.setClassNameId(getClassNameId());
584                    websiteImpl.setClassPK(getClassPK());
585                    websiteImpl.setUrl(getUrl());
586                    websiteImpl.setTypeId(getTypeId());
587                    websiteImpl.setPrimary(getPrimary());
588    
589                    websiteImpl.resetOriginalValues();
590    
591                    return websiteImpl;
592            }
593    
594            @Override
595            public int compareTo(Website website) {
596                    int value = 0;
597    
598                    value = DateUtil.compareTo(getCreateDate(), website.getCreateDate());
599    
600                    if (value != 0) {
601                            return value;
602                    }
603    
604                    return 0;
605            }
606    
607            @Override
608            public boolean equals(Object obj) {
609                    if (this == obj) {
610                            return true;
611                    }
612    
613                    if (!(obj instanceof Website)) {
614                            return false;
615                    }
616    
617                    Website website = (Website)obj;
618    
619                    long primaryKey = website.getPrimaryKey();
620    
621                    if (getPrimaryKey() == primaryKey) {
622                            return true;
623                    }
624                    else {
625                            return false;
626                    }
627            }
628    
629            @Override
630            public int hashCode() {
631                    return (int)getPrimaryKey();
632            }
633    
634            @Override
635            public void resetOriginalValues() {
636                    WebsiteModelImpl websiteModelImpl = this;
637    
638                    websiteModelImpl._originalUuid = websiteModelImpl._uuid;
639    
640                    websiteModelImpl._originalCompanyId = websiteModelImpl._companyId;
641    
642                    websiteModelImpl._setOriginalCompanyId = false;
643    
644                    websiteModelImpl._originalUserId = websiteModelImpl._userId;
645    
646                    websiteModelImpl._setOriginalUserId = false;
647    
648                    websiteModelImpl._originalClassNameId = websiteModelImpl._classNameId;
649    
650                    websiteModelImpl._setOriginalClassNameId = false;
651    
652                    websiteModelImpl._originalClassPK = websiteModelImpl._classPK;
653    
654                    websiteModelImpl._setOriginalClassPK = false;
655    
656                    websiteModelImpl._originalPrimary = websiteModelImpl._primary;
657    
658                    websiteModelImpl._setOriginalPrimary = false;
659    
660                    websiteModelImpl._columnBitmask = 0;
661            }
662    
663            @Override
664            public CacheModel<Website> toCacheModel() {
665                    WebsiteCacheModel websiteCacheModel = new WebsiteCacheModel();
666    
667                    websiteCacheModel.uuid = getUuid();
668    
669                    String uuid = websiteCacheModel.uuid;
670    
671                    if ((uuid != null) && (uuid.length() == 0)) {
672                            websiteCacheModel.uuid = null;
673                    }
674    
675                    websiteCacheModel.websiteId = getWebsiteId();
676    
677                    websiteCacheModel.companyId = getCompanyId();
678    
679                    websiteCacheModel.userId = getUserId();
680    
681                    websiteCacheModel.userName = getUserName();
682    
683                    String userName = websiteCacheModel.userName;
684    
685                    if ((userName != null) && (userName.length() == 0)) {
686                            websiteCacheModel.userName = null;
687                    }
688    
689                    Date createDate = getCreateDate();
690    
691                    if (createDate != null) {
692                            websiteCacheModel.createDate = createDate.getTime();
693                    }
694                    else {
695                            websiteCacheModel.createDate = Long.MIN_VALUE;
696                    }
697    
698                    Date modifiedDate = getModifiedDate();
699    
700                    if (modifiedDate != null) {
701                            websiteCacheModel.modifiedDate = modifiedDate.getTime();
702                    }
703                    else {
704                            websiteCacheModel.modifiedDate = Long.MIN_VALUE;
705                    }
706    
707                    websiteCacheModel.classNameId = getClassNameId();
708    
709                    websiteCacheModel.classPK = getClassPK();
710    
711                    websiteCacheModel.url = getUrl();
712    
713                    String url = websiteCacheModel.url;
714    
715                    if ((url != null) && (url.length() == 0)) {
716                            websiteCacheModel.url = null;
717                    }
718    
719                    websiteCacheModel.typeId = getTypeId();
720    
721                    websiteCacheModel.primary = getPrimary();
722    
723                    return websiteCacheModel;
724            }
725    
726            @Override
727            public String toString() {
728                    StringBundler sb = new StringBundler(25);
729    
730                    sb.append("{uuid=");
731                    sb.append(getUuid());
732                    sb.append(", websiteId=");
733                    sb.append(getWebsiteId());
734                    sb.append(", companyId=");
735                    sb.append(getCompanyId());
736                    sb.append(", userId=");
737                    sb.append(getUserId());
738                    sb.append(", userName=");
739                    sb.append(getUserName());
740                    sb.append(", createDate=");
741                    sb.append(getCreateDate());
742                    sb.append(", modifiedDate=");
743                    sb.append(getModifiedDate());
744                    sb.append(", classNameId=");
745                    sb.append(getClassNameId());
746                    sb.append(", classPK=");
747                    sb.append(getClassPK());
748                    sb.append(", url=");
749                    sb.append(getUrl());
750                    sb.append(", typeId=");
751                    sb.append(getTypeId());
752                    sb.append(", primary=");
753                    sb.append(getPrimary());
754                    sb.append("}");
755    
756                    return sb.toString();
757            }
758    
759            @Override
760            public String toXmlString() {
761                    StringBundler sb = new StringBundler(40);
762    
763                    sb.append("<model><model-name>");
764                    sb.append("com.liferay.portal.model.Website");
765                    sb.append("</model-name>");
766    
767                    sb.append(
768                            "<column><column-name>uuid</column-name><column-value><![CDATA[");
769                    sb.append(getUuid());
770                    sb.append("]]></column-value></column>");
771                    sb.append(
772                            "<column><column-name>websiteId</column-name><column-value><![CDATA[");
773                    sb.append(getWebsiteId());
774                    sb.append("]]></column-value></column>");
775                    sb.append(
776                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
777                    sb.append(getCompanyId());
778                    sb.append("]]></column-value></column>");
779                    sb.append(
780                            "<column><column-name>userId</column-name><column-value><![CDATA[");
781                    sb.append(getUserId());
782                    sb.append("]]></column-value></column>");
783                    sb.append(
784                            "<column><column-name>userName</column-name><column-value><![CDATA[");
785                    sb.append(getUserName());
786                    sb.append("]]></column-value></column>");
787                    sb.append(
788                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
789                    sb.append(getCreateDate());
790                    sb.append("]]></column-value></column>");
791                    sb.append(
792                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
793                    sb.append(getModifiedDate());
794                    sb.append("]]></column-value></column>");
795                    sb.append(
796                            "<column><column-name>classNameId</column-name><column-value><![CDATA[");
797                    sb.append(getClassNameId());
798                    sb.append("]]></column-value></column>");
799                    sb.append(
800                            "<column><column-name>classPK</column-name><column-value><![CDATA[");
801                    sb.append(getClassPK());
802                    sb.append("]]></column-value></column>");
803                    sb.append(
804                            "<column><column-name>url</column-name><column-value><![CDATA[");
805                    sb.append(getUrl());
806                    sb.append("]]></column-value></column>");
807                    sb.append(
808                            "<column><column-name>typeId</column-name><column-value><![CDATA[");
809                    sb.append(getTypeId());
810                    sb.append("]]></column-value></column>");
811                    sb.append(
812                            "<column><column-name>primary</column-name><column-value><![CDATA[");
813                    sb.append(getPrimary());
814                    sb.append("]]></column-value></column>");
815    
816                    sb.append("</model>");
817    
818                    return sb.toString();
819            }
820    
821            private static ClassLoader _classLoader = Website.class.getClassLoader();
822            private static Class<?>[] _escapedModelInterfaces = new Class[] {
823                            Website.class
824                    };
825            private String _uuid;
826            private String _originalUuid;
827            private long _websiteId;
828            private long _companyId;
829            private long _originalCompanyId;
830            private boolean _setOriginalCompanyId;
831            private long _userId;
832            private String _userUuid;
833            private long _originalUserId;
834            private boolean _setOriginalUserId;
835            private String _userName;
836            private Date _createDate;
837            private Date _modifiedDate;
838            private long _classNameId;
839            private long _originalClassNameId;
840            private boolean _setOriginalClassNameId;
841            private long _classPK;
842            private long _originalClassPK;
843            private boolean _setOriginalClassPK;
844            private String _url;
845            private int _typeId;
846            private boolean _primary;
847            private boolean _originalPrimary;
848            private boolean _setOriginalPrimary;
849            private long _columnBitmask;
850            private Website _escapedModel;
851    }