Class KeyAttributes


  • @Experimental
    public class KeyAttributes
    extends java.lang.Object
    • Method Detail

      • ofWildcardQueryElements

        public static <E extends StreamElement> java.util.List<KeyAttribute> ofWildcardQueryElements​(EntityDescriptor entity,
                                                                                                     java.lang.String key,
                                                                                                     AttributeDescriptor<?> wildcardAttribute,
                                                                                                     java.lang.Iterable<E> elements)
        Create a list of KeyAttributes that represent a query for wildcard attribute and the returned
        Type Parameters:
        E - type parameter
        Parameters:
        entity - the entity descriptor
        key - the key of the entity
        wildcardAttribute - the descriptor of wildcard attribute
        elements - the elements returned by query
        Returns:
      • ofAttributeDescriptor

        public static KeyAttribute ofAttributeDescriptor​(EntityDescriptor entity,
                                                         java.lang.String key,
                                                         AttributeDescriptor<?> attributeDescriptor,
                                                         long sequenceId)
        Create KeyAttribute for given entity, key and attribute descriptor. This describes either all wildcard attributes of that key or a single regular attribute.
        Parameters:
        entity - the entity descriptor
        key - the entity key
        attributeDescriptor - descriptor of wildcard or regular attribute
        sequenceId - sequence ID of the read attribute
      • ofAttributeDescriptor

        public static KeyAttribute ofAttributeDescriptor​(EntityDescriptor entity,
                                                         java.lang.String key,
                                                         AttributeDescriptor<?> attributeDescriptor,
                                                         long sequenceId,
                                                         @Nullable
                                                         java.lang.String attributeSuffix)
        Create KeyAttribute for given entity, key and attribute descriptor. This describes either all wildcard attributes of that key or a single regular attribute.
        Parameters:
        entity - the entity descriptor
        key - the entity key
        attributeDescriptor - descriptor of wildcard or regular attribute
        sequenceId - sequence ID of the read attribute
        attributeSuffix - a specific attribute suffix when attributeDescriptor is wildcard attribute
      • ofMissingAttribute

        public static KeyAttribute ofMissingAttribute​(EntityDescriptor entity,
                                                      java.lang.String key,
                                                      AttributeDescriptor<?> attributeDescriptor)
        Create KeyAttribute for given entity, key and attribute descriptor. This represents a missing value, that is a value that was either not-yet written or already deleted.
        Parameters:
        entity - the entity descriptor
        key - the entity key
        attributeDescriptor - descriptor of wildcard or regular attribute
      • ofMissingAttribute

        public static KeyAttribute ofMissingAttribute​(EntityDescriptor entity,
                                                      java.lang.String key,
                                                      AttributeDescriptor<?> attributeDescriptor,
                                                      java.lang.String attributeSuffix)
        Create KeyAttribute for given entity, key and attribute descriptor. This represents a missing value, that is a value that was either not-yet written or already deleted.
        Parameters:
        entity - the entity descriptor
        key - the entity key
        attributeDescriptor - descriptor of wildcard or regular attribute
        attributeSuffix - a specific attribute suffix when attributeDescriptor is wildcard attribute