Package com.helger.tenancy
Class AbstractBusinessObject
- java.lang.Object
-
- com.helger.tenancy.AbstractBusinessObject
-
- All Implemented Interfaces:
com.helger.commons.id.IHasID<String>,com.helger.commons.type.IHasObjectType,com.helger.commons.type.ITypedObject<String>,com.helger.datetime.domain.IHasCreationDateTime,com.helger.datetime.domain.IHasDeletionDateTime,com.helger.datetime.domain.IHasLastModificationDateTime,IHasCreationInfo,IHasDeletionInfo,IHasLastModificationInfo,IBusinessObject,Serializable
- Direct Known Subclasses:
AbstractTenantObject
@NotThreadSafe public abstract class AbstractBusinessObject extends Object implements IBusinessObject
Abstract base implementation ofIBusinessObjectthat handles everything exceptIHasObjectType.getObjectType().- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractBusinessObject(IBusinessObject aObject)AbstractBusinessObject(String sID, LocalDateTime aCreationDT, String sCreationUserID, LocalDateTime aLastModificationDT, String sLastModificationUserID, LocalDateTime aDeletionDT, String sDeletionUserID, Map<String,String> aAttrs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.helger.commons.collection.attr.StringMapattrs()booleanequals(Object o)LocalDateTimegetCreationDateTime()StringgetCreationUserID()LocalDateTimegetDeletionDateTime()StringgetDeletionUserID()StringgetID()LocalDateTimegetLastModificationDateTime()StringgetLastModificationUserID()inthashCode()com.helger.commons.state.EChangesetDeletion(LocalDateTime aDeletionDT, String sDeletionUserID)voidsetLastModification(LocalDateTime aLastModificationDT, String sLastModificationUserID)com.helger.commons.state.EChangesetUndeletion(LocalDateTime aUndeletionDT, String sUndeletionUserID)StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.tenancy.IBusinessObject
getLastChangeDateTime, isDeleted, isDeletedAt, isLastChangeAfter, isNotDeleted
-
Methods inherited from interface com.helger.datetime.domain.IHasCreationDateTime
getCreationDate, getCreationTime, hasCreationDateTime, isCreatedAt
-
Methods inherited from interface com.helger.tenancy.datetime.IHasCreationInfo
hasCreationUserID
-
Methods inherited from interface com.helger.datetime.domain.IHasDeletionDateTime
getDeletionDate, getDeletionTime, hasDeletionDateTime
-
Methods inherited from interface com.helger.tenancy.datetime.IHasDeletionInfo
hasDeletionUserID
-
Methods inherited from interface com.helger.datetime.domain.IHasLastModificationDateTime
getLastModificationDate, getLastModificationTime, hasLastModificationDateTime, isLastModifiedAt
-
Methods inherited from interface com.helger.tenancy.datetime.IHasLastModificationInfo
hasLastModificationUserID
-
-
-
-
Constructor Detail
-
AbstractBusinessObject
public AbstractBusinessObject(@Nonnull IBusinessObject aObject)
-
AbstractBusinessObject
public AbstractBusinessObject(@Nonnull @Nonempty String sID, @Nullable LocalDateTime aCreationDT, @Nullable String sCreationUserID, @Nullable LocalDateTime aLastModificationDT, @Nullable String sLastModificationUserID, @Nullable LocalDateTime aDeletionDT, @Nullable String sDeletionUserID, @Nullable Map<String,String> aAttrs)
-
-
Method Detail
-
getID
@Nonnull @Nonempty public final String getID()
- Specified by:
getIDin interfacecom.helger.commons.id.IHasID<String>
-
getCreationDateTime
@Nullable public final LocalDateTime getCreationDateTime()
- Specified by:
getCreationDateTimein interfacecom.helger.datetime.domain.IHasCreationDateTime
-
getCreationUserID
@Nullable public final String getCreationUserID()
- Specified by:
getCreationUserIDin interfaceIHasCreationInfo- Returns:
- The user ID who created the object. May be
null.
-
getLastModificationDateTime
@Nullable public final LocalDateTime getLastModificationDateTime()
- Specified by:
getLastModificationDateTimein interfacecom.helger.datetime.domain.IHasLastModificationDateTime
-
getLastModificationUserID
@Nullable public final String getLastModificationUserID()
- Specified by:
getLastModificationUserIDin interfaceIHasLastModificationInfo- Returns:
- The user ID who last modified the object or
nullif this object has not yet been modified.
-
setLastModification
public final void setLastModification(@Nonnull LocalDateTime aLastModificationDT, @Nonnull @Nonempty String sLastModificationUserID)
-
getDeletionDateTime
@Nullable public final LocalDateTime getDeletionDateTime()
- Specified by:
getDeletionDateTimein interfacecom.helger.datetime.domain.IHasDeletionDateTime
-
getDeletionUserID
@Nullable public final String getDeletionUserID()
- Specified by:
getDeletionUserIDin interfaceIHasDeletionInfo- Returns:
- The user ID who deleted the object or
nullif this object has not yet been deleted.
-
setDeletion
@Nonnull public final com.helger.commons.state.EChange setDeletion(@Nonnull LocalDateTime aDeletionDT, @Nonnull @Nonempty String sDeletionUserID)
-
setUndeletion
@Nonnull public final com.helger.commons.state.EChange setUndeletion(@Nonnull LocalDateTime aUndeletionDT, @Nonnull @Nonempty String sUndeletionUserID)
-
attrs
@Nonnull @ReturnsMutableObject public final com.helger.commons.collection.attr.StringMap attrs()
- Specified by:
attrsin interfaceIBusinessObject- Returns:
- Custom attributes. Never
null.
-
-