/*
 * $Id: VKCUserFunctionalHistory.java,v 1.1 2006/07/05 20:54:29 marbobo Exp $
 *
 * Copyright (c) Siemens AG 2008 
 *           (c) Universität Paderborn 2008 
 * Licensed under EUPL 1.1. 
 *
 * $Log: VKCUserFunctionalHistory.java,v $
 * Revision 1.1  2006/07/05 20:54:29  marbobo
 * + Initiale Version
 *
 */
package vkc.db.entities;

import java.io.Serializable;
import java.util.Date;
import java.sql.Timestamp;

/**
 * Klasse stellt einen UserProjectHistory im VKC-System dar
 *
 * @author marbobo
 */
public class VKCUserFunctionalHistory implements Serializable {
	private Integer userId = VKCUser.ID_UNDEFINED;
	private Integer functionalId = VKCEntity.ID_UNDEFINED;
	private Timestamp lastAccessed = new Timestamp(new Date().getTime());

	public Timestamp getLastAccessed() {
		return lastAccessed;
	}

	public void setLastAccessed(Timestamp lastAccessed) {
		this.lastAccessed = lastAccessed;
	}
	
	public Integer getFunctionalId() {
		return functionalId;
	}
	
	public void setFunctionalId(Integer functionalId) {
		this.functionalId = functionalId;
	}
	
	public Integer getUserId() {
		return userId;
	}
	
	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public boolean equals(Object obj) {
        if (obj == null || obj instanceof VKCUserFunctionalHistory == false) {
            return false;
        }

        VKCUserFunctionalHistory f = (VKCUserFunctionalHistory)obj;

        return getUserId().equals(f.getUserId()) && getFunctionalId().equals(f.getFunctionalId());
	}
}