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