/*
 * $Id: VKCProxyUser.java,v 1.3 2004/06/27 17:16:55 marbobo Exp $
 * 
 * Copyright (c) Siemens AG 2008 
 *           (c) Universität Paderborn 2008 
 * Licensed under EUPL 1.1. 
 * 
 * $Log: VKCProxyUser.java,v $
 * Revision 1.3  2004/06/27 17:16:55  marbobo
 * + Quellcode maintenance
 *
 * Revision 1.2  2004/02/02 14:23:03  marbobo
 * Label-Methoden hinzugefügt
 *
 * Revision 1.1  2003/12/02 17:16:29  vchris
 * *** empty log message ***
 *
 * 
 * Created on 02.12.2003
 */
package vkc.db.entities;

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

import vkc.util.DateUtils;

/**
 * DOCUMENT ME!!!
 * 
 * @author vchris
 */
public class VKCProxyUser {

	private Integer proxyId;
	private Integer userId;
	private Integer proxyUserId;
	private String description;
	private Timestamp validFrom;
	private Timestamp validUntil;
	private Timestamp created;
	private Integer creatorId;
	
	/**
	 * Konstruktor
	 */
	public VKCProxyUser() {}
	
	/**
	 * @return
	 */
	public Timestamp getCreated() {
		return created;
	}

	/**
	 * @return
	 */
	public Integer getCreatorId() {
		return creatorId;
	}

	/**
	 * @return
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @return
	 */
	public Integer getProxyId() {
		return proxyId;
	}

	/**
	 * @return
	 */
	public Integer getProxyUserId() {
		return proxyUserId;
	}

	/**
	 * @return
	 */
	public Integer getUserId() {
		return userId;
	}

	/**
	 * @return
	 */
	public Timestamp getValidFrom() {
		return validFrom;
	}

	/**
	 * @return
	 */
	public Timestamp getValidUntil() {
		return validUntil;
	}

	/**
	 * @param timestamp
	 */
	public void setCreated(Timestamp timestamp) {
		created = timestamp;
	}

	/**
	 * @param integer
	 */
	public void setCreatorId(Integer integer) {
		creatorId = integer;
	}

	/**
	 * @param string
	 */
	public void setDescription(String string) {
		description = string;
	}

	/**
	 * @param integer
	 */
	public void setProxyId(Integer integer) {
		proxyId = integer;
	}

	/**
	 * @param integer
	 */
	public void setProxyUserId(Integer integer) {
		proxyUserId = integer;
	}

	/**
	 * @param integer
	 */
	public void setUserId(Integer integer) {
		userId = integer;
	}

	/**
	 * @param timestamp
	 */
	public void setValidFrom(Timestamp timestamp) {
		validFrom = timestamp;
	}

	/**
	 * @param timestamp
	 */
	public void setValidUntil(Timestamp timestamp) {
		validUntil = timestamp;
	}
	
	public String getValidFromLabel() {
		if (validFrom != null) {
			return DateUtils.getDD_MM_YYYY(new Date(validFrom.getTime()));
		} 

		return "";
	}

	public String getValidUntilLabel() {
		if (validUntil != null) {
			return DateUtils.getDD_MM_YYYY(new Date(validUntil.getTime()));
		} 

		return "";
	}
}