1 25 package org.ofbiz.datafile; 26 27 28 import java.util.ArrayList ; 29 import java.util.List ; 30 31 32 39 40 public class ModelRecord { 41 42 public static final String LIMIT_ONE = "one"; 43 public static final String LIMIT_MANY = "many"; 44 45 46 public String name = ""; 47 48 49 public String typeCode = ""; 50 51 52 public String tcMin = ""; 53 public long tcMinNum = -1; 54 55 56 public String tcMax = ""; 57 public long tcMaxNum = -1; 58 59 60 public boolean tcIsNum = true; 61 62 63 public int tcPosition = -1; 64 65 66 public int tcLength = -1; 67 68 69 public String description = ""; 70 71 72 public String parentName = ""; 73 74 75 public String limit = ""; 76 77 public ModelRecord parentRecord = null; 78 public List childRecords = new ArrayList (); 79 80 81 public List fields = new ArrayList (); 82 83 ModelField getModelField(String fieldName) { 84 for (int i = 0; i < fields.size(); i++) { 85 ModelField curField = (ModelField) fields.get(i); 86 87 if (curField.name.equals(fieldName)) { 88 return curField; 89 } 90 } 91 return null; 92 } 93 } 94 95 | Popular Tags |