Class LinkAttributeAccessor


  • public class LinkAttributeAccessor
    extends java.lang.Object
    Accessor for LinkModel's attributes
    • Field Detail

      • AND_CONNECTION_TEMPLATE_PROPERTY

        public static final java.lang.String AND_CONNECTION_TEMPLATE_PROPERTY
        See Also:
        Constant Field Values
      • AND_CONNECTION_PROPERTY

        public static final java.lang.String AND_CONNECTION_PROPERTY
        See Also:
        Constant Field Values
    • Method Detail

      • getAttribute

        public static <T> java.util.Optional<T> getAttribute​(LinkModel linkModel,
                                                             java.lang.String attributeQualifier,
                                                             java.lang.Class<T> attributeType)
        Retrieves attribute value from LinkModel
        Type Parameters:
        T - generic type that represents attribute type
        Parameters:
        linkModel - model with attributes
        attributeQualifier - identifier of the attribute
        attributeType - type of the attribute (the value will be casted)
        Returns:
        casted attribute value or empty if the attribute does not exist or cannot be casted