Package cz.o2.proxima.core.transaction
Class KeyAttributes
- java.lang.Object
-
- cz.o2.proxima.core.transaction.KeyAttributes
-
@Experimental public class KeyAttributes extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyAttribute
ofAttributeDescriptor(EntityDescriptor entity, java.lang.String key, AttributeDescriptor<?> attributeDescriptor, long sequenceId)
CreateKeyAttribute
for given entity, key and attribute descriptor.static KeyAttribute
ofAttributeDescriptor(EntityDescriptor entity, java.lang.String key, AttributeDescriptor<?> attributeDescriptor, long sequenceId, java.lang.String attributeSuffix)
CreateKeyAttribute
for given entity, key and attribute descriptor.static KeyAttribute
ofMissingAttribute(EntityDescriptor entity, java.lang.String key, AttributeDescriptor<?> attributeDescriptor)
CreateKeyAttribute
for given entity, key and attribute descriptor.static KeyAttribute
ofMissingAttribute(EntityDescriptor entity, java.lang.String key, AttributeDescriptor<?> attributeDescriptor, java.lang.String attributeSuffix)
CreateKeyAttribute
for given entity, key and attribute descriptor.static KeyAttribute
ofStreamElement(StreamElement element)
Create aKeyAttribute
for givenStreamElement
.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 ofKeyAttributes
that represent a query for wildcard attribute and the returned
-
-
-
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 ofKeyAttributes
that represent a query for wildcard attribute and the returned- Type Parameters:
E
- type parameter- Parameters:
entity
- the entity descriptorkey
- the key of the entitywildcardAttribute
- the descriptor of wildcard attributeelements
- the elements returned by query- Returns:
-
ofAttributeDescriptor
public static KeyAttribute ofAttributeDescriptor(EntityDescriptor entity, java.lang.String key, AttributeDescriptor<?> attributeDescriptor, long sequenceId)
CreateKeyAttribute
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 descriptorkey
- the entity keyattributeDescriptor
- descriptor of wildcard or regular attributesequenceId
- 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)
CreateKeyAttribute
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 descriptorkey
- the entity keyattributeDescriptor
- descriptor of wildcard or regular attributesequenceId
- sequence ID of the read attributeattributeSuffix
- a specific attribute suffix whenattributeDescriptor
is wildcard attribute
-
ofMissingAttribute
public static KeyAttribute ofMissingAttribute(EntityDescriptor entity, java.lang.String key, AttributeDescriptor<?> attributeDescriptor)
CreateKeyAttribute
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 descriptorkey
- the entity keyattributeDescriptor
- descriptor of wildcard or regular attribute
-
ofMissingAttribute
public static KeyAttribute ofMissingAttribute(EntityDescriptor entity, java.lang.String key, AttributeDescriptor<?> attributeDescriptor, java.lang.String attributeSuffix)
CreateKeyAttribute
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 descriptorkey
- the entity keyattributeDescriptor
- descriptor of wildcard or regular attributeattributeSuffix
- a specific attribute suffix whenattributeDescriptor
is wildcard attribute
-
ofStreamElement
public static KeyAttribute ofStreamElement(StreamElement element)
Create aKeyAttribute
for givenStreamElement
.- Parameters:
element
- theStreamElement
that should be part of the transaction
-
-