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

📄 grantedfunctionimpl.java

📁 动态实现基于角色的权限管理Acegi+hibernate
💻 JAVA
字号:
package sample.auth;

import java.io.Serializable;

import org.acegisecurity.GrantedAuthority;

public class GrantedFunctionImpl implements GrantedFunction , Serializable{


    private String function;

    //~ Constructors ===========================================================

    public GrantedFunctionImpl(String function) {
        super();
        this.function = function;
    }

    protected GrantedFunctionImpl() {
        throw new IllegalArgumentException("Cannot use default constructor");
    }

    //~ Methods ================================================================

    public String getFunction() {
        return this.function;
    }

    public boolean equals(Object obj) {
        if (obj instanceof String) {
            return obj.equals(this.function);
        }

        if (obj instanceof GrantedFunction) {
            GrantedFunction attr = (GrantedFunction) obj;

            return this.function.equals(attr.getFunction());
        }

        return false;
    }

    public int hashCode() {
        return this.function.hashCode();
    }

    public String toString() {
        return this.function;
    }
	
	


}

⌨️ 快捷键说明

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