// Path: core/src/main/java/org/meruvian/yama/core/DefaultPersistence.java
// @MappedSuperclass
// public class DefaultPersistence {
// 	protected String id;
// 	protected LogInformation logInformation = new LogInformation();
// 
// 	@Id()
// 	@GeneratedValue(generator = "system-uuid")
// 	@GenericGenerator(name = "system-uuid", strategy = "uuid2")
// 	public String getId() {
// 		return id;
// 	}
// 
// 	public void setId(String id) {
// 		this.id = id;
// 	}
// 
// 	@Embedded
// 	public LogInformation getLogInformation() {
// 		return logInformation;
// 	}
// 
// 	public void setLogInformation(LogInformation logInformation) {
// 		this.logInformation = logInformation;
// 	}
// }
// 
// Path: core/src/main/java/org/meruvian/yama/core/commons/Address.java
// @Embeddable
// public class Address {
// 	private String street1;
// 	private String street2;
// 	private String city;
// 	private String state;
// 	private String zip;
// 
// 	@Column(name = "address_street1")
// 	public String getStreet1() {
// 		return street1;
// 	}
// 
// 	public void setStreet1(String street1) {
// 		this.street1 = street1;
// 	}
// 
// 	@Column(name = "address_street2")
// 	public String getStreet2() {
// 		return street2;
// 	}
// 
// 	public void setStreet2(String street2) {
// 		this.street2 = street2;
// 	}
// 
// 	@Column(name = "address_city")
// 	public String getCity() {
// 		return city;
// 	}
// 
// 	public void setCity(String city) {
// 		this.city = city;
// 	}
// 
// 	@Column(name = "address_state")
// 	public String getState() {
// 		return state;
// 	}
// 
// 	public void setState(String state) {
// 		this.state = state;
// 	}
// 
// 	@Column(name = "address_zip")
// 	public String getZip() {
// 		return zip;
// 	}
// 
// 	public void setZip(String zip) {
// 		this.zip = zip;
// 	}
// }
// 
// Path: core/src/main/java/org/meruvian/yama/core/commons/Name.java
// @Embeddable
// public class Name {
// 	private String prefix;
// 	private String first;
// 	private String middle;
// 	private String last;
// 
// 	@Column(name = "name_prefix")
// 	public String getPrefix() {
// 		return prefix;
// 	}
// 
// 	public void setPrefix(String prefix) {
// 		this.prefix = prefix;
// 	}
// 
// 	@Column(name = "name_first")
// 	public String getFirst() {
// 		return first;
// 	}
// 
// 	public void setFirst(String first) {
// 		this.first = first;
// 	}
// 
// 	@Column(name = "name_middle")
// 	public String getMiddle() {
// 		return middle;
// 	}
// 
// 	public void setMiddle(String middle) {
// 		this.middle = middle;
// 	}
// 
// 	@Column(name = "name_last")
// 	public String getLast() {
// 		return last;
// 	}
// 
// 	public void setLast(String last) {
// 		this.last = last;
// 	}
// }
// 
// Path: core/src/main/java/org/meruvian/yama/core/role/UserRole.java
// @Entity
// @Table(name = "yama_user_role", uniqueConstraints = @UniqueConstraint(columnNames = { "role_id", "user_id" }))
// public class UserRole extends DefaultPersistence {
// 	private Role role = new Role();
// 	private User user = new User();
// 	
// 	public UserRole() {}
// 
// 	public UserRole(Role role, User user) {
// 		this.role = role;
// 		this.user = user;
// 	}
// 
// 	@ManyToOne
// 	@JoinColumn(name = "role_id", nullable = false)
// 	public Role getRole() {
// 		return role;
// 	}
// 	
// 	public void setRole(Role role) {
// 		this.role = role;
// 	}
// 
// 	@ManyToOne
// 	@JoinColumn(name = "user_id", nullable = false)
// 	public User getUser() {
// 		return user;
// 	}
// 
// 	public void setUser(User user) {
// 		this.user = user;
// 	}
// }


import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.meruvian.yama.core.DefaultPersistence;
import org.meruvian.yama.core.commons.Address;
import org.meruvian.yama.core.commons.FileInfo;
import org.meruvian.yama.core.commons.Name;
import org.meruvian.yama.core.role.UserRole;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
 * Copyright 2014 Meruvian
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0 
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.meruvian.yama.core.user;





/**
 * @author Dian Aditya
 * 
 */
@Entity
@Table(name = "yama_backend_user")
// Path: core/src/main/java/org/meruvian/yama/core/DefaultPersistence.java
// @MappedSuperclass
// public class DefaultPersistence {
// 	protected String id;
// 	protected LogInformation logInformation = new LogInformation();
// 
// 	@Id()
// 	@GeneratedValue(generator = "system-uuid")
// 	@GenericGenerator(name = "system-uuid", strategy = "uuid2")
// 	public String getId() {
// 		return id;
// 	}
// 
// 	public void setId(String id) {
// 		this.id = id;
// 	}
// 
// 	@Embedded
// 	public LogInformation getLogInformation() {
// 		return logInformation;
// 	}
// 
// 	public void setLogInformation(LogInformation logInformation) {
// 		this.logInformation = logInformation;
// 	}
// }
// 
// Path: core/src/main/java/org/meruvian/yama/core/commons/Address.java
// @Embeddable
// public class Address {
// 	private String street1;
// 	private String street2;
// 	private String city;
// 	private String state;
// 	private String zip;
// 
// 	@Column(name = "address_street1")
// 	public String getStreet1() {
// 		return street1;
// 	}
// 
// 	public void setStreet1(String street1) {
// 		this.street1 = street1;
// 	}
// 
// 	@Column(name = "address_street2")
// 	public String getStreet2() {
// 		return street2;
// 	}
// 
// 	public void setStreet2(String street2) {
// 		this.street2 = street2;
// 	}
// 
// 	@Column(name = "address_city")
// 	public String getCity() {
// 		return city;
// 	}
// 
// 	public void setCity(String city) {
// 		this.city = city;
// 	}
// 
// 	@Column(name = "address_state")
// 	public String getState() {
// 		return state;
// 	}
// 
// 	public void setState(String state) {
// 		this.state = state;
// 	}
// 
// 	@Column(name = "address_zip")
// 	public String getZip() {
// 		return zip;
// 	}
// 
// 	public void setZip(String zip) {
// 		this.zip = zip;
// 	}
// }
// 
// Path: core/src/main/java/org/meruvian/yama/core/commons/Name.java
// @Embeddable
// public class Name {
// 	private String prefix;
// 	private String first;
// 	private String middle;
// 	private String last;
// 
// 	@Column(name = "name_prefix")
// 	public String getPrefix() {
// 		return prefix;
// 	}
// 
// 	public void setPrefix(String prefix) {
// 		this.prefix = prefix;
// 	}
// 
// 	@Column(name = "name_first")
// 	public String getFirst() {
// 		return first;
// 	}
// 
// 	public void setFirst(String first) {
// 		this.first = first;
// 	}
// 
// 	@Column(name = "name_middle")
// 	public String getMiddle() {
// 		return middle;
// 	}
// 
// 	public void setMiddle(String middle) {
// 		this.middle = middle;
// 	}
// 
// 	@Column(name = "name_last")
// 	public String getLast() {
// 		return last;
// 	}
// 
// 	public void setLast(String last) {
// 		this.last = last;
// 	}
// }
// 
// Path: core/src/main/java/org/meruvian/yama/core/role/UserRole.java
// @Entity
// @Table(name = "yama_user_role", uniqueConstraints = @UniqueConstraint(columnNames = { "role_id", "user_id" }))
// public class UserRole extends DefaultPersistence {
// 	private Role role = new Role();
// 	private User user = new User();
// 	
// 	public UserRole() {}
// 
// 	public UserRole(Role role, User user) {
// 		this.role = role;
// 		this.user = user;
// 	}
// 
// 	@ManyToOne
// 	@JoinColumn(name = "role_id", nullable = false)
// 	public Role getRole() {
// 		return role;
// 	}
// 	
// 	public void setRole(Role role) {
// 		this.role = role;
// 	}
// 
// 	@ManyToOne
// 	@JoinColumn(name = "user_id", nullable = false)
// 	public User getUser() {
// 		return user;
// 	}
// 
// 	public void setUser(User user) {
// 		this.user = user;
// 	}
// }


// Path: core/src/main/java/org/meruvian/yama/core/user/User.java
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.meruvian.yama.core.DefaultPersistence;
import org.meruvian.yama.core.commons.Address;
import org.meruvian.yama.core.commons.FileInfo;
import org.meruvian.yama.core.commons.Name;
import org.meruvian.yama.core.role.UserRole;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * Copyright 2014 Meruvian
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0 
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.meruvian.yama.core.user;





/**
 * @author Dian Aditya
 * 
 */
@Entity
@Table(name = "yama_backend_user")
public class User extends DefaultPersistence {