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

📄 user.java

📁 shopping home JSP system
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   User.java

package com.keyshop.pub.security.model;

import com.keyshop.pub.model.PubOneToManyBean;
import java.io.PrintStream;
import java.util.*;

// Referenced classes of package com.keyshop.pub.security.model:
//            Role, UserRole

public class User extends PubOneToManyBean
{

    private String userName;
    private String password;
    private String id;
    private List roleList;
    private String category;

    public User()
    {
        roleList = new ArrayList();
        category = "0";
    }

    public void clear()
    {
        id = null;
        userName = "";
        password = "";
        roleList = new ArrayList();
        category = "0";
    }

    public void addRole(Role role)
    {
        roleList.add(role);
        role.getUserList().add(this);
    }

    public String getId()
    {
        return id;
    }

    public String getPassword()
    {
        return password;
    }

    public List getRoleList()
    {
        return roleList;
    }

    public String getUserName()
    {
        return userName;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public void setPassword(String password)
    {
        this.password = password;
    }

    public void setRoleList(List roleList)
    {
        System.out.println("RoleList = " + roleList.size());
        this.roleList = roleList;
    }

    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getCategory()
    {
        return category;
    }

    public void setCategory(String category)
    {
        this.category = category;
    }

    public boolean isRole(String role)
    {
        for(Iterator it = getChildList().iterator(); it.hasNext();)
        {
            String currentRole = ((UserRole)it.next()).getRoleId();
            if(currentRole.equals(role))
                return true;
        }

        return false;
    }
}

⌨️ 快捷键说明

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