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

📄 autoimpl.java

📁 Java的面向对象数据库系统的源代码
💻 JAVA
字号:
// $Id: AutoImpl.java,v 1.3 2003/11/23 15:19:37 per_nyfelt Exp $package odmg;import org.ozoneDB.*;import org.ozoneDB.odmg.*;/** * @author <a href="http://www.softwarebuero.de/">SMB</a> * @version $Revision: 1.3 $Date: 2003/11/23 15:19:37 $ */public class AutoImpl extends OzoneObject implements Auto, Common {        /**     * The serialization version id used by the Java serialization.     * See also the Java documentation.     */    final static long serialVersionUID = 1L;        protected String name = "Auto";        protected int age = 0;        protected Auto link;            public AutoImpl() {        // System.out.println ("Auto ctor...");    }            public AutoImpl( String _name ) throws Exception{        name = _name;    }            public boolean equals( Object obj ) {        Auto auto = (Auto)obj;        return name.equals( auto.name() );    }             public Auto doSomething() throws Exception {        EnhDatabase db = (EnhDatabase)ODMG.getDatabase2( this );        Auto auto = (Auto)db.createPersistent( AutoImpl.class );        return doSomething( auto );    }             public Auto doSomething( Auto auto ) throws Exception {        System.out.println( "doSomething(): got: " + auto.toString() + " (" + auto.getClass().getName() + ")" );        return this;    }             public void setLink( Auto auto ) {        // System.out.println ("setLink(): " + auto.toString() + " (" + auto.getClass().getName() + ")");        link = auto;    }             public Auto link() {        return link;    }             public void setName( String newName ) {        name = newName;    }             public String name() {        return name;    }             public int setAge( int newAge ) {        int old = age;        age = newAge;        return old;    }             public int age() {        return age;    }             public void print() {        System.out.println( toString() );    }             public String toString() {        // System.out.println ("toString()...");        String linkString = link != null ? String.valueOf( ((OzoneProxy)link).remoteID() ) : "null";        return "Auto: name=" + name + ", age=" + age + ", link=" + linkString;    }             public void done() throws Exception {    // System.out.println (toString() + " done.");    }     }

⌨️ 快捷键说明

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