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

📄 user.java

📁 Java的面向对象数据库系统的源代码
💻 JAVA
字号:
// You can redistribute this software and/or modify it under the terms of// the Ozone Core 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: User.java,v 1.2 2002/06/08 00:49:38 mediumnet Exp $package org.ozoneDB.core;import java.io.*;import org.ozoneDB.DxLib.*;/** * This class represents an ozone user. Users can be identified by * its name or ID. A user can be a member of one or more user groups. *  *  * @author <a href="http://www.softwarebuero.de/">SMB</a> * @version $Revision: 1.2 $Date: 2002/06/08 00:49:38 $ * @see Group */public final class User extends DxObject implements Externalizable {        protected final static long serialVersionUID = 2;    protected final static byte subSerialVersionUID = 1;        protected int id;        protected String name;        protected String passwd;            public User() {    }        public User( String _name, int _id ) {    	this( _name, _name, _id );    }    	public User( String _name, String _passwd, int _id ) {		name = _name;		passwd = _passwd;		id = _id;	}        public String name() {        return name;    }             public Integer id() {        return new Integer( id );    }     protected int getID() {        return id;    }            public String password() {    	return passwd;    }        public boolean equals( Object obj ) {        if (this == obj) {            return true;        }         if (obj instanceof User && obj != null) {            return id == ((User)obj).id;        }         return false;    }             public Object clone() {        User user = new User();        user.name = name;        user.id = -1;        return user;    }             public String toString() {        return new String( "OzoneUser: " + name.toString() );    }             public void writeExternal( ObjectOutput out ) throws IOException {        out.writeByte( subSerialVersionUID );        out.writeObject( name );        out.writeInt( id );        out.writeObject( passwd );    }             public synchronized void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException {        byte streamVersionUID = in.readByte();        name = (String)in.readObject();        id = in.readInt();        passwd = (String)in.readObject();    } }

⌨️ 快捷键说明

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