Class BaseEntity

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable, ISerializableEntity
    Direct Known Subclasses:
    Edge, Node

    @Generated(value="jsii-pacmak/1.82.0 (build 2d2ddd7)",
               date="2023-08-24T23:07:44.263Z")
    @Stability(Experimental)
    public abstract class BaseEntity
    extends software.amazon.jsii.JsiiObject
    implements ISerializableEntity
    (experimental) Base class for all store entities (Node and Edges).
    • Constructor Detail

      • BaseEntity

        protected BaseEntity​(software.amazon.jsii.JsiiObjectRef objRef)
      • BaseEntity

        protected BaseEntity​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • BaseEntity

        @Stability(Experimental)
        protected BaseEntity​(@NotNull
                             IBaseEntityProps props)
        Parameters:
        props - This parameter is required.
    • Method Detail

      • addAttribute

        @Stability(Experimental)
        public void addAttribute​(@NotNull
                                 String key,
                                 @NotNull
                                 Object value)
        (experimental) Add attribute.

        Parameters:
        key - This parameter is required.
        value - This parameter is required.
      • addFlag

        @Stability(Experimental)
        public void addFlag​(@NotNull
                            FlagEnum flag)
        (experimental) Add flag.

        Parameters:
        flag - This parameter is required.
      • addMetadata

        @Stability(Experimental)
        public void addMetadata​(@NotNull
                                String metadataType,
                                @NotNull
                                Object data)
        (experimental) Add metadata entry.

        Parameters:
        metadataType - This parameter is required.
        data - This parameter is required.
      • addTag

        @Stability(Experimental)
        public void addTag​(@NotNull
                           String key,
                           @NotNull
                           String value)
        (experimental) Add tag.

        Parameters:
        key - This parameter is required.
        value - This parameter is required.
      • applyData

        @Stability(Experimental)
        public void applyData​(@NotNull
                              IBaseEntityDataProps data,
                              @Nullable
                              Boolean overwrite,
                              @Nullable
                              Boolean applyFlags)
        (experimental) Applies data (attributes, metadata, tags, flag) to entity.

        Generally used only for mutations such as collapse and consume to retain data.

        Parameters:
        data -
        • The data to apply.
        This parameter is required.
        overwrite -
        applyFlags -
        • Indicates if data is overwritten - Indicates if flags should be applied.
      • applyData

        @Stability(Experimental)
        public void applyData​(@NotNull
                              IBaseEntityDataProps data,
                              @Nullable
                              Boolean overwrite)
        (experimental) Applies data (attributes, metadata, tags, flag) to entity.

        Generally used only for mutations such as collapse and consume to retain data.

        Parameters:
        data -
        • The data to apply.
        This parameter is required.
        overwrite -
      • applyData

        @Stability(Experimental)
        public void applyData​(@NotNull
                              IBaseEntityDataProps data)
        (experimental) Applies data (attributes, metadata, tags, flag) to entity.

        Generally used only for mutations such as collapse and consume to retain data.

        Parameters:
        data -
        • The data to apply.
        This parameter is required.
      • findMetadata

        @Stability(Experimental)
        @NotNull
        public List<software.constructs.MetadataEntry> findMetadata​(@NotNull
                                                                    String metadataType)
        (experimental) Retrieves all metadata entries of a given type.

        Parameters:
        metadataType - This parameter is required.
      • getAttribute

        @Stability(Experimental)
        @NotNull
        public Object getAttribute​(@NotNull
                                   String key)
        (experimental) Get attribute by key.

        Parameters:
        key - This parameter is required.
      • getTag

        @Stability(Experimental)
        @Nullable
        public String getTag​(@NotNull
                             String key)
        (experimental) Get tag by key.

        Parameters:
        key - This parameter is required.
      • hasAttribute

        @Stability(Experimental)
        @NotNull
        public Boolean hasAttribute​(@NotNull
                                    String key,
                                    @Nullable
                                    Object value)
        (experimental) Indicates if entity has a given attribute defined, and optionally with a specific value.

        Parameters:
        key - This parameter is required.
        value -
      • hasAttribute

        @Stability(Experimental)
        @NotNull
        public Boolean hasAttribute​(@NotNull
                                    String key)
        (experimental) Indicates if entity has a given attribute defined, and optionally with a specific value.

        Parameters:
        key - This parameter is required.
      • hasFlag

        @Stability(Experimental)
        @NotNull
        public Boolean hasFlag​(@NotNull
                               FlagEnum flag)
        (experimental) Indicates if entity has a given flag.

        Parameters:
        flag - This parameter is required.
      • hasMetadata

        @Stability(Experimental)
        @NotNull
        public Boolean hasMetadata​(@NotNull
                                   String metadataType,
                                   @NotNull
                                   Object data)
        (experimental) Indicates if entity has matching metadata entry.

        Parameters:
        metadataType - This parameter is required.
        data - This parameter is required.
      • hasTag

        @Stability(Experimental)
        @NotNull
        public Boolean hasTag​(@NotNull
                              String key,
                              @Nullable
                              String value)
        (experimental) Indicates if entity has tag, optionally verifying tag value.

        Parameters:
        key - This parameter is required.
        value -
      • hasTag

        @Stability(Experimental)
        @NotNull
        public Boolean hasTag​(@NotNull
                              String key)
        (experimental) Indicates if entity has tag, optionally verifying tag value.

        Parameters:
        key - This parameter is required.
      • mutateDestroy

        @Stability(Experimental)
        public abstract void mutateDestroy​(@Nullable
                                           Boolean strict)
        (experimental) Destroy the entity be removing all references and removing from store.

        Parameters:
        strict -
        • If strict, then entity must not have any references remaining when attempting to destroy.
      • mutateDestroy

        @Stability(Experimental)
        public abstract void mutateDestroy()
        (experimental) Destroy the entity be removing all references and removing from store.
      • setAttribute

        @Stability(Experimental)
        public void setAttribute​(@NotNull
                                 String key,
                                 @NotNull
                                 Object value)
        (experimental) Set attribute.

        This will overwrite existing attribute.

        Parameters:
        key - This parameter is required.
        value - This parameter is required.
      • setTag

        @Stability(Experimental)
        public void setTag​(@NotNull
                           String key,
                           @NotNull
                           String value)
        (experimental) Set tag.

        Will overwrite existing tag.

        Parameters:
        key - This parameter is required.
        value - This parameter is required.
      • getAttributes

        @Stability(Experimental)
        @NotNull
        public Map<String,​Object> getAttributes()
        (experimental) Get readonly record of all attributes.
      • getFlags

        @Stability(Experimental)
        @NotNull
        public List<FlagEnum> getFlags()
        (experimental) Get readonly list of all flags.
      • getIsDestroyed

        @Stability(Experimental)
        @NotNull
        public Boolean getIsDestroyed()
        (experimental) Indicates if the entity has been destroyed (eg: removed from store).
      • getIsMutated

        @Stability(Experimental)
        @NotNull
        public Boolean getIsMutated()
        (experimental) Indicates if the entity has had destructive mutations applied.
      • getMetadata

        @Stability(Experimental)
        @NotNull
        public List<software.constructs.MetadataEntry> getMetadata()
        (experimental) Get readonly list of all metadata entries.
      • getStore

        @Stability(Experimental)
        @NotNull
        public Store getStore()
        (experimental) Reference to the store.
      • getTags

        @Stability(Experimental)
        @NotNull
        public Map<String,​String> getTags()
        (experimental) Get readonly record of all tags.
      • getUuid

        @Stability(Experimental)
        @NotNull
        public String getUuid()
        (experimental) Universally unique identifier.