Record Class ElementMetadata
java.lang.Object
java.lang.Record
dev.getelements.elements.sdk.model.system.ElementMetadata
- Record Components:
type- the type ofElementdefinition- the definition of theElementservices- the services provided by theElementproducedEvents- the events produced by theElementconsumedEvents- the events consumed by theElementdependencies- the dependencies of theElementattributes- the attributes of theElementdefaultAttributes- the default attributes of theElement
public record ElementMetadata(ElementType type, ElementDefinitionMetadata definition, List<ElementServiceMetadata> services, List<ElementEventProducerMetadata> producedEvents, List<ElementEventConsumerMetadata> consumedEvents, List<ElementDependencyRecord> dependencies, Map<String,Object> attributes, List<ElementDefaultAttributeRecord> defaultAttributes)
extends Record
Record type for the
ElementMetadata. This contains a summary of all the metadata in an ElementRecord
but only types which can be serialized (no ClassLoaders, etc).-
Constructor Summary
ConstructorsConstructorDescriptionElementMetadata(ElementType type, ElementDefinitionMetadata definition, List<ElementServiceMetadata> services, List<ElementEventProducerMetadata> producedEvents, List<ElementEventConsumerMetadata> consumedEvents, List<ElementDependencyRecord> dependencies, Map<String, Object> attributes, List<ElementDefaultAttributeRecord> defaultAttributes) Creates an instance of aElementMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.Returns the value of theconsumedEventsrecord component.Returns the value of thedefaultAttributesrecord component.Returns the value of thedefinitionrecord component.Returns the value of thedependenciesrecord component.final booleanIndicates whether some other object is "equal to" this one.static ElementMetadataConvenience method to construct an ElementMetadata from anElement.static ElementMetadatafrom(ElementRecord element) Convenience method to construct and ElementMetadata from anElementRecord.final inthashCode()Returns a hash code value for this object.Returns the value of theproducedEventsrecord component.services()Returns the value of theservicesrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ElementMetadata
public ElementMetadata(ElementType type, ElementDefinitionMetadata definition, List<ElementServiceMetadata> services, List<ElementEventProducerMetadata> producedEvents, List<ElementEventConsumerMetadata> consumedEvents, List<ElementDependencyRecord> dependencies, Map<String, Object> attributes, List<ElementDefaultAttributeRecord> defaultAttributes) Creates an instance of aElementMetadatarecord class.- Parameters:
type- the value for thetyperecord componentdefinition- the value for thedefinitionrecord componentservices- the value for theservicesrecord componentproducedEvents- the value for theproducedEventsrecord componentconsumedEvents- the value for theconsumedEventsrecord componentdependencies- the value for thedependenciesrecord componentattributes- the value for theattributesrecord componentdefaultAttributes- the value for thedefaultAttributesrecord component
-
-
Method Details
-
from
Convenience method to construct an ElementMetadata from anElement.- Parameters:
element- theElement- Returns:
- the newly created
ElementMetadata
-
from
Convenience method to construct and ElementMetadata from anElementRecord.- Parameters:
element- theElementRecord- Returns:
- the newly created
ElementMetadata
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
definition
Returns the value of thedefinitionrecord component.- Returns:
- the value of the
definitionrecord component
-
services
Returns the value of theservicesrecord component.- Returns:
- the value of the
servicesrecord component
-
producedEvents
Returns the value of theproducedEventsrecord component.- Returns:
- the value of the
producedEventsrecord component
-
consumedEvents
Returns the value of theconsumedEventsrecord component.- Returns:
- the value of the
consumedEventsrecord component
-
dependencies
Returns the value of thedependenciesrecord component.- Returns:
- the value of the
dependenciesrecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
defaultAttributes
Returns the value of thedefaultAttributesrecord component.- Returns:
- the value of the
defaultAttributesrecord component
-