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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import java.io.Serializable;
020    
021    import java.util.ArrayList;
022    import java.util.List;
023    
024    /**
025     * This class is used by SOAP remote services, specifically {@link com.liferay.portal.service.http.ClassNameServiceSoap}.
026     *
027     * @author Brian Wing Shun Chan
028     * @see com.liferay.portal.service.http.ClassNameServiceSoap
029     * @generated
030     */
031    @ProviderType
032    public class ClassNameSoap implements Serializable {
033            public static ClassNameSoap toSoapModel(ClassName model) {
034                    ClassNameSoap soapModel = new ClassNameSoap();
035    
036                    soapModel.setMvccVersion(model.getMvccVersion());
037                    soapModel.setClassNameId(model.getClassNameId());
038                    soapModel.setValue(model.getValue());
039    
040                    return soapModel;
041            }
042    
043            public static ClassNameSoap[] toSoapModels(ClassName[] models) {
044                    ClassNameSoap[] soapModels = new ClassNameSoap[models.length];
045    
046                    for (int i = 0; i < models.length; i++) {
047                            soapModels[i] = toSoapModel(models[i]);
048                    }
049    
050                    return soapModels;
051            }
052    
053            public static ClassNameSoap[][] toSoapModels(ClassName[][] models) {
054                    ClassNameSoap[][] soapModels = null;
055    
056                    if (models.length > 0) {
057                            soapModels = new ClassNameSoap[models.length][models[0].length];
058                    }
059                    else {
060                            soapModels = new ClassNameSoap[0][0];
061                    }
062    
063                    for (int i = 0; i < models.length; i++) {
064                            soapModels[i] = toSoapModels(models[i]);
065                    }
066    
067                    return soapModels;
068            }
069    
070            public static ClassNameSoap[] toSoapModels(List<ClassName> models) {
071                    List<ClassNameSoap> soapModels = new ArrayList<ClassNameSoap>(models.size());
072    
073                    for (ClassName model : models) {
074                            soapModels.add(toSoapModel(model));
075                    }
076    
077                    return soapModels.toArray(new ClassNameSoap[soapModels.size()]);
078            }
079    
080            public ClassNameSoap() {
081            }
082    
083            public long getPrimaryKey() {
084                    return _classNameId;
085            }
086    
087            public void setPrimaryKey(long pk) {
088                    setClassNameId(pk);
089            }
090    
091            public long getMvccVersion() {
092                    return _mvccVersion;
093            }
094    
095            public void setMvccVersion(long mvccVersion) {
096                    _mvccVersion = mvccVersion;
097            }
098    
099            public long getClassNameId() {
100                    return _classNameId;
101            }
102    
103            public void setClassNameId(long classNameId) {
104                    _classNameId = classNameId;
105            }
106    
107            public String getValue() {
108                    return _value;
109            }
110    
111            public void setValue(String value) {
112                    _value = value;
113            }
114    
115            private long _mvccVersion;
116            private long _classNameId;
117            private String _value;
118    }