gt: 				return columnList == null ? true : !columnList.contains(column);
context: package com.future.pos.users;
  
  import java.io.File;
  import java.io.FileNotFoundException;
  import java.util.List;
  import java.util.Map;
  import java.util.Scanner;
  
  import javax.servlet.http.HttpServletRequest;
  
  import com.future.pos.generic.GenericExtended;
  import com.future.pos.login.Password;
  import com.future.pos.login.Username;
  import com.future.pos.security.SecurityPermission;
  import com.future.pos.security.SecurityUtilities;
  import com.future.pos.util.RequestUtilities;
  import com.future.pos.util.SystemAction;
  import com.future.pos.util.SystemInitializer;
  
  /**
   * This is the main object for the user of the system.<br>
   * The user has three account types: Basic, Extended and Full.
   * 
   * @author Victorio Cebedo II
   * 
   */
  public class User extends GenericExtended {
  
  	public static final String FILEPATH_ROLES = "/WEB-INF/roles/";
  
  	public static final int ACCOUNT_TYPE_BASIC = 1;
  	public static final int ACCOUNT_TYPE_EXTENDED = 2;
  	public static final int ACCOUNT_TYPE_FULL = 3;
  	public static final int ACCOUNT_TYPE_CASHIER = 4;
  
  	public String userName;
  	public String password;
  	public static int accountType;
  
  	private String accountName;
  
  	/**
  	 * AccountType is part of the main security in the system.
  	 * 
  	 * @author Victorio Cebedo II
  	 * 
  	 */
  	public enum AccountType {
  		BASIC(ACCOUNT_TYPE_BASIC), EXTENDED(ACCOUNT_TYPE_EXTENDED), FULL(
  				ACCOUNT_TYPE_FULL), CASHIER(ACCOUNT_TYPE_CASHIER);
  
  		private final int ID;
  
  		AccountType(int ID) {
  			this.ID = ID;
  		}
  
  		public int getID() {
  			return ID;
  		}
  	}
  
  	public User() {
  		;
  	}
  
  	public User(Username usernameObj, Password passwordObj) {
  		;
  	}
  
  	public String getAccountName() {
  		return accountName;
  	}
  
  	public void setAccountName(String accountName) {
  		this.accountName = accountName;
  	}
  
  	/**
  	 * Get the user's account type.
  	 * 
  	 * @return
  	 */
  	public static int getAccountType() {
  		return accountType;
  	}
  
  	/**
  	 * Set the account type.
  	 * 
  	 * @param accountType
  	 */
  	public void setAccountType(int accountType) {
  		User.accountType = accountType;
  	}
  
  	public String getUserName() {
  		return userName;
  	}
  
  	public void setUserName(String userName) {
  		this.userName = userName;
  	}
  
  	public String getPassword() {
  		return password;
  	}
  
  	public void setPassword(String password) {
  		this.password = password;
  	}
  
  	public boolean isValid() {
  		// TODO Auto-generated method stub
  		return true;
  	}
  
  	public boolean canExecute(SystemAction action, String schemaTable) {
  		if (isSuperAdmin()) {
  			return true;
  		}
  		// Check only CRUD requests.
  		if (action.isCreate() || action.isRead() || action.isUpdate()
  				|| action.isDelete() || action.isSelectAll()) {
  
  			// Get list of permissions.
  			List<Integer> actions = SecurityUtilities.getTableAllowedActions(
  					getAccountType(), schemaTable);
  
  			// If null, return false.
  			if (actions == null) {
  				return false;
  			}
  
  			// Loop through each action.
  			for (Integer sysAction : actions) {
  
  				// If action is found in map, return true.
  				if (action.getID() == sysAction) {
  					return true;
  				}
  			}
  			return false;
  		}
  		return true;
  	}
  
  	public static String getPermissionFileContents(HttpServletRequest request) {
  		// Get the file with permissions.
  		String permissionFile = "";
  		String realPath = RequestUtilities.getRealPath(request, FILEPATH_ROLES
  				+ getAccountType());
  
  		// Scan the file.
  		try {
  			File file = new File(realPath);
  			Scanner scanner = new Scanner(file);
  			permissionFile = scanner.useDelimiter("\\Z").next();
  			scanner.close();
  		} catch (FileNotFoundException e) {
  			e.printStackTrace();
  		}
  		return permissionFile;
  	}
  
  	/**
  	 * Authorize the user based on account ID and pre-configured permissions.
  	 * 
  	 * @param request
  	 */
  	public void initializeAccount(HttpServletRequest request) {
  		// If account name already configured, return.
  		if (getAccountName() != null) {
  			return;
  		}
  
  		// If super-admin.
  		if (isSuperAdmin()) {
  			setAccountName("Super Admin");
  			return;
  		}
  
  		// Get name of account from map.
  		String account = SecurityUtilities.getAccountName(getAccountType());
  		setAccountName(account);
  	}
  
  	private boolean isSuperAdmin() {
  		return getAccountType() == 0;
  	}
  
  	/**
  	 * Check if the user can view the specified column.
  	 * 
  	 * @param column
  	 * @param schemaTable
  	 * @return
  	 */
  	public boolean canViewColumn(String column, String schemaTable) {
  
  		if (isSuperAdmin()) {
  			return true;
  		}
  
  		// Get the column security map.
  		List<SecurityPermission> colSecMap = SystemInitializer
  				.getColumnSecurityMap().get(getAccountType());
  
  		// Find the table.
  		for (SecurityPermission permission : colSecMap) {
  
  			// If table is found, check if table exists.
  			// If exist, DO NOT ALLOW user to see.
  			if (permission.getTable().equals(schemaTable)) {
  				List<String> columnList = permission.getDisallowedColumnList();
  