001    /**
002     * Copyright (c) 2000-2010 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.expando.model;
016    
017    import java.io.Serializable;
018    
019    import java.util.ArrayList;
020    import java.util.List;
021    
022    /**
023     * <p>
024     * This class is used by
025     * {@link com.liferay.portlet.expando.service.http.ExpandoColumnServiceSoap}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       com.liferay.portlet.expando.service.http.ExpandoColumnServiceSoap
030     * @generated
031     */
032    public class ExpandoColumnSoap implements Serializable {
033            public static ExpandoColumnSoap toSoapModel(ExpandoColumn model) {
034                    ExpandoColumnSoap soapModel = new ExpandoColumnSoap();
035    
036                    soapModel.setColumnId(model.getColumnId());
037                    soapModel.setCompanyId(model.getCompanyId());
038                    soapModel.setTableId(model.getTableId());
039                    soapModel.setName(model.getName());
040                    soapModel.setType(model.getType());
041                    soapModel.setDefaultData(model.getDefaultData());
042                    soapModel.setTypeSettings(model.getTypeSettings());
043    
044                    return soapModel;
045            }
046    
047            public static ExpandoColumnSoap[] toSoapModels(ExpandoColumn[] models) {
048                    ExpandoColumnSoap[] soapModels = new ExpandoColumnSoap[models.length];
049    
050                    for (int i = 0; i < models.length; i++) {
051                            soapModels[i] = toSoapModel(models[i]);
052                    }
053    
054                    return soapModels;
055            }
056    
057            public static ExpandoColumnSoap[][] toSoapModels(ExpandoColumn[][] models) {
058                    ExpandoColumnSoap[][] soapModels = null;
059    
060                    if (models.length > 0) {
061                            soapModels = new ExpandoColumnSoap[models.length][models[0].length];
062                    }
063                    else {
064                            soapModels = new ExpandoColumnSoap[0][0];
065                    }
066    
067                    for (int i = 0; i < models.length; i++) {
068                            soapModels[i] = toSoapModels(models[i]);
069                    }
070    
071                    return soapModels;
072            }
073    
074            public static ExpandoColumnSoap[] toSoapModels(List<ExpandoColumn> models) {
075                    List<ExpandoColumnSoap> soapModels = new ArrayList<ExpandoColumnSoap>(models.size());
076    
077                    for (ExpandoColumn model : models) {
078                            soapModels.add(toSoapModel(model));
079                    }
080    
081                    return soapModels.toArray(new ExpandoColumnSoap[soapModels.size()]);
082            }
083    
084            public ExpandoColumnSoap() {
085            }
086    
087            public long getPrimaryKey() {
088                    return _columnId;
089            }
090    
091            public void setPrimaryKey(long pk) {
092                    setColumnId(pk);
093            }
094    
095            public long getColumnId() {
096                    return _columnId;
097            }
098    
099            public void setColumnId(long columnId) {
100                    _columnId = columnId;
101            }
102    
103            public long getCompanyId() {
104                    return _companyId;
105            }
106    
107            public void setCompanyId(long companyId) {
108                    _companyId = companyId;
109            }
110    
111            public long getTableId() {
112                    return _tableId;
113            }
114    
115            public void setTableId(long tableId) {
116                    _tableId = tableId;
117            }
118    
119            public String getName() {
120                    return _name;
121            }
122    
123            public void setName(String name) {
124                    _name = name;
125            }
126    
127            public int getType() {
128                    return _type;
129            }
130    
131            public void setType(int type) {
132                    _type = type;
133            }
134    
135            public String getDefaultData() {
136                    return _defaultData;
137            }
138    
139            public void setDefaultData(String defaultData) {
140                    _defaultData = defaultData;
141            }
142    
143            public String getTypeSettings() {
144                    return _typeSettings;
145            }
146    
147            public void setTypeSettings(String typeSettings) {
148                    _typeSettings = typeSettings;
149            }
150    
151            private long _columnId;
152            private long _companyId;
153            private long _tableId;
154            private String _name;
155            private int _type;
156            private String _defaultData;
157            private String _typeSettings;
158    }