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