| 1 | |
package org.restafarian.core.beans; |
| 2 | |
|
| 3 | |
import java.util.ArrayList; |
| 4 | |
import java.util.List; |
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | 1 | public class LookupTable extends PersistentBeanBase { |
| 10 | |
private static final long serialVersionUID = 1; |
| 11 | 1 | private String id = null; |
| 12 | 1 | private String name = null; |
| 13 | 1 | private String description = null; |
| 14 | 1 | private List properties = null; |
| 15 | |
|
| 16 | |
public void addProperty(LookupTableProperty lookupTableProperty) { |
| 17 | 0 | if (properties == null) { |
| 18 | 0 | properties = new ArrayList(); |
| 19 | |
} |
| 20 | 0 | lookupTableProperty.setTableId(id); |
| 21 | 0 | lookupTableProperty.setSequence(properties.size()); |
| 22 | 0 | properties.add(lookupTableProperty); |
| 23 | 0 | } |
| 24 | |
|
| 25 | |
public LookupTableProperty getProperty(int sequence) { |
| 26 | 0 | LookupTableProperty lookupTableProperty = null; |
| 27 | |
|
| 28 | 0 | if (properties != null && properties.size() > sequence) { |
| 29 | 0 | lookupTableProperty = (LookupTableProperty) properties.get(sequence); |
| 30 | |
} |
| 31 | |
|
| 32 | 0 | return lookupTableProperty; |
| 33 | |
} |
| 34 | |
|
| 35 | |
public void setProperty(int sequence, LookupTableProperty lookupTableProperty) { |
| 36 | 0 | if (properties != null && properties.size() > sequence) { |
| 37 | 0 | properties.set(sequence, lookupTableProperty); |
| 38 | |
} |
| 39 | 0 | } |
| 40 | |
|
| 41 | |
public String getDescription() { |
| 42 | 0 | return description; |
| 43 | |
} |
| 44 | |
|
| 45 | |
public void setDescription(String description) { |
| 46 | 1 | this.description = description; |
| 47 | 1 | } |
| 48 | |
|
| 49 | |
public String getId() { |
| 50 | 0 | return id; |
| 51 | |
} |
| 52 | |
|
| 53 | |
public void setId(String id) { |
| 54 | 1 | this.id = id; |
| 55 | 1 | } |
| 56 | |
|
| 57 | |
public String getName() { |
| 58 | 1 | return name; |
| 59 | |
} |
| 60 | |
|
| 61 | |
public void setName(String name) { |
| 62 | 1 | this.name = name; |
| 63 | 1 | } |
| 64 | |
|
| 65 | |
public List getProperties() { |
| 66 | 0 | return properties; |
| 67 | |
} |
| 68 | |
|
| 69 | |
public void setProperties(List properties) { |
| 70 | 0 | this.properties = properties; |
| 71 | 0 | } |
| 72 | |
} |