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
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
BaseVersionEntity.BaseVersionEntityBuilder<T extends BaseVersionEntity<T>,
C extends BaseVersionEntity<T>, B extends BaseVersionEntity.BaseVersionEntityBuilder<T, C, B>> Nested classes/interfaces inherited from class gov.niem.tools.api.db.base.BaseModelEntity
BaseModelEntity.BaseModelEntityBuilder<C extends BaseModelEntity,
B extends BaseModelEntity.BaseModelEntityBuilder<C, B>> Nested classes/interfaces inherited from class gov.niem.tools.api.db.base.BaseStewardEntity
BaseStewardEntity.BaseStewardEntityBuilder<C extends BaseStewardEntity,
B extends BaseStewardEntity.BaseStewardEntityBuilder<C, B>> Nested classes/interfaces inherited from class gov.niem.tools.api.db.base.BaseEntity
BaseEntity.BaseEntityBuilder<C extends BaseEntity,
B extends BaseEntity.BaseEntityBuilder<C, B>> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BaseVersionEntity
(T prev, T next, T original, boolean isDeprecated) Creates a newBaseVersionEntity
instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
getModel()
Gets the Model that defines this object.getNext()
Corresponding entity from the next version of the model.Gets the NIEM Version object that is compatible with this object.Gets the NIEM Version number (string) that is compatible with this object.For a component in a subset, gets the component from the original source.getPrev()
Corresponding entity from the previous version of the model.abstract Version
Gets the version database id.A number which identifies a version within a model.int
hashCode()
boolean
True if an entity is deprecated; false or null otherwise.boolean
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).void
setDeprecated
(boolean isDeprecated) True if an entity is deprecated; false or null otherwise.void
Corresponding entity mapped from the next version.void
setOriginal
(T original) For a subset that reuses content from another model, this is the link to the original entity.void
Corresponding entity mapped from the previous version.toString()
Methods inherited from class gov.niem.tools.api.db.base.BaseModelEntity
getModelKey, getModelSummary, getSteward
Methods inherited from class gov.niem.tools.api.db.base.BaseStewardEntity
getStewardKey, getStewardSummary
Methods inherited from class gov.niem.tools.api.db.base.BaseEntity
getClassName, getCreatedBy, getCreatedDate, getFullIdentifier, getId, getLastModifiedBy, getLastModifiedDate, getLocalIdentifier, getParentEntity, getRoute, getTitle, setCreatedBy, setCreatedDate, setId, setLastModifiedBy, setLastModifiedDate
-
Field Details
-
prev
Corresponding entity mapped from the previous version. -
next
Corresponding entity mapped from the next version.
-
-
Constructor Details
-
BaseVersionEntity
-
BaseVersionEntity
public BaseVersionEntity() -
BaseVersionEntity
Creates a newBaseVersionEntity
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
-
getPrev
Corresponding entity from the previous version of the model. The Hibernate proxy (from lazy loading) is initialized. -
getNext
Corresponding entity from the next version of the model. The Hibernate proxy (from lazy loading) is initialized. -
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
Gets the version database id. -
getVersionSummary
-
getVersionNumber
A number which identifies a version within a model. -
getNiemVersion
Gets the NIEM Version object that is compatible with this object. -
getNiemVersionNumber
Gets the NIEM Version number (string) that is compatible with this object. -
getModel
Gets the Model that defines this object.- Specified by:
getModel
in classBaseModelEntity
-
isDeprecated
public boolean isDeprecated()True if an entity is deprecated; false or null otherwise. -
setPrev
Corresponding entity mapped from the previous version. -
setNext
Corresponding entity mapped from the next version. -
setOriginal
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
- Overrides:
toString
in classBaseModelEntity
-
equals
- Overrides:
equals
in classBaseModelEntity
-
canEqual
- Overrides:
canEqual
in classBaseModelEntity
-
hashCode
public int hashCode()- Overrides:
hashCode
in classBaseModelEntity
-