com.h3c.sdn.dao.model

## Class BaseVersionedEntity

- java.lang.Object
- - com.h3c.sdn.dao.model.BaseEntity
  - - com.h3c.sdn.dao.model.BaseVersionedEntity

- All Implemented Interfaces:
    Storable<UUID>, Versioned
  Direct Known Subclasses:
    SystemLocalVersionedEntity

      @MappedSuperclass
      public abstract class BaseVersionedEntity
      extends BaseEntity
      implements Versioned

  Represents the basic persistence layer characteristics that all entities must support, the database internal identification and a version value. These internal values will be set by the persistence layer when the object is stored, hence no setter methods are exposed.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseVersionedEntity()`
    `BaseVersionedEntity(UUID uid)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Long` | `getVersion()` The JPA persistence version identification.

    - ### Methods inherited from class com.h3c.sdn.dao.model.BaseEntity

      `equals, getId, hashCode, toString`

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

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

- - ### Constructor Detail

    - #### BaseVersionedEntity

          public BaseVersionedEntity()

    - #### BaseVersionedEntity

          public BaseVersionedEntity(UUID uid)

  - ### Method Detail

    - #### getVersion

          public Long getVersion()

      Description copied from interface: `Versioned`
      The JPA persistence version identification. Used for the optimistic locking aspect of the persistence layer. Allows for conversion from Transport object to Data Access object to properly interact with the persistence layer
      Specified by:
        `getVersion` in interface `Versioned`
      Returns:
        the internal version number

Copyright © 2014. All Rights Reserved.