1 18 19 package sync4j.syncclient.sps.common; 20 21 import java.util.Hashtable ; 22 23 29 public abstract class FieldMetadata { 30 31 33 private String fieldName = null; 34 private String fieldType = null; 35 36 private Hashtable fieldAttributes = new Hashtable (); 37 38 40 public FieldMetadata(String fieldName, String fieldType, Hashtable fieldAttributes) throws DatabaseException { 41 42 this.fieldName = fieldName ; 43 this.fieldType = fieldType ; 44 this.fieldAttributes = fieldAttributes ; 45 46 if(!validateAttributes(fieldName, fieldType, fieldAttributes)) { 47 48 throw new DatabaseException("Error in fieldAttributes"); 49 50 } 51 52 } 53 54 56 59 public String getName() { 60 return this.fieldName; 61 } 62 63 66 public String getType() { 67 return this.fieldType; 68 69 } 70 71 74 public Hashtable getAttributes() { 75 return this.fieldAttributes; 76 } 77 78 85 86 public abstract boolean validateAttributes(String fieldName , 87 String fieldType , 88 Hashtable fieldAttributes ); 89 90 } | Popular Tags |