Package africa.absa.inception.security
Class Tenant
- java.lang.Object
-
- africa.absa.inception.security.Tenant
-
- All Implemented Interfaces:
Serializable
@Entity public class Tenant extends Object implements Serializable
The Tenant class holds the information for a tenant.- Author:
- Marcus Portmann
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Tenant()Constructs a new Tenant.Tenant(String name, TenantStatus status)Constructs a new Tenant.Tenant(UUID id, String name, TenantStatus status)Constructs a new Tenant.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Indicates whether some other object is "equal to" this one.LocalDateTimegetCreated()Returns the date and time the tenant was created.UUIDgetId()Returns the Universally Unique Identifier (UUID) for the tenant.StringgetName()Returns the name of the tenant.TenantStatusgetStatus()Returns the status for the tenant.LocalDateTimegetUpdated()Returns the date and time the tenant was last updated.Set<UserDirectory>getUserDirectories()Returns the user directories associated with the tenant.inthashCode()Returns a hash code value for the object.voidlinkUserDirectory(UserDirectory userDirectory)Link the user directory to the tenant.protected voidonCreate()protected voidonUpdate()voidsetId(UUID id)Set the Universally Unique Identifier (UUID) for the tenant.voidsetName(String name)Set the name of the tenant.voidsetStatus(TenantStatus status)Set the status for the tenant.voidsetUserDirectories(Set<UserDirectory> userDirectories)Set the user directories associated with the tenant.voidunlinkUserDirectory(UserDirectory userDirectory)Unlink the user directory from the tenant.
-
-
-
Constructor Detail
-
Tenant
public Tenant()
Constructs a new Tenant.
-
Tenant
public Tenant(String name, TenantStatus status)
Constructs a new Tenant.- Parameters:
name- the name of the tenantstatus- the status for the tenant
-
Tenant
public Tenant(UUID id, String name, TenantStatus status)
Constructs a new Tenant.- Parameters:
id- the Universally Unique Identifier (UUID) for the tenantname- the name of the tenantstatus- the status for the tenant
-
-
Method Detail
-
equals
public boolean equals(Object object)
Indicates whether some other object is "equal to" this one.
-
getCreated
public LocalDateTime getCreated()
Returns the date and time the tenant was created.- Returns:
- the date and time the tenant was created
-
getId
public UUID getId()
Returns the Universally Unique Identifier (UUID) for the tenant.- Returns:
- the Universally Unique Identifier (UUID) for the tenant
-
getName
public String getName()
Returns the name of the tenant.- Returns:
- the name of the tenant
-
getStatus
public TenantStatus getStatus()
Returns the status for the tenant.- Returns:
- the status for the tenant
-
getUpdated
public LocalDateTime getUpdated()
Returns the date and time the tenant was last updated.- Returns:
- the date and time the tenant was last updated
-
getUserDirectories
public Set<UserDirectory> getUserDirectories()
Returns the user directories associated with the tenant.- Returns:
- the user directories associated with the tenant
-
hashCode
public int hashCode()
Returns a hash code value for the object.
-
linkUserDirectory
public void linkUserDirectory(UserDirectory userDirectory)
Link the user directory to the tenant.- Parameters:
userDirectory- the user directory
-
setId
public void setId(UUID id)
Set the Universally Unique Identifier (UUID) for the tenant.- Parameters:
id- the Universally Unique Identifier (UUID) for the tenant
-
setName
public void setName(String name)
Set the name of the tenant.- Parameters:
name- the name of the tenant
-
setStatus
public void setStatus(TenantStatus status)
Set the status for the tenant.- Parameters:
status- the status for the tenant
-
setUserDirectories
public void setUserDirectories(Set<UserDirectory> userDirectories)
Set the user directories associated with the tenant.- Parameters:
userDirectories- the user directories associated with the tenant
-
unlinkUserDirectory
public void unlinkUserDirectory(UserDirectory userDirectory)
Unlink the user directory from the tenant.- Parameters:
userDirectory- the user directory
-
onCreate
protected void onCreate()
-
onUpdate
protected void onUpdate()
-
-