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.ListTypeServiceSoap}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       com.liferay.portal.service.http.ListTypeServiceSoap
030     * @generated
031     */
032    public class ListTypeSoap implements Serializable {
033            public static ListTypeSoap toSoapModel(ListType model) {
034                    ListTypeSoap soapModel = new ListTypeSoap();
035    
036                    soapModel.setListTypeId(model.getListTypeId());
037                    soapModel.setName(model.getName());
038                    soapModel.setType(model.getType());
039    
040                    return soapModel;
041            }
042    
043            public static ListTypeSoap[] toSoapModels(ListType[] models) {
044                    ListTypeSoap[] soapModels = new ListTypeSoap[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 ListTypeSoap[][] toSoapModels(ListType[][] models) {
054                    ListTypeSoap[][] soapModels = null;
055    
056                    if (models.length > 0) {
057                            soapModels = new ListTypeSoap[models.length][models[0].length];
058                    }
059                    else {
060                            soapModels = new ListTypeSoap[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 ListTypeSoap[] toSoapModels(List<ListType> models) {
071                    List<ListTypeSoap> soapModels = new ArrayList<ListTypeSoap>(models.size());
072    
073                    for (ListType model : models) {
074                            soapModels.add(toSoapModel(model));
075                    }
076    
077                    return soapModels.toArray(new ListTypeSoap[soapModels.size()]);
078            }
079    
080            public ListTypeSoap() {
081            }
082    
083            public int getPrimaryKey() {
084                    return _listTypeId;
085            }
086    
087            public void setPrimaryKey(int pk) {
088                    setListTypeId(pk);
089            }
090    
091            public int getListTypeId() {
092                    return _listTypeId;
093            }
094    
095            public void setListTypeId(int listTypeId) {
096                    _listTypeId = listTypeId;
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 getType() {
108                    return _type;
109            }
110    
111            public void setType(String type) {
112                    _type = type;
113            }
114    
115            private int _listTypeId;
116            private String _name;
117            private String _type;
118    }