⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ozonexupdatequery.java

📁 Java的面向对象数据库系统的源代码
💻 JAVA
字号:
// You can redistribute this software and/or modify it under the terms of
// the Ozone Library License version 1 published by ozone-db.org.
//
// The original code and portions created by SMB are
// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
//
// $Id: OzoneXUpdateQuery.java,v 1.1 2003/11/02 17:26:15 per_nyfelt Exp $

package org.ozoneDB.xml.util;

import java.io.*;

import org.w3c.dom.Node;

import org.w3c.dom.traversal.NodeFilter;
import org.infozone.tools.xml.queries.XUpdateQuery;


/**
 * @version $Revision: 1.1 $ $Date: 2003/11/02 17:26:15 $
 * @author <a href="http://www.softwarebuero.de">SMB</a>
 * @see XMLContainer
 */
public final class OzoneXUpdateQuery implements XUpdateQuery, Externalizable {

    protected final static long serialVersionUID = 1L;

    protected String			qstring;

    protected Node			rootNode;

    protected Node			namespace;

    protected NodeFilter		filter;

    protected transient XMLContainer	delegate;


    public OzoneXUpdateQuery() {
    }


    protected OzoneXUpdateQuery( XMLContainer _delegate ) {
        delegate = _delegate;
    }


    public void setQString( String _qstring ) throws Exception {
        qstring = _qstring;
    }


    public void setNamespace( Node _namespace ) throws Exception {
        namespace = _namespace;
    }


    public void setNodeFilter( NodeFilter _filter ) throws Exception {
        filter = _filter;
    }


    /**
     * Execute the XUpdate query.
     *
     * @see #execute(Node)
     */
    public void execute() throws Exception {
        execute( null );
    }


    /**
     * Execute the XUpdate query.
     *
     * @param _rootNode The node from which the query should start. A value of
     *     null specifies that the entire document should be searched.
     */
    public void execute( Node _rootNode ) throws Exception {
        rootNode = _rootNode;
        delegate.executeXUpdate( this );
    }


    public void writeExternal( ObjectOutput out ) throws IOException {
        out.writeObject( rootNode );
        out.writeObject( qstring );
        out.writeObject( namespace );
        out.writeObject( filter );
    }


    public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException {
        rootNode = (Node)in.readObject();
        qstring = (String)in.readObject();
        namespace = (Node)in.readObject();
        filter = (NodeFilter)in.readObject();
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -