1 7 8 package org.openejb.alt.config.ejb11; 9 10 14 import java.io.IOException ; 15 import java.io.Reader ; 16 import java.io.Serializable ; 17 import java.io.Writer ; 18 import org.exolab.castor.xml.MarshalException; 19 import org.exolab.castor.xml.Marshaller; 20 import org.exolab.castor.xml.Unmarshaller; 21 import org.exolab.castor.xml.ValidationException; 22 import org.xml.sax.ContentHandler ; 23 24 29 public class CmpField implements java.io.Serializable { 30 31 32 36 39 private java.lang.String _id; 40 41 44 private java.lang.String _description; 45 46 49 private java.lang.String _fieldName; 50 51 52 56 public CmpField() { 57 super(); 58 } 60 61 65 70 public java.lang.String getDescription() 71 { 72 return this._description; 73 } 75 80 public java.lang.String getFieldName() 81 { 82 return this._fieldName; 83 } 85 90 public java.lang.String getId() 91 { 92 return this._id; 93 } 95 98 public boolean isValid() 99 { 100 try { 101 validate(); 102 } 103 catch (org.exolab.castor.xml.ValidationException vex) { 104 return false; 105 } 106 return true; 107 } 109 114 public void marshal(java.io.Writer out) 115 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 116 { 117 118 Marshaller.marshal(this, out); 119 } 121 126 public void marshal(org.xml.sax.ContentHandler handler) 127 throws java.io.IOException , org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 128 { 129 130 Marshaller.marshal(this, handler); 131 } 133 138 public void setDescription(java.lang.String description) 139 { 140 this._description = description; 141 } 143 148 public void setFieldName(java.lang.String fieldName) 149 { 150 this._fieldName = fieldName; 151 } 153 158 public void setId(java.lang.String id) 159 { 160 this._id = id; 161 } 163 168 public static java.lang.Object unmarshal(java.io.Reader reader) 169 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 170 { 171 return (org.openejb.alt.config.ejb11.CmpField) Unmarshaller.unmarshal(org.openejb.alt.config.ejb11.CmpField.class, reader); 172 } 174 177 public void validate() 178 throws org.exolab.castor.xml.ValidationException 179 { 180 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 181 validator.validate(this); 182 } 184 } 185 | Popular Tags |