001    /**
002     * Copyright (c) 2000-2011 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.dynamicdatamapping.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.dynamicdatamapping.service.http.DDMStructureLinkServiceSoap}.
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       com.liferay.portlet.dynamicdatamapping.service.http.DDMStructureLinkServiceSoap
027     * @generated
028     */
029    public class DDMStructureLinkSoap implements Serializable {
030            public static DDMStructureLinkSoap toSoapModel(DDMStructureLink model) {
031                    DDMStructureLinkSoap soapModel = new DDMStructureLinkSoap();
032    
033                    soapModel.setStructureLinkId(model.getStructureLinkId());
034                    soapModel.setClassNameId(model.getClassNameId());
035                    soapModel.setClassPK(model.getClassPK());
036                    soapModel.setStructureId(model.getStructureId());
037    
038                    return soapModel;
039            }
040    
041            public static DDMStructureLinkSoap[] toSoapModels(DDMStructureLink[] models) {
042                    DDMStructureLinkSoap[] soapModels = new DDMStructureLinkSoap[models.length];
043    
044                    for (int i = 0; i < models.length; i++) {
045                            soapModels[i] = toSoapModel(models[i]);
046                    }
047    
048                    return soapModels;
049            }
050    
051            public static DDMStructureLinkSoap[][] toSoapModels(
052                    DDMStructureLink[][] models) {
053                    DDMStructureLinkSoap[][] soapModels = null;
054    
055                    if (models.length > 0) {
056                            soapModels = new DDMStructureLinkSoap[models.length][models[0].length];
057                    }
058                    else {
059                            soapModels = new DDMStructureLinkSoap[0][0];
060                    }
061    
062                    for (int i = 0; i < models.length; i++) {
063                            soapModels[i] = toSoapModels(models[i]);
064                    }
065    
066                    return soapModels;
067            }
068    
069            public static DDMStructureLinkSoap[] toSoapModels(
070                    List<DDMStructureLink> models) {
071                    List<DDMStructureLinkSoap> soapModels = new ArrayList<DDMStructureLinkSoap>(models.size());
072    
073                    for (DDMStructureLink model : models) {
074                            soapModels.add(toSoapModel(model));
075                    }
076    
077                    return soapModels.toArray(new DDMStructureLinkSoap[soapModels.size()]);
078            }
079    
080            public DDMStructureLinkSoap() {
081            }
082    
083            public long getPrimaryKey() {
084                    return _structureLinkId;
085            }
086    
087            public void setPrimaryKey(long pk) {
088                    setStructureLinkId(pk);
089            }
090    
091            public long getStructureLinkId() {
092                    return _structureLinkId;
093            }
094    
095            public void setStructureLinkId(long structureLinkId) {
096                    _structureLinkId = structureLinkId;
097            }
098    
099            public long getClassNameId() {
100                    return _classNameId;
101            }
102    
103            public void setClassNameId(long classNameId) {
104                    _classNameId = classNameId;
105            }
106    
107            public long getClassPK() {
108                    return _classPK;
109            }
110    
111            public void setClassPK(long classPK) {
112                    _classPK = classPK;
113            }
114    
115            public long getStructureId() {
116                    return _structureId;
117            }
118    
119            public void setStructureId(long structureId) {
120                    _structureId = structureId;
121            }
122    
123            private long _structureLinkId;
124            private long _classNameId;
125            private long _classPK;
126            private long _structureId;
127    }