Package com.onenetwork.platform.common
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 typeint
hashCode()
java.lang.String
toString()
-
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 idmodelLevelType
- 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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-