FileDocCategorySizeDatePackage
Connection.javaAPI DocExample4681Sun Jul 07 09:43:06 BST 2002javajaxb.generated.config

Connection

public class Connection extends javax.xml.bind.MarshallableRootElement implements javax.xml.bind.RootElement

Fields Summary
private javajaxb.generated.config.Host
_Host
private javajaxb.generated.config.Url
_Url
Constructors Summary
Methods Summary
public booleanequals(java.lang.Object ob)

        if (this == ob) {
            return true;
        }
        if (!(ob instanceof Connection)) {
            return false;
        }
        Connection tob = ((Connection) ob);
        if (_Host!= null) {
            if (tob._Host == null) {
                return false;
            }
            if (!_Host.equals(tob._Host)) {
                return false;
            }
        } else {
            if (tob._Host!= null) {
                return false;
            }
        }
        if (_Url!= null) {
            if (tob._Url == null) {
                return false;
            }
            if (!_Url.equals(tob._Url)) {
                return false;
            }
        } else {
            if (tob._Url!= null) {
                return false;
            }
        }
        return true;
    
public javajaxb.generated.config.HostgetHost()

        return _Host;
    
public javajaxb.generated.config.UrlgetUrl()

        return _Url;
    
public inthashCode()

        int h = 0;
        h = ((127 *h)+((_Host!= null)?_Host.hashCode(): 0));
        h = ((127 *h)+((_Url!= null)?_Url.hashCode(): 0));
        return h;
    
public voidmarshal(javax.xml.bind.Marshaller m)

        XMLWriter w = m.writer();
        w.start("connection");
        m.marshal(_Host);
        m.marshal(_Url);
        w.end("connection");
    
public static javax.xml.bind.DispatchernewDispatcher()

        Dispatcher d = new Dispatcher();
        d.register("connection", (Connection.class));
        d.register("host", (Host.class));
        d.register("url", (Url.class));
        d.freezeElementNameMap();
        return d;
    
public voidsetHost(javajaxb.generated.config.Host _Host)

        this._Host = _Host;
        if (_Host == null) {
            invalidate();
        }
    
public voidsetUrl(javajaxb.generated.config.Url _Url)

        this._Url = _Url;
        if (_Url == null) {
            invalidate();
        }
    
public java.lang.StringtoString()

        StringBuffer sb = new StringBuffer("<<connection");
        if (_Host!= null) {
            sb.append(" host=");
            sb.append(_Host.toString());
        }
        if (_Url!= null) {
            sb.append(" url=");
            sb.append(_Url.toString());
        }
        sb.append(">>");
        return sb.toString();
    
public static javajaxb.generated.config.Connectionunmarshal(javax.xml.marshal.XMLScanner xs)

        return unmarshal(xs, newDispatcher());
    
public static javajaxb.generated.config.Connectionunmarshal(javax.xml.marshal.XMLScanner xs, javax.xml.bind.Dispatcher d)

        return ((Connection) d.unmarshal(xs, (Connection.class)));
    
public voidunmarshal(javax.xml.bind.Unmarshaller u)

        XMLScanner xs = u.scanner();
        Validator v = u.validator();
        xs.takeStart("connection");
        while (xs.atAttribute()) {
            String an = xs.takeAttributeName();
            throw new InvalidAttributeException(an);
        }
        _Host = ((Host) u.unmarshal());
        _Url = ((Url) u.unmarshal());
        xs.takeEnd("connection");
    
public static javajaxb.generated.config.Connectionunmarshal(java.io.InputStream in)

        return unmarshal(XMLScanner.open(in));
    
public voidvalidate(javax.xml.bind.Validator v)

        v.validate(_Host);
        v.validate(_Url);
    
public voidvalidateThis()

        if (_Host == null) {
            throw new MissingContentException("host");
        }
        if (_Url == null) {
            throw new MissingContentException("url");
        }