1
22
23 package com.liferay.portlet.expando.model;
24
25 import java.io.Serializable;
26
27 import java.util.ArrayList;
28 import java.util.List;
29
30
47 public class ExpandoRowSoap implements Serializable {
48 public static ExpandoRowSoap toSoapModel(ExpandoRow model) {
49 ExpandoRowSoap soapModel = new ExpandoRowSoap();
50
51 soapModel.setRowId(model.getRowId());
52 soapModel.setTableId(model.getTableId());
53 soapModel.setClassPK(model.getClassPK());
54
55 return soapModel;
56 }
57
58 public static ExpandoRowSoap[] toSoapModels(ExpandoRow[] models) {
59 ExpandoRowSoap[] soapModels = new ExpandoRowSoap[models.length];
60
61 for (int i = 0; i < models.length; i++) {
62 soapModels[i] = toSoapModel(models[i]);
63 }
64
65 return soapModels;
66 }
67
68 public static ExpandoRowSoap[][] toSoapModels(ExpandoRow[][] models) {
69 ExpandoRowSoap[][] soapModels = null;
70
71 if (models.length > 0) {
72 soapModels = new ExpandoRowSoap[models.length][models[0].length];
73 }
74 else {
75 soapModels = new ExpandoRowSoap[0][0];
76 }
77
78 for (int i = 0; i < models.length; i++) {
79 soapModels[i] = toSoapModels(models[i]);
80 }
81
82 return soapModels;
83 }
84
85 public static ExpandoRowSoap[] toSoapModels(List<ExpandoRow> models) {
86 List<ExpandoRowSoap> soapModels = new ArrayList<ExpandoRowSoap>(models.size());
87
88 for (ExpandoRow model : models) {
89 soapModels.add(toSoapModel(model));
90 }
91
92 return soapModels.toArray(new ExpandoRowSoap[soapModels.size()]);
93 }
94
95 public ExpandoRowSoap() {
96 }
97
98 public long getPrimaryKey() {
99 return _rowId;
100 }
101
102 public void setPrimaryKey(long pk) {
103 setRowId(pk);
104 }
105
106 public long getRowId() {
107 return _rowId;
108 }
109
110 public void setRowId(long rowId) {
111 _rowId = rowId;
112 }
113
114 public long getTableId() {
115 return _tableId;
116 }
117
118 public void setTableId(long tableId) {
119 _tableId = tableId;
120 }
121
122 public long getClassPK() {
123 return _classPK;
124 }
125
126 public void setClassPK(long classPK) {
127 _classPK = classPK;
128 }
129
130 private long _rowId;
131 private long _tableId;
132 private long _classPK;
133 }