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 QueryMethod implements java.io.Serializable { 30 31 32 36 39 private java.lang.String _methodName; 40 41 44 private org.openejb.alt.config.ejb11.MethodParams _methodParams; 45 46 47 51 public QueryMethod() { 52 super(); 53 } 55 56 60 65 public java.lang.String getMethodName() 66 { 67 return this._methodName; 68 } 70 75 public org.openejb.alt.config.ejb11.MethodParams getMethodParams() 76 { 77 return this._methodParams; 78 } 80 83 public boolean isValid() 84 { 85 try { 86 validate(); 87 } 88 catch (org.exolab.castor.xml.ValidationException vex) { 89 return false; 90 } 91 return true; 92 } 94 99 public void marshal(java.io.Writer out) 100 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 101 { 102 103 Marshaller.marshal(this, out); 104 } 106 111 public void marshal(org.xml.sax.ContentHandler handler) 112 throws java.io.IOException , org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 113 { 114 115 Marshaller.marshal(this, handler); 116 } 118 123 public void setMethodName(java.lang.String methodName) 124 { 125 this._methodName = methodName; 126 } 128 133 public void setMethodParams(org.openejb.alt.config.ejb11.MethodParams methodParams) 134 { 135 this._methodParams = methodParams; 136 } 138 143 public static java.lang.Object unmarshal(java.io.Reader reader) 144 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 145 { 146 return (org.openejb.alt.config.ejb11.QueryMethod) Unmarshaller.unmarshal(org.openejb.alt.config.ejb11.QueryMethod.class, reader); 147 } 149 152 public void validate() 153 throws org.exolab.castor.xml.ValidationException 154 { 155 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 156 validator.validate(this); 157 } 159 } 160 | Popular Tags |