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