001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.json.JSON;
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.model.Account;
027    import com.liferay.portal.model.AccountModel;
028    import com.liferay.portal.model.AccountSoap;
029    import com.liferay.portal.model.CacheModel;
030    import com.liferay.portal.model.User;
031    import com.liferay.portal.service.ServiceContext;
032    import com.liferay.portal.service.UserLocalServiceUtil;
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 Account service. Represents a row in the "Account_" 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.AccountModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link AccountImpl}.
052     * </p>
053     *
054     * @author Brian Wing Shun Chan
055     * @see AccountImpl
056     * @see com.liferay.portal.model.Account
057     * @see com.liferay.portal.model.AccountModel
058     * @generated
059     */
060    @JSON(strict = true)
061    @ProviderType
062    public class AccountModelImpl extends BaseModelImpl<Account>
063            implements AccountModel {
064            /*
065             * NOTE FOR DEVELOPERS:
066             *
067             * Never modify or reference this class directly. All methods that expect a account model instance should use the {@link com.liferay.portal.model.Account} interface instead.
068             */
069            public static final String TABLE_NAME = "Account_";
070            public static final Object[][] TABLE_COLUMNS = {
071                            { "mvccVersion", Types.BIGINT },
072                            { "accountId", Types.BIGINT },
073                            { "companyId", Types.BIGINT },
074                            { "userId", Types.BIGINT },
075                            { "userName", Types.VARCHAR },
076                            { "createDate", Types.TIMESTAMP },
077                            { "modifiedDate", Types.TIMESTAMP },
078                            { "parentAccountId", Types.BIGINT },
079                            { "name", Types.VARCHAR },
080                            { "legalName", Types.VARCHAR },
081                            { "legalId", Types.VARCHAR },
082                            { "legalType", Types.VARCHAR },
083                            { "sicCode", Types.VARCHAR },
084                            { "tickerSymbol", Types.VARCHAR },
085                            { "industry", Types.VARCHAR },
086                            { "type_", Types.VARCHAR },
087                            { "size_", Types.VARCHAR }
088                    };
089            public static final String TABLE_SQL_CREATE = "create table Account_ (mvccVersion LONG default 0,accountId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,parentAccountId LONG,name VARCHAR(75) null,legalName VARCHAR(75) null,legalId VARCHAR(75) null,legalType VARCHAR(75) null,sicCode VARCHAR(75) null,tickerSymbol VARCHAR(75) null,industry VARCHAR(75) null,type_ VARCHAR(75) null,size_ VARCHAR(75) null)";
090            public static final String TABLE_SQL_DROP = "drop table Account_";
091            public static final String ORDER_BY_JPQL = " ORDER BY account.accountId ASC";
092            public static final String ORDER_BY_SQL = " ORDER BY Account_.accountId ASC";
093            public static final String DATA_SOURCE = "liferayDataSource";
094            public static final String SESSION_FACTORY = "liferaySessionFactory";
095            public static final String TX_MANAGER = "liferayTransactionManager";
096            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
097                                    "value.object.entity.cache.enabled.com.liferay.portal.model.Account"),
098                            true);
099            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
100                                    "value.object.finder.cache.enabled.com.liferay.portal.model.Account"),
101                            true);
102            public static final boolean COLUMN_BITMASK_ENABLED = false;
103    
104            /**
105             * Converts the soap model instance into a normal model instance.
106             *
107             * @param soapModel the soap model instance to convert
108             * @return the normal model instance
109             */
110            public static Account toModel(AccountSoap soapModel) {
111                    if (soapModel == null) {
112                            return null;
113                    }
114    
115                    Account model = new AccountImpl();
116    
117                    model.setMvccVersion(soapModel.getMvccVersion());
118                    model.setAccountId(soapModel.getAccountId());
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.setParentAccountId(soapModel.getParentAccountId());
125                    model.setName(soapModel.getName());
126                    model.setLegalName(soapModel.getLegalName());
127                    model.setLegalId(soapModel.getLegalId());
128                    model.setLegalType(soapModel.getLegalType());
129                    model.setSicCode(soapModel.getSicCode());
130                    model.setTickerSymbol(soapModel.getTickerSymbol());
131                    model.setIndustry(soapModel.getIndustry());
132                    model.setType(soapModel.getType());
133                    model.setSize(soapModel.getSize());
134    
135                    return model;
136            }
137    
138            /**
139             * Converts the soap model instances into normal model instances.
140             *
141             * @param soapModels the soap model instances to convert
142             * @return the normal model instances
143             */
144            public static List<Account> toModels(AccountSoap[] soapModels) {
145                    if (soapModels == null) {
146                            return null;
147                    }
148    
149                    List<Account> models = new ArrayList<Account>(soapModels.length);
150    
151                    for (AccountSoap soapModel : soapModels) {
152                            models.add(toModel(soapModel));
153                    }
154    
155                    return models;
156            }
157    
158            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
159                                    "lock.expiration.time.com.liferay.portal.model.Account"));
160    
161            public AccountModelImpl() {
162            }
163    
164            @Override
165            public long getPrimaryKey() {
166                    return _accountId;
167            }
168    
169            @Override
170            public void setPrimaryKey(long primaryKey) {
171                    setAccountId(primaryKey);
172            }
173    
174            @Override
175            public Serializable getPrimaryKeyObj() {
176                    return _accountId;
177            }
178    
179            @Override
180            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
181                    setPrimaryKey(((Long)primaryKeyObj).longValue());
182            }
183    
184            @Override
185            public Class<?> getModelClass() {
186                    return Account.class;
187            }
188    
189            @Override
190            public String getModelClassName() {
191                    return Account.class.getName();
192            }
193    
194            @Override
195            public Map<String, Object> getModelAttributes() {
196                    Map<String, Object> attributes = new HashMap<String, Object>();
197    
198                    attributes.put("mvccVersion", getMvccVersion());
199                    attributes.put("accountId", getAccountId());
200                    attributes.put("companyId", getCompanyId());
201                    attributes.put("userId", getUserId());
202                    attributes.put("userName", getUserName());
203                    attributes.put("createDate", getCreateDate());
204                    attributes.put("modifiedDate", getModifiedDate());
205                    attributes.put("parentAccountId", getParentAccountId());
206                    attributes.put("name", getName());
207                    attributes.put("legalName", getLegalName());
208                    attributes.put("legalId", getLegalId());
209                    attributes.put("legalType", getLegalType());
210                    attributes.put("sicCode", getSicCode());
211                    attributes.put("tickerSymbol", getTickerSymbol());
212                    attributes.put("industry", getIndustry());
213                    attributes.put("type", getType());
214                    attributes.put("size", getSize());
215    
216                    attributes.put("entityCacheEnabled", isEntityCacheEnabled());
217                    attributes.put("finderCacheEnabled", isFinderCacheEnabled());
218    
219                    return attributes;
220            }
221    
222            @Override
223            public void setModelAttributes(Map<String, Object> attributes) {
224                    Long mvccVersion = (Long)attributes.get("mvccVersion");
225    
226                    if (mvccVersion != null) {
227                            setMvccVersion(mvccVersion);
228                    }
229    
230                    Long accountId = (Long)attributes.get("accountId");
231    
232                    if (accountId != null) {
233                            setAccountId(accountId);
234                    }
235    
236                    Long companyId = (Long)attributes.get("companyId");
237    
238                    if (companyId != null) {
239                            setCompanyId(companyId);
240                    }
241    
242                    Long userId = (Long)attributes.get("userId");
243    
244                    if (userId != null) {
245                            setUserId(userId);
246                    }
247    
248                    String userName = (String)attributes.get("userName");
249    
250                    if (userName != null) {
251                            setUserName(userName);
252                    }
253    
254                    Date createDate = (Date)attributes.get("createDate");
255    
256                    if (createDate != null) {
257                            setCreateDate(createDate);
258                    }
259    
260                    Date modifiedDate = (Date)attributes.get("modifiedDate");
261    
262                    if (modifiedDate != null) {
263                            setModifiedDate(modifiedDate);
264                    }
265    
266                    Long parentAccountId = (Long)attributes.get("parentAccountId");
267    
268                    if (parentAccountId != null) {
269                            setParentAccountId(parentAccountId);
270                    }
271    
272                    String name = (String)attributes.get("name");
273    
274                    if (name != null) {
275                            setName(name);
276                    }
277    
278                    String legalName = (String)attributes.get("legalName");
279    
280                    if (legalName != null) {
281                            setLegalName(legalName);
282                    }
283    
284                    String legalId = (String)attributes.get("legalId");
285    
286                    if (legalId != null) {
287                            setLegalId(legalId);
288                    }
289    
290                    String legalType = (String)attributes.get("legalType");
291    
292                    if (legalType != null) {
293                            setLegalType(legalType);
294                    }
295    
296                    String sicCode = (String)attributes.get("sicCode");
297    
298                    if (sicCode != null) {
299                            setSicCode(sicCode);
300                    }
301    
302                    String tickerSymbol = (String)attributes.get("tickerSymbol");
303    
304                    if (tickerSymbol != null) {
305                            setTickerSymbol(tickerSymbol);
306                    }
307    
308                    String industry = (String)attributes.get("industry");
309    
310                    if (industry != null) {
311                            setIndustry(industry);
312                    }
313    
314                    String type = (String)attributes.get("type");
315    
316                    if (type != null) {
317                            setType(type);
318                    }
319    
320                    String size = (String)attributes.get("size");
321    
322                    if (size != null) {
323                            setSize(size);
324                    }
325            }
326    
327            @JSON
328            @Override
329            public long getMvccVersion() {
330                    return _mvccVersion;
331            }
332    
333            @Override
334            public void setMvccVersion(long mvccVersion) {
335                    _mvccVersion = mvccVersion;
336            }
337    
338            @JSON
339            @Override
340            public long getAccountId() {
341                    return _accountId;
342            }
343    
344            @Override
345            public void setAccountId(long accountId) {
346                    _accountId = accountId;
347            }
348    
349            @JSON
350            @Override
351            public long getCompanyId() {
352                    return _companyId;
353            }
354    
355            @Override
356            public void setCompanyId(long companyId) {
357                    _companyId = companyId;
358            }
359    
360            @JSON
361            @Override
362            public long getUserId() {
363                    return _userId;
364            }
365    
366            @Override
367            public void setUserId(long userId) {
368                    _userId = userId;
369            }
370    
371            @Override
372            public String getUserUuid() {
373                    try {
374                            User user = UserLocalServiceUtil.getUserById(getUserId());
375    
376                            return user.getUuid();
377                    }
378                    catch (PortalException pe) {
379                            return StringPool.BLANK;
380                    }
381            }
382    
383            @Override
384            public void setUserUuid(String userUuid) {
385            }
386    
387            @JSON
388            @Override
389            public String getUserName() {
390                    if (_userName == null) {
391                            return StringPool.BLANK;
392                    }
393                    else {
394                            return _userName;
395                    }
396            }
397    
398            @Override
399            public void setUserName(String userName) {
400                    _userName = userName;
401            }
402    
403            @JSON
404            @Override
405            public Date getCreateDate() {
406                    return _createDate;
407            }
408    
409            @Override
410            public void setCreateDate(Date createDate) {
411                    _createDate = createDate;
412            }
413    
414            @JSON
415            @Override
416            public Date getModifiedDate() {
417                    return _modifiedDate;
418            }
419    
420            @Override
421            public void setModifiedDate(Date modifiedDate) {
422                    _modifiedDate = modifiedDate;
423            }
424    
425            @JSON
426            @Override
427            public long getParentAccountId() {
428                    return _parentAccountId;
429            }
430    
431            @Override
432            public void setParentAccountId(long parentAccountId) {
433                    _parentAccountId = parentAccountId;
434            }
435    
436            @JSON
437            @Override
438            public String getName() {
439                    if (_name == null) {
440                            return StringPool.BLANK;
441                    }
442                    else {
443                            return _name;
444                    }
445            }
446    
447            @Override
448            public void setName(String name) {
449                    _name = name;
450            }
451    
452            @JSON
453            @Override
454            public String getLegalName() {
455                    if (_legalName == null) {
456                            return StringPool.BLANK;
457                    }
458                    else {
459                            return _legalName;
460                    }
461            }
462    
463            @Override
464            public void setLegalName(String legalName) {
465                    _legalName = legalName;
466            }
467    
468            @JSON
469            @Override
470            public String getLegalId() {
471                    if (_legalId == null) {
472                            return StringPool.BLANK;
473                    }
474                    else {
475                            return _legalId;
476                    }
477            }
478    
479            @Override
480            public void setLegalId(String legalId) {
481                    _legalId = legalId;
482            }
483    
484            @JSON
485            @Override
486            public String getLegalType() {
487                    if (_legalType == null) {
488                            return StringPool.BLANK;
489                    }
490                    else {
491                            return _legalType;
492                    }
493            }
494    
495            @Override
496            public void setLegalType(String legalType) {
497                    _legalType = legalType;
498            }
499    
500            @JSON
501            @Override
502            public String getSicCode() {
503                    if (_sicCode == null) {
504                            return StringPool.BLANK;
505                    }
506                    else {
507                            return _sicCode;
508                    }
509            }
510    
511            @Override
512            public void setSicCode(String sicCode) {
513                    _sicCode = sicCode;
514            }
515    
516            @JSON
517            @Override
518            public String getTickerSymbol() {
519                    if (_tickerSymbol == null) {
520                            return StringPool.BLANK;
521                    }
522                    else {
523                            return _tickerSymbol;
524                    }
525            }
526    
527            @Override
528            public void setTickerSymbol(String tickerSymbol) {
529                    _tickerSymbol = tickerSymbol;
530            }
531    
532            @JSON
533            @Override
534            public String getIndustry() {
535                    if (_industry == null) {
536                            return StringPool.BLANK;
537                    }
538                    else {
539                            return _industry;
540                    }
541            }
542    
543            @Override
544            public void setIndustry(String industry) {
545                    _industry = industry;
546            }
547    
548            @JSON
549            @Override
550            public String getType() {
551                    if (_type == null) {
552                            return StringPool.BLANK;
553                    }
554                    else {
555                            return _type;
556                    }
557            }
558    
559            @Override
560            public void setType(String type) {
561                    _type = type;
562            }
563    
564            @JSON
565            @Override
566            public String getSize() {
567                    if (_size == null) {
568                            return StringPool.BLANK;
569                    }
570                    else {
571                            return _size;
572                    }
573            }
574    
575            @Override
576            public void setSize(String size) {
577                    _size = size;
578            }
579    
580            @Override
581            public ExpandoBridge getExpandoBridge() {
582                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
583                            Account.class.getName(), getPrimaryKey());
584            }
585    
586            @Override
587            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
588                    ExpandoBridge expandoBridge = getExpandoBridge();
589    
590                    expandoBridge.setAttributes(serviceContext);
591            }
592    
593            @Override
594            public Account toEscapedModel() {
595                    if (_escapedModel == null) {
596                            _escapedModel = (Account)ProxyUtil.newProxyInstance(_classLoader,
597                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
598                    }
599    
600                    return _escapedModel;
601            }
602    
603            @Override
604            public Object clone() {
605                    AccountImpl accountImpl = new AccountImpl();
606    
607                    accountImpl.setMvccVersion(getMvccVersion());
608                    accountImpl.setAccountId(getAccountId());
609                    accountImpl.setCompanyId(getCompanyId());
610                    accountImpl.setUserId(getUserId());
611                    accountImpl.setUserName(getUserName());
612                    accountImpl.setCreateDate(getCreateDate());
613                    accountImpl.setModifiedDate(getModifiedDate());
614                    accountImpl.setParentAccountId(getParentAccountId());
615                    accountImpl.setName(getName());
616                    accountImpl.setLegalName(getLegalName());
617                    accountImpl.setLegalId(getLegalId());
618                    accountImpl.setLegalType(getLegalType());
619                    accountImpl.setSicCode(getSicCode());
620                    accountImpl.setTickerSymbol(getTickerSymbol());
621                    accountImpl.setIndustry(getIndustry());
622                    accountImpl.setType(getType());
623                    accountImpl.setSize(getSize());
624    
625                    accountImpl.resetOriginalValues();
626    
627                    return accountImpl;
628            }
629    
630            @Override
631            public int compareTo(Account account) {
632                    long primaryKey = account.getPrimaryKey();
633    
634                    if (getPrimaryKey() < primaryKey) {
635                            return -1;
636                    }
637                    else if (getPrimaryKey() > primaryKey) {
638                            return 1;
639                    }
640                    else {
641                            return 0;
642                    }
643            }
644    
645            @Override
646            public boolean equals(Object obj) {
647                    if (this == obj) {
648                            return true;
649                    }
650    
651                    if (!(obj instanceof Account)) {
652                            return false;
653                    }
654    
655                    Account account = (Account)obj;
656    
657                    long primaryKey = account.getPrimaryKey();
658    
659                    if (getPrimaryKey() == primaryKey) {
660                            return true;
661                    }
662                    else {
663                            return false;
664                    }
665            }
666    
667            @Override
668            public int hashCode() {
669                    return (int)getPrimaryKey();
670            }
671    
672            @Override
673            public boolean isEntityCacheEnabled() {
674                    return ENTITY_CACHE_ENABLED;
675            }
676    
677            @Override
678            public boolean isFinderCacheEnabled() {
679                    return FINDER_CACHE_ENABLED;
680            }
681    
682            @Override
683            public void resetOriginalValues() {
684            }
685    
686            @Override
687            public CacheModel<Account> toCacheModel() {
688                    AccountCacheModel accountCacheModel = new AccountCacheModel();
689    
690                    accountCacheModel.mvccVersion = getMvccVersion();
691    
692                    accountCacheModel.accountId = getAccountId();
693    
694                    accountCacheModel.companyId = getCompanyId();
695    
696                    accountCacheModel.userId = getUserId();
697    
698                    accountCacheModel.userName = getUserName();
699    
700                    String userName = accountCacheModel.userName;
701    
702                    if ((userName != null) && (userName.length() == 0)) {
703                            accountCacheModel.userName = null;
704                    }
705    
706                    Date createDate = getCreateDate();
707    
708                    if (createDate != null) {
709                            accountCacheModel.createDate = createDate.getTime();
710                    }
711                    else {
712                            accountCacheModel.createDate = Long.MIN_VALUE;
713                    }
714    
715                    Date modifiedDate = getModifiedDate();
716    
717                    if (modifiedDate != null) {
718                            accountCacheModel.modifiedDate = modifiedDate.getTime();
719                    }
720                    else {
721                            accountCacheModel.modifiedDate = Long.MIN_VALUE;
722                    }
723    
724                    accountCacheModel.parentAccountId = getParentAccountId();
725    
726                    accountCacheModel.name = getName();
727    
728                    String name = accountCacheModel.name;
729    
730                    if ((name != null) && (name.length() == 0)) {
731                            accountCacheModel.name = null;
732                    }
733    
734                    accountCacheModel.legalName = getLegalName();
735    
736                    String legalName = accountCacheModel.legalName;
737    
738                    if ((legalName != null) && (legalName.length() == 0)) {
739                            accountCacheModel.legalName = null;
740                    }
741    
742                    accountCacheModel.legalId = getLegalId();
743    
744                    String legalId = accountCacheModel.legalId;
745    
746                    if ((legalId != null) && (legalId.length() == 0)) {
747                            accountCacheModel.legalId = null;
748                    }
749    
750                    accountCacheModel.legalType = getLegalType();
751    
752                    String legalType = accountCacheModel.legalType;
753    
754                    if ((legalType != null) && (legalType.length() == 0)) {
755                            accountCacheModel.legalType = null;
756                    }
757    
758                    accountCacheModel.sicCode = getSicCode();
759    
760                    String sicCode = accountCacheModel.sicCode;
761    
762                    if ((sicCode != null) && (sicCode.length() == 0)) {
763                            accountCacheModel.sicCode = null;
764                    }
765    
766                    accountCacheModel.tickerSymbol = getTickerSymbol();
767    
768                    String tickerSymbol = accountCacheModel.tickerSymbol;
769    
770                    if ((tickerSymbol != null) && (tickerSymbol.length() == 0)) {
771                            accountCacheModel.tickerSymbol = null;
772                    }
773    
774                    accountCacheModel.industry = getIndustry();
775    
776                    String industry = accountCacheModel.industry;
777    
778                    if ((industry != null) && (industry.length() == 0)) {
779                            accountCacheModel.industry = null;
780                    }
781    
782                    accountCacheModel.type = getType();
783    
784                    String type = accountCacheModel.type;
785    
786                    if ((type != null) && (type.length() == 0)) {
787                            accountCacheModel.type = null;
788                    }
789    
790                    accountCacheModel.size = getSize();
791    
792                    String size = accountCacheModel.size;
793    
794                    if ((size != null) && (size.length() == 0)) {
795                            accountCacheModel.size = null;
796                    }
797    
798                    return accountCacheModel;
799            }
800    
801            @Override
802            public String toString() {
803                    StringBundler sb = new StringBundler(35);
804    
805                    sb.append("{mvccVersion=");
806                    sb.append(getMvccVersion());
807                    sb.append(", accountId=");
808                    sb.append(getAccountId());
809                    sb.append(", companyId=");
810                    sb.append(getCompanyId());
811                    sb.append(", userId=");
812                    sb.append(getUserId());
813                    sb.append(", userName=");
814                    sb.append(getUserName());
815                    sb.append(", createDate=");
816                    sb.append(getCreateDate());
817                    sb.append(", modifiedDate=");
818                    sb.append(getModifiedDate());
819                    sb.append(", parentAccountId=");
820                    sb.append(getParentAccountId());
821                    sb.append(", name=");
822                    sb.append(getName());
823                    sb.append(", legalName=");
824                    sb.append(getLegalName());
825                    sb.append(", legalId=");
826                    sb.append(getLegalId());
827                    sb.append(", legalType=");
828                    sb.append(getLegalType());
829                    sb.append(", sicCode=");
830                    sb.append(getSicCode());
831                    sb.append(", tickerSymbol=");
832                    sb.append(getTickerSymbol());
833                    sb.append(", industry=");
834                    sb.append(getIndustry());
835                    sb.append(", type=");
836                    sb.append(getType());
837                    sb.append(", size=");
838                    sb.append(getSize());
839                    sb.append("}");
840    
841                    return sb.toString();
842            }
843    
844            @Override
845            public String toXmlString() {
846                    StringBundler sb = new StringBundler(55);
847    
848                    sb.append("<model><model-name>");
849                    sb.append("com.liferay.portal.model.Account");
850                    sb.append("</model-name>");
851    
852                    sb.append(
853                            "<column><column-name>mvccVersion</column-name><column-value><![CDATA[");
854                    sb.append(getMvccVersion());
855                    sb.append("]]></column-value></column>");
856                    sb.append(
857                            "<column><column-name>accountId</column-name><column-value><![CDATA[");
858                    sb.append(getAccountId());
859                    sb.append("]]></column-value></column>");
860                    sb.append(
861                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
862                    sb.append(getCompanyId());
863                    sb.append("]]></column-value></column>");
864                    sb.append(
865                            "<column><column-name>userId</column-name><column-value><![CDATA[");
866                    sb.append(getUserId());
867                    sb.append("]]></column-value></column>");
868                    sb.append(
869                            "<column><column-name>userName</column-name><column-value><![CDATA[");
870                    sb.append(getUserName());
871                    sb.append("]]></column-value></column>");
872                    sb.append(
873                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
874                    sb.append(getCreateDate());
875                    sb.append("]]></column-value></column>");
876                    sb.append(
877                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
878                    sb.append(getModifiedDate());
879                    sb.append("]]></column-value></column>");
880                    sb.append(
881                            "<column><column-name>parentAccountId</column-name><column-value><![CDATA[");
882                    sb.append(getParentAccountId());
883                    sb.append("]]></column-value></column>");
884                    sb.append(
885                            "<column><column-name>name</column-name><column-value><![CDATA[");
886                    sb.append(getName());
887                    sb.append("]]></column-value></column>");
888                    sb.append(
889                            "<column><column-name>legalName</column-name><column-value><![CDATA[");
890                    sb.append(getLegalName());
891                    sb.append("]]></column-value></column>");
892                    sb.append(
893                            "<column><column-name>legalId</column-name><column-value><![CDATA[");
894                    sb.append(getLegalId());
895                    sb.append("]]></column-value></column>");
896                    sb.append(
897                            "<column><column-name>legalType</column-name><column-value><![CDATA[");
898                    sb.append(getLegalType());
899                    sb.append("]]></column-value></column>");
900                    sb.append(
901                            "<column><column-name>sicCode</column-name><column-value><![CDATA[");
902                    sb.append(getSicCode());
903                    sb.append("]]></column-value></column>");
904                    sb.append(
905                            "<column><column-name>tickerSymbol</column-name><column-value><![CDATA[");
906                    sb.append(getTickerSymbol());
907                    sb.append("]]></column-value></column>");
908                    sb.append(
909                            "<column><column-name>industry</column-name><column-value><![CDATA[");
910                    sb.append(getIndustry());
911                    sb.append("]]></column-value></column>");
912                    sb.append(
913                            "<column><column-name>type</column-name><column-value><![CDATA[");
914                    sb.append(getType());
915                    sb.append("]]></column-value></column>");
916                    sb.append(
917                            "<column><column-name>size</column-name><column-value><![CDATA[");
918                    sb.append(getSize());
919                    sb.append("]]></column-value></column>");
920    
921                    sb.append("</model>");
922    
923                    return sb.toString();
924            }
925    
926            private static final ClassLoader _classLoader = Account.class.getClassLoader();
927            private static final Class<?>[] _escapedModelInterfaces = new Class[] {
928                            Account.class
929                    };
930            private long _mvccVersion;
931            private long _accountId;
932            private long _companyId;
933            private long _userId;
934            private String _userName;
935            private Date _createDate;
936            private Date _modifiedDate;
937            private long _parentAccountId;
938            private String _name;
939            private String _legalName;
940            private String _legalId;
941            private String _legalType;
942            private String _sicCode;
943            private String _tickerSymbol;
944            private String _industry;
945            private String _type;
946            private String _size;
947            private Account _escapedModel;
948    }