package io.upit.dal.models.pojos;

import io.upit.dal.models.AuthSession;

import java.util.Objects;

import org.joda.time.DateTime;

public class AuthSessionImpl implements AuthSession {
	
	private String sessionId;
	private String userId;
	private String token;
	private DateTime created;
	private DateTime expires;
	private DateTime lastAccessed;
	private boolean active;

	@Override
	public String getSessionId() {
		return sessionId;
	}

	@Override
	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	@Override
	public String getUserId() {
		return userId;
	}

	@Override
	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Override
	public String getToken() {
		return token;
	}

	@Override
	public void setToken(String token) {
		this.token = token;
	}

	@Override
	public DateTime getCreated() {
		return created;
	}

	@Override
	public void setCreated(DateTime created) {
		this.created = created;
	}

	@Override
	public DateTime getExpires() {
		return expires;
	}

	@Override
	public void setExpires(DateTime expires) {
		this.expires = expires;
	}

	@Override
	public DateTime getLastAccessed() {
		return lastAccessed;
	}

	@Override
	public void setLastAccessed(DateTime lastAccessed) {
		this.lastAccessed = lastAccessed;
	}

	@Override
	public boolean isActive() {
		return active;
	}

	@Override
	public void setActive(boolean active) {
		this.active = active;
	}

	@Override
	public int hashCode() {
		return Objects.hash(getSessionId());
	}

	@Override
	public boolean equals(Object obj) {
		if(!(obj instanceof AuthSession)){
			return false;
		}
		AuthSession check = (AuthSession)obj;
		return Objects.equals(getSessionId(), check.getSessionId());
	}


}

@@ -238,31 +238,8 @@
 Id;%0A
-%09private String token;%0A
 %09pri
@@ -648,142 +648,8 @@
 %09%7D%0A%0A
-%09@Override%0A%09public String getToken() %7B%0A%09%09return token;%0A%09%7D%0A%0A%09@Override%0A%09public void setToken(String token) %7B%0A%09%09this.token = token;%0A%09%7D%0A%0A
 %09@Ov

Remove unused field