Class BaseVersionEntity<T extends BaseVersionEntity<T>>

Type Parameters:
T - A class for a kind of entity that that supports versioning and migration rules to create previous and next links between releases, such as Namespace, Property, Type, or Facet.
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BaseNamespaceEntity, Namespace

@MappedSuperclass public abstract class BaseVersionEntity<T extends BaseVersionEntity<T>> extends BaseModelEntity
Adds reusable methods for entities that belong to a version: Namespace, Property, etc.
See Also:
  • Field Details

    • prev

      public T extends BaseVersionEntity<T> prev
      Corresponding entity mapped from the previous version.
    • next

      public T extends BaseVersionEntity<T> next
      Corresponding entity mapped from the next version.
  • Constructor Details

    • BaseVersionEntity

      protected BaseVersionEntity(BaseVersionEntity.BaseVersionEntityBuilder<T,?,?> b)
    • BaseVersionEntity

      public BaseVersionEntity()
    • BaseVersionEntity

      public BaseVersionEntity(T prev, T next, T original, boolean isDeprecated)
      Creates a new BaseVersionEntity instance.
      Parameters:
      prev - Corresponding entity mapped from the previous version.
      next - Corresponding entity mapped from the next version.
      original - For a subset that reuses content from another model, this is the link to the original entity. The value is null if this entity is actually defined by its version rather than reused from another model as part of a subset.

      Example 1: NIEM model 5.2 is the original source of property "nc:Person". In this case, this property is itself the original and has no other original source to point to. The value of original is null.

      Example 2: Acme Crash Driver 1.0 reuses property nc:Person from NIEM model 5.2 and is not its original source. The value of original is a reference to the NIEM model 5.2 nc:Person property.

      Although most information about an entity will be duplicated between the original and its usages via subsets, tracking the usages of each entity independently supports subset-approved customizations, like adjusted cardinality, custom namespace prefixes, property aliases, inlined substitutions, and flattened types.

      isDeprecated - True if an entity is deprecated; false or null otherwise.
  • Method Details

    • getVersion

      public abstract Version getVersion()
    • getPrev

      public T getPrev()
      Corresponding entity from the previous version of the model. The Hibernate proxy (from lazy loading) is initialized.
    • getNext

      public T getNext()
      Corresponding entity from the next version of the model. The Hibernate proxy (from lazy loading) is initialized.
    • getOriginal

      public T getOriginal()
      For a component in a subset, gets the component from the original source.
    • isOriginal

      public boolean isOriginal()
      True if an entity is defined by its version and can be modified freely; false if an entity is being referenced and reused from another model and version and is restricted in the changes that can be made (subset options).
    • getVersionId

      public Long getVersionId()
      Gets the version database id.
    • getVersionSummary

      public Map<String,String> getVersionSummary()
    • getVersionNumber

      public String getVersionNumber()
      A number which identifies a version within a model.
    • getNiemVersion

      public Version getNiemVersion()
      Gets the NIEM Version object that is compatible with this object.
    • getNiemVersionNumber

      public String getNiemVersionNumber()
      Gets the NIEM Version number (string) that is compatible with this object.
    • getModel

      public Model getModel()
      Gets the Model that defines this object.
      Specified by:
      getModel in class BaseModelEntity
    • isDeprecated

      public boolean isDeprecated()
      True if an entity is deprecated; false or null otherwise.
    • setPrev

      public void setPrev(T prev)
      Corresponding entity mapped from the previous version.
    • setNext

      public void setNext(T next)
      Corresponding entity mapped from the next version.
    • setOriginal

      public void setOriginal(T original)
      For a subset that reuses content from another model, this is the link to the original entity. The value is null if this entity is actually defined by its version rather than reused from another model as part of a subset.

      Example 1: NIEM model 5.2 is the original source of property "nc:Person". In this case, this property is itself the original and has no other original source to point to. The value of original is null.

      Example 2: Acme Crash Driver 1.0 reuses property nc:Person from NIEM model 5.2 and is not its original source. The value of original is a reference to the NIEM model 5.2 nc:Person property.

      Although most information about an entity will be duplicated between the original and its usages via subsets, tracking the usages of each entity independently supports subset-approved customizations, like adjusted cardinality, custom namespace prefixes, property aliases, inlined substitutions, and flattened types.

    • setDeprecated

      public void setDeprecated(boolean isDeprecated)
      True if an entity is deprecated; false or null otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class BaseModelEntity
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class BaseModelEntity
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class BaseModelEntity
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BaseModelEntity