1 7 8 package org.openejb.alt.config.sys; 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 Lookup implements java.io.Serializable { 30 31 32 36 39 private java.lang.String _jndiName; 40 41 44 private java.lang.String _jndiProviderId; 45 46 47 51 public Lookup() { 52 super(); 53 } 55 56 60 65 public java.lang.String getJndiName() 66 { 67 return this._jndiName; 68 } 70 75 public java.lang.String getJndiProviderId() 76 { 77 return this._jndiProviderId; 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 setJndiName(java.lang.String jndiName) 124 { 125 this._jndiName = jndiName; 126 } 128 133 public void setJndiProviderId(java.lang.String jndiProviderId) 134 { 135 this._jndiProviderId = jndiProviderId; 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.sys.Lookup) Unmarshaller.unmarshal(org.openejb.alt.config.sys.Lookup.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 |