Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
This file is part of Port@l Port@l 3.0 - Portal Engine and Management System Copyright (C) 2010 Isotrol, SA. http://www.isotrol.com Port@l is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Port@l is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Port@l. If not, see <http://www.gnu.org/licenses/>.
 
 
 package com.isotrol.impe3.users.model;
 
 
 import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
 
 
Entity that represents a Portal User.

Author(s):
Andres Rodriguez
 
 @Table(name = "PORTAL_USER")
 	@NamedQuery(name = ., query = "from PortalUserEntity as e where e.name = ?"),
 	@NamedQuery(name = ., query = "from PortalUserEntity as e where e.name = ? and e.id != ?"),
 	@NamedQuery(name = ., query = "from PortalUserEntity as e where lower(e.email) = lower(?)")})
 public class PortalUserEntity {
Query by name.
 
 	public static final String BY_NAME = "portalUser.byName";
Query by name excluding ID.
 
 	public static final String BY_NAME_OTHER_ID = "portalUser.byNameOtherId";
Query by email.
 
 	public static final String BY_EMAIL = "portalUser.byEMail";
Entity ID.
 
 	@Id
 	@Type(type = "impeId")
 	@Column(name = "ID", length = ., nullable = false)
 	private UUID id;
Login name.
 
 	@Column(name = "NAME", length = ., unique = true, nullable = false)
 	private String name;
Display name.
 
 	@Column(name = "DISPLAY_NAME", length = .)
 	private String displayName;
Email address.
 
 	@Column(name = "EMAIL", length = .)
 	private String email;
Password.
 
 	@Column(name = "PASSWORD", length = .)
 	private String password;
Is the user active?.
 
 	@Column(name = "ACTIVE", nullable = false)
 	private boolean active = true;
User properties.
 
 	@JoinTable(name = "PORTAL_USER_PROPERTY", joinColumns = @JoinColumn(name = "PUSR_ID", nullable = false))
 	@MapKey(columns = @Column(name = "PROPERTY_NAME", length = .))
 	@Column(name = "PROPERTY_VALUE", length = .)
 	private Map<StringStringproperties;
User roles.
 
 	@JoinTable(name = "PORTAL_USER_ROLE", joinColumns = @JoinColumn(name = "PUSR_ID", nullable = false))
 	@Column(name = "ROLE_NAME", length = .)
 	private Set<Stringroles;

Default constructor.
 
 	public PortalUserEntity() {
 	}

Constructor.

Parameters:
id Entity ID.
	public PortalUserEntity(UUID id) {
		this. = id;
	}

Returns:
The id
	public UUID getId() {
		return ;
	}

Sets the id

Parameters:
id the id to set.
	public void setId(UUID id) {
		this. = id;
	}

Returns the login name.

Returns:
The login name.
	public String getName() {
		return ;
	}

Sets the login name.

Parameters:
name The login name.
	public void setName(String name) {
		this. = name;
	}

Returns the display name.

Returns:
The display name.
	public String getDisplayName() {
		return ;
	}

Sets the display name.

Parameters:
displayName The display name.
	public void setDisplayName(String displayName) {
		this. = displayName;
	}

Returns the email address.

Returns:
The email address.
	public String getEmail() {
		return ;
	}

Sets the email address.

Parameters:
email The email address.
	public void setEmail(String email) {
		this. = email;
	}

Returns the password.

Returns:
The password.
	public String getPassword() {
		return ;
	}

Sets the password.

Parameters:
password The password.
	public void setPassword(String password) {
		this. = password;
	}

Returns whether the user is active.

Returns:
True if the user is active.
	public boolean isActive() {
		return ;
	}

Sets whether the user is active.

Parameters:
active True if the user is active.
	public void setActive(boolean active) {
		this. = active;
	}

Returns user properties.

Returns:
The user properties.
	public Map<StringStringgetProperties() {
		if ( == null) {
		}
		return ;
	}

Returns the user roles.

Returns:
The user roles.
	public Set<StringgetRoles() {
		if ( == null) {
			 = Sets.newHashSet();
		}
		return ;
	}

	public final int hashCode() {
		return ( == null) ? 0 : .hashCode();
	}

	public final boolean equals(Object obj) {
		if (obj instanceof PortalUserEntity) {
			final PortalUserEntity e = (PortalUserEntityobj;
			return Objects.equal(getId(), e.getId());
		}
		return false;
	}
New to GrepCode? Check out our FAQ X