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 Query implements java.io.Serializable { 30 31 32 36 39 private java.lang.String _description; 40 41 44 private org.openejb.alt.config.ejb11.QueryMethod _queryMethod; 45 46 49 private java.lang.String _objectQl; 50 51 52 56 public Query() { 57 super(); 58 } 60 61 65 70 public java.lang.String getDescription() 71 { 72 return this._description; 73 } 75 80 public java.lang.String getObjectQl() 81 { 82 return this._objectQl; 83 } 85 90 public org.openejb.alt.config.ejb11.QueryMethod getQueryMethod() 91 { 92 return this._queryMethod; 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 setObjectQl(java.lang.String objectQl) 149 { 150 this._objectQl = objectQl; 151 } 153 158 public void setQueryMethod(org.openejb.alt.config.ejb11.QueryMethod queryMethod) 159 { 160 this._queryMethod = queryMethod; 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.Query) Unmarshaller.unmarshal(org.openejb.alt.config.ejb11.Query.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 |