package com.github.aureliano.edocs.domain.entity;

import com.github.aureliano.edocs.common.persistence.IEntity;

public class User implements IEntity<User> {

	private Integer id;
	private String name;
	private String password;
	
	public User() {}

	public Integer getId() {
		return this.id;
	}
	
	public User withId(Integer id) {
		this.id = id;
		return this;
	}
	
	public String getName() {
		return name;
	}

	public User withName(String name) {
		this.name = name;
		return this;
	}

	public String getPassword() {
		return password;
	}

	public User withPassword(String password) {
		this.password = password;
		return this;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((password == null) ? 0 : password.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		User other = (User) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (password == null) {
			if (other.password != null)
				return false;
		} else if (!password.equals(other.password))
			return false;
		return true;
	}
}
@@ -44,16 +44,144 @@
 ntity;%0A%0A
+import com.github.aureliano.edocs.annotation.validation.NotEmpty;%0Aimport com.github.aureliano.edocs.annotation.validation.Size;%0A
 import c
@@ -234,16 +234,16 @@
 Entity;%0A
-
 %0Apublic 
@@ -486,24 +486,61 @@
  this;%0A%09%7D%0A%09%0A
+%09@NotEmpty%0A%09@Size(min = 3, max = 25)%0A
 %09public Stri
@@ -645,24 +645,61 @@
 n this;%0A%09%7D%0A%0A
+%09@NotEmpty%0A%09@Size(min = 3, max = 25)%0A
 %09public Stri

Add validation annotations.