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