📄 permissions.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: Permissions.java,v 1.14 2000/10/28 16:55:17 daniela Exp $package org.ozoneDB.core;import java.util.*;import java.io.*;import org.ozoneDB.DxLib.*;import org.ozoneDB.*;/** * Ownership and access rights of a database object (aka ObjectContainer). * * * @author <a href="http://www.softwarebuero.de/">SMB</a> * @version $Revision: 1.14 $Date: 2000/10/28 16:55:17 $ */public final class Permissions extends DxObject implements Externalizable { final static long serialVersionUID = 2; final static byte subSerialVersionUID = 1; protected int ownerID; protected byte data; /** * Constructor for readObject(). */ public Permissions() { } /** * Constructor. owner wird nicht neu erzeugt damit nur die user in * der user-tabelle im ObjectSpace existieren. */ public Permissions( User _owner, int _data ) { ownerID = _owner.id; data = (byte)_data; } public void setOwner( User user ) { ownerID = user.id; } public Object clone() { Permissions obj = new Permissions(); obj.ownerID = ownerID; obj.data = data; return obj; } public int hashCode() { int msb = data; msb = msb << 24; return ownerID | msb; } public boolean equals( Object obj ) { if (obj != null && obj instanceof Permissions) { Permissions rhs = (Permissions)obj; if (ownerID == rhs.ownerID && data == rhs.data) { return true; } } return false; } public void writeExternal( ObjectOutput out ) throws IOException { out.writeByte( subSerialVersionUID ); out.writeInt( ownerID ); out.writeByte( data ); } public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { byte streamVersionUID = in.readByte(); ownerID = in.readInt(); data = in.readByte(); } public boolean groupRead() { return (data & OzoneInterface.GroupRead) > 0; } public boolean groupLock() { return (data & OzoneInterface.GroupLock) > 0; } public boolean allRead() { return (data & OzoneInterface.AllRead) > 0; } public boolean allLock() { return (data & OzoneInterface.AllLock) > 0; } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -