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