Package com.helger.tenancy.accarea
Class AbstractHasAccountingAreaObject
- java.lang.Object
-
- com.helger.tenancy.tenant.AbstractHasTenant
-
- com.helger.tenancy.accarea.AbstractHasAccountingAreaObject
-
- All Implemented Interfaces:
IHasAccountingArea,IHasAccountingAreaID,IHasTenant,IHasTenantID
@Immutable public abstract class AbstractHasAccountingAreaObject extends AbstractHasTenant implements IHasAccountingArea
Abstract implementation ofIHasAccountingAreabased onAbstractHasTenantwith a mandatory accounting area.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Modifier Constructor Description AbstractHasAccountingAreaObject(IAccountingArea aAccountingArea)protectedAbstractHasAccountingAreaObject(IAccountingAreaObject aOther)AbstractHasAccountingAreaObject(ITenant aTenant, IAccountingArea aAccountingArea)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)IAccountingAreagetAccountingArea()StringgetAccountingAreaID()inthashCode()booleanhasSameTenantAndAccountingAreaID(IAccountingArea aAccountingArea)Check if the passed object has the same tenant ID and the same accounting area ID as this objectbooleanhasSameTenantAndAccountingAreaID(IAccountingAreaObject aAccountingAreaObject)Check if the passed object has the same tenant ID and the same accounting area ID as this objectStringtoString()-
Methods inherited from class com.helger.tenancy.tenant.AbstractHasTenant
getTenant, getTenantID
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.tenancy.accarea.IHasAccountingAreaID
hasAccountingAreaID, hasSameAccountingAreaID
-
Methods inherited from interface com.helger.tenancy.tenant.IHasTenant
getTenant, getTenantID, hasSameTenant, hasSameTenantID, hasTenant, hasTenantID
-
Methods inherited from interface com.helger.tenancy.tenant.IHasTenantID
hasSameTenantID
-
-
-
-
Constructor Detail
-
AbstractHasAccountingAreaObject
protected AbstractHasAccountingAreaObject(@Nonnull IAccountingAreaObject aOther)
-
AbstractHasAccountingAreaObject
public AbstractHasAccountingAreaObject(@Nonnull IAccountingArea aAccountingArea)
-
AbstractHasAccountingAreaObject
public AbstractHasAccountingAreaObject(@Nonnull ITenant aTenant, @Nonnull IAccountingArea aAccountingArea)
-
-
Method Detail
-
getAccountingArea
@Nonnull public final IAccountingArea getAccountingArea()
- Specified by:
getAccountingAreain interfaceIHasAccountingArea- Returns:
- The accounting area or
null.
-
getAccountingAreaID
@Nonnull @Nonempty public final String getAccountingAreaID()
- Specified by:
getAccountingAreaIDin interfaceIHasAccountingArea- Specified by:
getAccountingAreaIDin interfaceIHasAccountingAreaID- Returns:
- The accounting area ID to which the object is assigned to. May be
null. - See Also:
IHasAccountingArea.getAccountingArea()
-
hasSameTenantAndAccountingAreaID
public final boolean hasSameTenantAndAccountingAreaID(@Nullable IAccountingArea aAccountingArea)
Description copied from interface:IHasAccountingAreaCheck if the passed object has the same tenant ID and the same accounting area ID as this object- Specified by:
hasSameTenantAndAccountingAreaIDin interfaceIHasAccountingArea- Parameters:
aAccountingArea- The object to check. May benull.- Returns:
trueif this object and the passed object have the same tenant ID and the same accounting area ID
-
hasSameTenantAndAccountingAreaID
public final boolean hasSameTenantAndAccountingAreaID(@Nullable IAccountingAreaObject aAccountingAreaObject)
Description copied from interface:IHasAccountingAreaCheck if the passed object has the same tenant ID and the same accounting area ID as this object- Specified by:
hasSameTenantAndAccountingAreaIDin interfaceIHasAccountingArea- Parameters:
aAccountingAreaObject- The object to check. May benull.- Returns:
trueif this object and the passed object have the same tenant ID and the same accounting area ID
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classAbstractHasTenant
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractHasTenant
-
toString
public String toString()
- Overrides:
toStringin classAbstractHasTenant
-
-