Class AggregateRootUuid

    • Constructor Detail

      • AggregateRootUuid

        public AggregateRootUuid​(@NotNull
                                 @NotNull EntityType entityType)
        Constructor with entity type.
        Parameters:
        entityType - Entity type.
      • AggregateRootUuid

        public AggregateRootUuid​(@NotNull
                                 @NotNull EntityType entityType,
                                 @NotNull
                                 @NotNull UUID uuid)
        Constructor with UUID.
        Parameters:
        entityType - Entity type.
        uuid - UUID.
    • Method Detail

      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • asString

        public final String asString()
        Description copied from interface: EntityId
        Returns the entity identifier as string.
        Specified by:
        asString in interface EntityId
        Returns:
        Entity identifier.
      • asTypedString

        public final String asTypedString()
        Description copied from interface: EntityId
        Returns the entity identifier as string with type and identifier.
        Specified by:
        asTypedString in interface EntityId
        Returns:
        Type and identifier.
      • getType

        public final EntityType getType()
        Description copied from interface: EntityId
        Returns the type represented by this identifier.
        Specified by:
        getType in interface EntityId
        Returns:
        Type of entity.
      • getBaseType

        public final Class<UUID> getBaseType()
        Specified by:
        getBaseType in interface org.fuin.objects4j.vo.ValueObjectWithBaseType<UUID>
      • asBaseType

        public final UUID asBaseType()
        Specified by:
        asBaseType in interface org.fuin.objects4j.vo.ValueObjectWithBaseType<UUID>
      • isValid

        public static boolean isValid​(String value)
        Verifies that a given string can be converted into the type.
        Parameters:
        value - Value to validate.
        Returns:
        Returns true if it's a valid type else false.
      • requireArgValid

        public static void requireArgValid​(@NotNull
                                           @NotNull String name,
                                           @NotNull
                                           @NotNull String value)
                                    throws org.fuin.objects4j.common.ConstraintViolationException
        Verifies if the argument is valid and throws an exception if this is not the case.
        Parameters:
        name - Name of the value for a possible error message.
        value - Value to check.
        Throws:
        org.fuin.objects4j.common.ConstraintViolationException - The value was not valid.