com.h3c.sdn.dao.model

## Class AuditableEntity

- java.lang.Object
- - com.h3c.sdn.dao.model.AuditableEntity

- All Implemented Interfaces:
    Auditable, Audited

      @MappedSuperclass
      public abstract class AuditableEntity
      extends Object
      implements Auditable

  Abstraction of a persisted entity which has auditable information about who created it, who last modified it, and when.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AuditableEntity()` Creates an uninitialized, and therefore not yet auditable entity.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Date` | `createdAt()` Returns the time at which this entity was created.
    `String` | `createdBy()` Returns the identity of the entity or user who created this entity.
    `Date` | `modifiedAt()` Returns the time at which this entity was last modified.
    `String` | `modifiedBy()` Returns the identity of the entity or user who last modified this entity.
    `void` | `setCreatedAt(Date when)` Sets the creation date for this entity.
    `void` | `setCreatedBy(String who)` Sets the creation identity for this entity.
    `void` | `setModifiedAt(Date when)` Sets the time at which this entity was last modified.
    `void` | `setModifiedBy(String who)` Sets the identity of the entity or user who last modified this entity.
    `String` | `toDebugString()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AuditableEntity

          protected AuditableEntity()

      Creates an uninitialized, and therefore not yet auditable entity.

  - ### Method Detail

    - #### createdAt

          public Date createdAt()

      Description copied from interface: `Audited`
      Returns the time at which this entity was created.
      Specified by:
        `createdAt` in interface `Audited`
      Returns:
        creation time-stamp

    - #### createdBy

          public String createdBy()

      Description copied from interface: `Audited`
      Returns the identity of the entity or user who created this entity.
      Specified by:
        `createdBy` in interface `Audited`
      Returns:
        identity of the creator

    - #### modifiedAt

          public Date modifiedAt()

      Description copied from interface: `Audited`
      Returns the time at which this entity was last modified.
      Specified by:
        `modifiedAt` in interface `Audited`
      Returns:
        last modification time-stamp

    - #### modifiedBy

          public String modifiedBy()

      Description copied from interface: `Audited`
      Returns the identity of the entity or user who last modified this entity.
      Specified by:
        `modifiedBy` in interface `Audited`
      Returns:
        identity of the modifier

    - #### setModifiedAt

          public void setModifiedAt(Date when)

      Description copied from interface: `Auditable`
      Sets the time at which this entity was last modified.
      Specified by:
        `setModifiedAt` in interface `Auditable`
      Parameters:
        `when` - the last modification timestamp

    - #### setModifiedBy

          public void setModifiedBy(String who)

      Description copied from interface: `Auditable`
      Sets the identity of the entity or user who last modified this entity.
      Specified by:
        `setModifiedBy` in interface `Auditable`
      Parameters:
        `who` - the identity of the modifier

    - #### setCreatedAt

          public void setCreatedAt(Date when)

      Sets the creation date for this entity. This should only be called once, by the layer creating the entity, and not externally.
      Parameters:
        `when` - the time at which this entity was created

    - #### setCreatedBy

          public void setCreatedBy(String who)

      Sets the creation identity for this entity. This should only be called once, by the layer creating the entity, and not externally.
      Parameters:
        `who` - the entity or user who created this entity

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toDebugString

          public String toDebugString()

Copyright © 2014. All Rights Reserved.