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.shopping.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.
024     *
025     * @author    Brian Wing Shun Chan
026     * @generated
027     */
028    public class ShoppingItemFieldSoap implements Serializable {
029            public static ShoppingItemFieldSoap toSoapModel(ShoppingItemField model) {
030                    ShoppingItemFieldSoap soapModel = new ShoppingItemFieldSoap();
031    
032                    soapModel.setItemFieldId(model.getItemFieldId());
033                    soapModel.setItemId(model.getItemId());
034                    soapModel.setName(model.getName());
035                    soapModel.setValues(model.getValues());
036                    soapModel.setDescription(model.getDescription());
037    
038                    return soapModel;
039            }
040    
041            public static ShoppingItemFieldSoap[] toSoapModels(
042                    ShoppingItemField[] models) {
043                    ShoppingItemFieldSoap[] soapModels = new ShoppingItemFieldSoap[models.length];
044    
045                    for (int i = 0; i < models.length; i++) {
046                            soapModels[i] = toSoapModel(models[i]);
047                    }
048    
049                    return soapModels;
050            }
051    
052            public static ShoppingItemFieldSoap[][] toSoapModels(
053                    ShoppingItemField[][] models) {
054                    ShoppingItemFieldSoap[][] soapModels = null;
055    
056                    if (models.length > 0) {
057                            soapModels = new ShoppingItemFieldSoap[models.length][models[0].length];
058                    }
059                    else {
060                            soapModels = new ShoppingItemFieldSoap[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 ShoppingItemFieldSoap[] toSoapModels(
071                    List<ShoppingItemField> models) {
072                    List<ShoppingItemFieldSoap> soapModels = new ArrayList<ShoppingItemFieldSoap>(models.size());
073    
074                    for (ShoppingItemField model : models) {
075                            soapModels.add(toSoapModel(model));
076                    }
077    
078                    return soapModels.toArray(new ShoppingItemFieldSoap[soapModels.size()]);
079            }
080    
081            public ShoppingItemFieldSoap() {
082            }
083    
084            public long getPrimaryKey() {
085                    return _itemFieldId;
086            }
087    
088            public void setPrimaryKey(long pk) {
089                    setItemFieldId(pk);
090            }
091    
092            public long getItemFieldId() {
093                    return _itemFieldId;
094            }
095    
096            public void setItemFieldId(long itemFieldId) {
097                    _itemFieldId = itemFieldId;
098            }
099    
100            public long getItemId() {
101                    return _itemId;
102            }
103    
104            public void setItemId(long itemId) {
105                    _itemId = itemId;
106            }
107    
108            public String getName() {
109                    return _name;
110            }
111    
112            public void setName(String name) {
113                    _name = name;
114            }
115    
116            public String getValues() {
117                    return _values;
118            }
119    
120            public void setValues(String values) {
121                    _values = values;
122            }
123    
124            public String getDescription() {
125                    return _description;
126            }
127    
128            public void setDescription(String description) {
129                    _description = description;
130            }
131    
132            private long _itemFieldId;
133            private long _itemId;
134            private String _name;
135            private String _values;
136            private String _description;
137    }