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.dynamicdatamapping.model;
016    
017    import java.util.ArrayList;
018    import java.util.List;
019    
020    /**
021     * @author Marcellus Tavares
022     */
023    public class DDMFormLayoutRow {
024    
025            public DDMFormLayoutRow() {
026            }
027    
028            public DDMFormLayoutRow(DDMFormLayoutRow ddmFormLayoutRow) {
029                    for (DDMFormLayoutColumn ddmFormLayoutColumn :
030                                    ddmFormLayoutRow._ddmFormLayoutColumns) {
031    
032                            addDDMFormLayoutColumn(
033                                    new DDMFormLayoutColumn(ddmFormLayoutColumn));
034                    }
035            }
036    
037            public void addDDMFormLayoutColumn(
038                    DDMFormLayoutColumn ddmFormLayoutColumn) {
039    
040                    _ddmFormLayoutColumns.add(ddmFormLayoutColumn);
041            }
042    
043            public DDMFormLayoutColumn getDDMFormLayoutColumn(int index) {
044                    return _ddmFormLayoutColumns.get(index);
045            }
046    
047            public List<DDMFormLayoutColumn> getDDMFormLayoutColumns() {
048                    return _ddmFormLayoutColumns;
049            }
050    
051            public void setDDMFormLayoutColumns(
052                    List<DDMFormLayoutColumn> ddmFormLayoutColumns) {
053    
054                    _ddmFormLayoutColumns = ddmFormLayoutColumns;
055            }
056    
057            private List<DDMFormLayoutColumn> _ddmFormLayoutColumns = new ArrayList<>();
058    
059    }