📄 user.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-2000 by SMB GmbH. All rights reserved.//// $Id: User.java,v 1.17 2000/10/28 16:55:17 daniela 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.17 $Date: 2000/10/28 16:55:17 $ * @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 ) { name = _name; passwd = name; id = _id; } public String name() { return name; } public Integer id() { return new Integer( id ); } 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 + -