1 18 19 package sync4j.syncclient.sps.common; 20 21 import java.util.Vector ; 22 23 29 public class RecordMetadata { 30 31 33 private FieldMetadata[] fieldMetadata; 34 35 37 public RecordMetadata(FieldMetadata[] fieldMetadata) { 38 this.fieldMetadata = fieldMetadata; 39 } 40 41 43 46 public FieldMetadata[] getFieldMetadata() { 47 return this.fieldMetadata; 48 } 49 50 54 public Vector getRecordFieldPosition(String searchFunction) { 55 56 57 String function = null; 58 Vector positions = null; 59 60 61 positions = new Vector (); 62 63 for (int i=0; i < this.getFieldMetadata().length; i++) { 64 65 function = (String ) this.getFieldMetadata()[i].getAttributes().get("function"); 66 67 if (function.equals(searchFunction)) { 68 positions.addElement(new Integer (i + 1)); 69 } 70 71 } 72 73 return positions; 74 75 } 76 77 } | Popular Tags |