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