Class ModelId

java.lang.Object
com.onenetwork.platform.common.ModelId
Direct Known Subclasses:
ModelReference, Scope

public class ModelId
extends java.lang.Object
Utility class to hold a surrogate id and ModelLevelType. Thus it uniquely identifies a model instance.
  • Constructor Summary

    Constructors 
    Constructor Description
    ModelId​(java.lang.Long id, com.onenetwork.platform.data.model.impl.ModelLevelType modelLevelType)
    Instantiates a new ModelId.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    java.lang.Long getId()
    Returns the model surrogate id.
    com.onenetwork.platform.data.model.impl.ModelLevelType getModelLevelType()
    Returns the model level type
    int hashCode()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ModelId

      public ModelId​(java.lang.Long id, com.onenetwork.platform.data.model.impl.ModelLevelType modelLevelType)
      Instantiates a new ModelId. Neither id nor modelLevelType can be null or a NullConstants value.
      Parameters:
      id - model's surrogate id
      modelLevelType - model's level type
  • Method Details

    • getId

      public java.lang.Long getId()
      Returns the model surrogate id.
    • getModelLevelType

      public com.onenetwork.platform.data.model.impl.ModelLevelType getModelLevelType()
      Returns the model level type
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object