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.softwarecatalog.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.softwarecatalog.service.http.SCLicenseServiceSoap}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       com.liferay.portlet.softwarecatalog.service.http.SCLicenseServiceSoap
030     * @generated
031     */
032    public class SCLicenseSoap implements Serializable {
033            public static SCLicenseSoap toSoapModel(SCLicense model) {
034                    SCLicenseSoap soapModel = new SCLicenseSoap();
035    
036                    soapModel.setLicenseId(model.getLicenseId());
037                    soapModel.setName(model.getName());
038                    soapModel.setUrl(model.getUrl());
039                    soapModel.setOpenSource(model.getOpenSource());
040                    soapModel.setActive(model.getActive());
041                    soapModel.setRecommended(model.getRecommended());
042    
043                    return soapModel;
044            }
045    
046            public static SCLicenseSoap[] toSoapModels(SCLicense[] models) {
047                    SCLicenseSoap[] soapModels = new SCLicenseSoap[models.length];
048    
049                    for (int i = 0; i < models.length; i++) {
050                            soapModels[i] = toSoapModel(models[i]);
051                    }
052    
053                    return soapModels;
054            }
055    
056            public static SCLicenseSoap[][] toSoapModels(SCLicense[][] models) {
057                    SCLicenseSoap[][] soapModels = null;
058    
059                    if (models.length > 0) {
060                            soapModels = new SCLicenseSoap[models.length][models[0].length];
061                    }
062                    else {
063                            soapModels = new SCLicenseSoap[0][0];
064                    }
065    
066                    for (int i = 0; i < models.length; i++) {
067                            soapModels[i] = toSoapModels(models[i]);
068                    }
069    
070                    return soapModels;
071            }
072    
073            public static SCLicenseSoap[] toSoapModels(List<SCLicense> models) {
074                    List<SCLicenseSoap> soapModels = new ArrayList<SCLicenseSoap>(models.size());
075    
076                    for (SCLicense model : models) {
077                            soapModels.add(toSoapModel(model));
078                    }
079    
080                    return soapModels.toArray(new SCLicenseSoap[soapModels.size()]);
081            }
082    
083            public SCLicenseSoap() {
084            }
085    
086            public long getPrimaryKey() {
087                    return _licenseId;
088            }
089    
090            public void setPrimaryKey(long pk) {
091                    setLicenseId(pk);
092            }
093    
094            public long getLicenseId() {
095                    return _licenseId;
096            }
097    
098            public void setLicenseId(long licenseId) {
099                    _licenseId = licenseId;
100            }
101    
102            public String getName() {
103                    return _name;
104            }
105    
106            public void setName(String name) {
107                    _name = name;
108            }
109    
110            public String getUrl() {
111                    return _url;
112            }
113    
114            public void setUrl(String url) {
115                    _url = url;
116            }
117    
118            public boolean getOpenSource() {
119                    return _openSource;
120            }
121    
122            public boolean isOpenSource() {
123                    return _openSource;
124            }
125    
126            public void setOpenSource(boolean openSource) {
127                    _openSource = openSource;
128            }
129    
130            public boolean getActive() {
131                    return _active;
132            }
133    
134            public boolean isActive() {
135                    return _active;
136            }
137    
138            public void setActive(boolean active) {
139                    _active = active;
140            }
141    
142            public boolean getRecommended() {
143                    return _recommended;
144            }
145    
146            public boolean isRecommended() {
147                    return _recommended;
148            }
149    
150            public void setRecommended(boolean recommended) {
151                    _recommended = recommended;
152            }
153    
154            private long _licenseId;
155            private String _name;
156            private String _url;
157            private boolean _openSource;
158            private boolean _active;
159            private boolean _recommended;
160    }