Package cz.o2.proxima.core.repository
Class EntityAwareAttributeDescriptor<T>
- java.lang.Object
-
- cz.o2.proxima.core.repository.EntityAwareAttributeDescriptor<T>
-
- All Implemented Interfaces:
AttributeDescriptor<T>
,java.io.Serializable
- Direct Known Subclasses:
EntityAwareAttributeDescriptor.Regular
,EntityAwareAttributeDescriptor.Wildcard
public class EntityAwareAttributeDescriptor<T> extends java.lang.Object implements AttributeDescriptor<T>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EntityAwareAttributeDescriptor.Regular<T>
static class
EntityAwareAttributeDescriptor.Wildcard<T>
-
Nested classes/interfaces inherited from interface cz.o2.proxima.core.repository.AttributeDescriptor
AttributeDescriptor.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeProxyDescriptor<T>
asProxy()
boolean
equals(java.lang.Object obj)
java.lang.String
getEntity()
Retrieve name of the associated entity.java.lang.String
getName()
Retrieve name of the attribute.SchemaDescriptors.SchemaTypeDescriptor<T>
getSchemaTypeDescriptor()
ReturnSchemaDescriptors.SchemaTypeDescriptor
for given attribute value.java.net.URI
getSchemeUri()
Retrieve URI of the scheme of this attribute.java.util.List<java.lang.String>
getTransactionalManagerFamilies()
Retrieve transactional manager families for this attribute.TransactionMode
getTransactionMode()
Retrieve type of transactional support of this attribute.ValueSerializer<T>
getValueSerializer()
Retrieve serializer for value type.int
hashCode()
boolean
isProxy()
Check if this is a proxy attribute.boolean
isPublic()
Marker if this is a public attribute.boolean
isWildcard()
Check if this is a wildcard attribute.java.lang.String
toAttributePrefix()
Retrieve name of the attribute if not wildcard, otherwise retrieve the prefix without the last asterisk.java.lang.String
toAttributePrefix(boolean includeLastDot)
Retrieve name of the attribute if not wildcard, otherwise retrieve the prefix without the last asterisk.AttributeDescriptor.Builder
toBuilder(Repository repo)
Convert this attribute back to builder.java.lang.String
toString()
java.util.Optional<T>
valueOf(StreamElement el)
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:AttributeDescriptor
Retrieve name of the attribute.- Specified by:
getName
in interfaceAttributeDescriptor<T>
- Returns:
- name of the attribute
-
isWildcard
public boolean isWildcard()
Description copied from interface:AttributeDescriptor
Check if this is a wildcard attribute.- Specified by:
isWildcard
in interfaceAttributeDescriptor<T>
- Returns:
true
when this is wildcard attribute
-
getSchemeUri
public java.net.URI getSchemeUri()
Description copied from interface:AttributeDescriptor
Retrieve URI of the scheme of this attribute.- Specified by:
getSchemeUri
in interfaceAttributeDescriptor<T>
- Returns:
- scheme URI of this attribute
-
getEntity
public java.lang.String getEntity()
Description copied from interface:AttributeDescriptor
Retrieve name of the associated entity.- Specified by:
getEntity
in interfaceAttributeDescriptor<T>
- Returns:
- name of the associated entity
-
toAttributePrefix
public java.lang.String toAttributePrefix(boolean includeLastDot)
Description copied from interface:AttributeDescriptor
Retrieve name of the attribute if not wildcard, otherwise retrieve the prefix without the last asterisk.- Specified by:
toAttributePrefix
in interfaceAttributeDescriptor<T>
- Parameters:
includeLastDot
-true
to include dot suffix of the prefix- Returns:
- attribute prefix with or without dot
-
getValueSerializer
public ValueSerializer<T> getValueSerializer()
Description copied from interface:AttributeDescriptor
Retrieve serializer for value type.- Specified by:
getValueSerializer
in interfaceAttributeDescriptor<T>
- Returns:
ValueSerializer
of this attribute's value
-
isPublic
public boolean isPublic()
Description copied from interface:AttributeDescriptor
Marker if this is a public attribute.- Specified by:
isPublic
in interfaceAttributeDescriptor<T>
- Returns:
true
it this is public attribute
-
toBuilder
public AttributeDescriptor.Builder toBuilder(Repository repo)
Description copied from interface:AttributeDescriptor
Convert this attribute back to builder.- Specified by:
toBuilder
in interfaceAttributeDescriptor<T>
- Parameters:
repo
- the repository- Returns:
- builder representing this attribute
-
toAttributePrefix
public java.lang.String toAttributePrefix()
Description copied from interface:AttributeDescriptor
Retrieve name of the attribute if not wildcard, otherwise retrieve the prefix without the last asterisk.- Specified by:
toAttributePrefix
in interfaceAttributeDescriptor<T>
- Returns:
- attribute prefix of this attribute
-
isProxy
public boolean isProxy()
Description copied from interface:AttributeDescriptor
Check if this is a proxy attribute.- Specified by:
isProxy
in interfaceAttributeDescriptor<T>
- Returns:
true
is this is proxyfalse
otherwise
-
getTransactionMode
public TransactionMode getTransactionMode()
Description copied from interface:AttributeDescriptor
Retrieve type of transactional support of this attribute.- Specified by:
getTransactionMode
in interfaceAttributeDescriptor<T>
- Returns:
TransactionMode
of the attribute.
-
asProxy
public AttributeProxyDescriptor<T> asProxy() throws java.lang.ClassCastException
Description copied from interface:AttributeDescriptor
Convert this object toAttributeProxyDescriptor
iffAttributeDescriptor.isProxy()
returnstrue
. ThrowClassCastException
otherwise.- Specified by:
asProxy
in interfaceAttributeDescriptor<T>
- Returns:
- this converted as
AttributeProxyDescriptor
- Throws:
java.lang.ClassCastException
- whenAttributeDescriptor.isProxy()
returns false
-
valueOf
public java.util.Optional<T> valueOf(StreamElement el)
- Specified by:
valueOf
in interfaceAttributeDescriptor<T>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getTransactionalManagerFamilies
public java.util.List<java.lang.String> getTransactionalManagerFamilies()
Description copied from interface:AttributeDescriptor
Retrieve transactional manager families for this attribute.- Specified by:
getTransactionalManagerFamilies
in interfaceAttributeDescriptor<T>
-
getSchemaTypeDescriptor
public SchemaDescriptors.SchemaTypeDescriptor<T> getSchemaTypeDescriptor()
Description copied from interface:AttributeDescriptor
ReturnSchemaDescriptors.SchemaTypeDescriptor
for given attribute value.- Specified by:
getSchemaTypeDescriptor
in interfaceAttributeDescriptor<T>
- Returns:
- value descriptor
-
-