Package africa.absa.inception.security
Class Tenant
java.lang.Object
africa.absa.inception.security.Tenant
- All Implemented Interfaces:
Serializable
The Tenant class holds the information for a tenant.
- Author:
- Marcus Portmann
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTenant()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
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.Returns the date and time the tenant was created.getId()Returns the ID for the tenant.getName()Returns the name of the tenant.Returns the status for the tenant.Returns the date and time the tenant was last updated.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()The Java Persistence callback method invoked before the entity is created in the database.protected voidonUpdate()The Java Persistence callback method invoked before the entity is updated in the database.voidSet the ID for the tenant.voidSet 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 Details
-
Tenant
public Tenant()Constructs a new Tenant. -
Tenant
Constructs a new Tenant.- Parameters:
name- the name of the tenantstatus- the status for the tenant
-
Tenant
Constructs a new Tenant.- Parameters:
id- the ID for the tenantname- the name of the tenantstatus- the status for the tenant
-
-
Method Details
-
equals
Indicates whether some other object is "equal to" this one. -
getCreated
Returns the date and time the tenant was created.- Returns:
- the date and time the tenant was created
-
getId
Returns the ID for the tenant.- Returns:
- the ID for the tenant
-
getName
Returns the name of the tenant.- Returns:
- the name of the tenant
-
getStatus
Returns the status for the tenant.- Returns:
- the status for the tenant
-
getUpdated
Returns the date and time the tenant was last updated.- Returns:
- the date and time the tenant was last updated
-
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
Link the user directory to the tenant.- Parameters:
userDirectory- the user directory
-
setId
Set the ID for the tenant.- Parameters:
id- the ID for the tenant
-
setName
Set the name of the tenant.- Parameters:
name- the name of the tenant
-
setStatus
Set the status for the tenant.- Parameters:
status- the status for the tenant
-
setUserDirectories
Set the user directories associated with the tenant.- Parameters:
userDirectories- the user directories associated with the tenant
-
unlinkUserDirectory
Unlink the user directory from the tenant.- Parameters:
userDirectory- the user directory
-
onCreate
protected void onCreate()The Java Persistence callback method invoked before the entity is created in the database. -
onUpdate
protected void onUpdate()The Java Persistence callback method invoked before the entity is updated in the database.
-