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 classEntityAwareAttributeDescriptor.Regular<T>static classEntityAwareAttributeDescriptor.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()booleanequals(java.lang.Object obj)java.lang.StringgetEntity()Retrieve name of the associated entity.java.lang.StringgetName()Retrieve name of the attribute.SchemaDescriptors.SchemaTypeDescriptor<T>getSchemaTypeDescriptor()ReturnSchemaDescriptors.SchemaTypeDescriptorfor given attribute value.java.net.URIgetSchemeUri()Retrieve URI of the scheme of this attribute.java.util.List<java.lang.String>getTransactionalManagerFamilies()Retrieve transactional manager families for this attribute.TransactionModegetTransactionMode()Retrieve type of transactional support of this attribute.ValueSerializer<T>getValueSerializer()Retrieve serializer for value type.inthashCode()booleanisProxy()Check if this is a proxy attribute.booleanisPublic()Marker if this is a public attribute.booleanisWildcard()Check if this is a wildcard attribute.java.lang.StringtoAttributePrefix()Retrieve name of the attribute if not wildcard, otherwise retrieve the prefix without the last asterisk.java.lang.StringtoAttributePrefix(boolean includeLastDot)Retrieve name of the attribute if not wildcard, otherwise retrieve the prefix without the last asterisk.AttributeDescriptor.BuildertoBuilder(Repository repo)Convert this attribute back to builder.java.lang.StringtoString()java.util.Optional<T>valueOf(StreamElement el)
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:AttributeDescriptorRetrieve name of the attribute.- Specified by:
getNamein interfaceAttributeDescriptor<T>- Returns:
- name of the attribute
-
isWildcard
public boolean isWildcard()
Description copied from interface:AttributeDescriptorCheck if this is a wildcard attribute.- Specified by:
isWildcardin interfaceAttributeDescriptor<T>- Returns:
truewhen this is wildcard attribute
-
getSchemeUri
public java.net.URI getSchemeUri()
Description copied from interface:AttributeDescriptorRetrieve URI of the scheme of this attribute.- Specified by:
getSchemeUriin interfaceAttributeDescriptor<T>- Returns:
- scheme URI of this attribute
-
getEntity
public java.lang.String getEntity()
Description copied from interface:AttributeDescriptorRetrieve name of the associated entity.- Specified by:
getEntityin interfaceAttributeDescriptor<T>- Returns:
- name of the associated entity
-
toAttributePrefix
public java.lang.String toAttributePrefix(boolean includeLastDot)
Description copied from interface:AttributeDescriptorRetrieve name of the attribute if not wildcard, otherwise retrieve the prefix without the last asterisk.- Specified by:
toAttributePrefixin interfaceAttributeDescriptor<T>- Parameters:
includeLastDot-trueto include dot suffix of the prefix- Returns:
- attribute prefix with or without dot
-
getValueSerializer
public ValueSerializer<T> getValueSerializer()
Description copied from interface:AttributeDescriptorRetrieve serializer for value type.- Specified by:
getValueSerializerin interfaceAttributeDescriptor<T>- Returns:
ValueSerializerof this attribute's value
-
isPublic
public boolean isPublic()
Description copied from interface:AttributeDescriptorMarker if this is a public attribute.- Specified by:
isPublicin interfaceAttributeDescriptor<T>- Returns:
trueit this is public attribute
-
toBuilder
public AttributeDescriptor.Builder toBuilder(Repository repo)
Description copied from interface:AttributeDescriptorConvert this attribute back to builder.- Specified by:
toBuilderin interfaceAttributeDescriptor<T>- Parameters:
repo- the repository- Returns:
- builder representing this attribute
-
toAttributePrefix
public java.lang.String toAttributePrefix()
Description copied from interface:AttributeDescriptorRetrieve name of the attribute if not wildcard, otherwise retrieve the prefix without the last asterisk.- Specified by:
toAttributePrefixin interfaceAttributeDescriptor<T>- Returns:
- attribute prefix of this attribute
-
isProxy
public boolean isProxy()
Description copied from interface:AttributeDescriptorCheck if this is a proxy attribute.- Specified by:
isProxyin interfaceAttributeDescriptor<T>- Returns:
trueis this is proxyfalseotherwise
-
getTransactionMode
public TransactionMode getTransactionMode()
Description copied from interface:AttributeDescriptorRetrieve type of transactional support of this attribute.- Specified by:
getTransactionModein interfaceAttributeDescriptor<T>- Returns:
TransactionModeof the attribute.
-
asProxy
public AttributeProxyDescriptor<T> asProxy() throws java.lang.ClassCastException
Description copied from interface:AttributeDescriptorConvert this object toAttributeProxyDescriptoriffAttributeDescriptor.isProxy()returnstrue. ThrowClassCastExceptionotherwise.- Specified by:
asProxyin 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:
valueOfin interfaceAttributeDescriptor<T>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getTransactionalManagerFamilies
public java.util.List<java.lang.String> getTransactionalManagerFamilies()
Description copied from interface:AttributeDescriptorRetrieve transactional manager families for this attribute.- Specified by:
getTransactionalManagerFamiliesin interfaceAttributeDescriptor<T>
-
getSchemaTypeDescriptor
public SchemaDescriptors.SchemaTypeDescriptor<T> getSchemaTypeDescriptor()
Description copied from interface:AttributeDescriptorReturnSchemaDescriptors.SchemaTypeDescriptorfor given attribute value.- Specified by:
getSchemaTypeDescriptorin interfaceAttributeDescriptor<T>- Returns:
- value descriptor
-
-