Package com.helger.tenancy.tenant
Interface IHasTenant
-
- All Superinterfaces:
IHasTenantID
- All Known Subinterfaces:
IAccountingArea,IAccountingAreaObject,IHasAccountingArea,ITenantObject
- All Known Implementing Classes:
AbstractAccountingArea,AbstractHasAccountingAreaObject,AbstractHasAccountingAreaOptionalObject,AbstractHasTenant,AbstractTenantObject
public interface IHasTenant extends IHasTenantID
Base interface for objects that have a tenant.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ITenantgetTenant()default StringgetTenantID()default booleanhasSameTenant(ITenant aTenant)Check if the passed tenant has the same ID as this objectdefault booleanhasSameTenantID(ITenantObject aObj)Check if the passed object has the same tenant ID as this objectdefault booleanhasTenant()default booleanhasTenantID()-
Methods inherited from interface com.helger.tenancy.tenant.IHasTenantID
hasSameTenantID
-
-
-
-
Method Detail
-
hasTenant
default boolean hasTenant()
- Returns:
- The tenant or
null. - Since:
- 6.1.1
-
getTenantID
@Nullable default String getTenantID()
- Specified by:
getTenantIDin interfaceIHasTenantID- Returns:
- The tenant ID or
null.
-
hasTenantID
default boolean hasTenantID()
- Specified by:
hasTenantIDin interfaceIHasTenantID- Returns:
trueif a tenant ID is present,falseif not.
-
hasSameTenantID
default boolean hasSameTenantID(@Nullable ITenantObject aObj)
Check if the passed object has the same tenant ID as this object- Parameters:
aObj- The object to check. May benull.- Returns:
trueif this object and the passed object (if notnull) have the same tenant ID
-
-