Package cz.o2.proxima.core.repository
Class AttributeDescriptorBase<T>
- java.lang.Object
-
- cz.o2.proxima.core.repository.AttributeDescriptorBase<T>
-
- All Implemented Interfaces:
AttributeDescriptor<T>
,java.io.Serializable
- Direct Known Subclasses:
AttributeDescriptorImpl
,AttributeProxyDescriptor
@Internal public abstract class AttributeDescriptorBase<T> extends java.lang.Object implements AttributeDescriptor<T>
Base class forAttributeDescriptorImpl
andAttributeProxyDescriptor
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cz.o2.proxima.core.repository.AttributeDescriptor
AttributeDescriptor.Builder
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
entity
protected java.lang.String
name
protected boolean
proxy
protected boolean
replica
protected java.net.URI
schemeUri
protected TransactionMode
transactionMode
protected ValueSerializer<T>
valueSerializer
protected boolean
wildcard
-
Constructor Summary
Constructors Constructor Description AttributeDescriptorBase(java.lang.String name, AttributeDescriptor<T> targetRead, AttributeDescriptor<T> targetWrite, boolean replica, java.net.URI schemeURI, ValueSerializer<T> valueSerializer)
AttributeDescriptorBase(java.lang.String name, java.lang.String entity, java.net.URI schemeUri, ValueSerializer<T> valueSerializer, boolean replica, TransactionMode transactionMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
ValueSerializer<T>
getValueSerializer()
Retrieve serializer for value type.int
hashCode()
boolean
isPublic()
Marker if this is a public attribute.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.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cz.o2.proxima.core.repository.AttributeDescriptor
asProxy, getEntity, getName, getSchemaTypeDescriptor, getSchemeUri, getTransactionalManagerFamilies, getTransactionMode, isProxy, isWildcard, toAttributePrefix, valueOf
-
-
-
-
Field Detail
-
entity
protected final java.lang.String entity
-
name
protected final java.lang.String name
-
schemeUri
protected final java.net.URI schemeUri
-
proxy
protected final boolean proxy
-
wildcard
protected final boolean wildcard
-
replica
protected final boolean replica
-
transactionMode
protected final TransactionMode transactionMode
-
valueSerializer
@Nullable protected final ValueSerializer<T> valueSerializer
-
-
Constructor Detail
-
AttributeDescriptorBase
public AttributeDescriptorBase(java.lang.String name, java.lang.String entity, java.net.URI schemeUri, @Nullable ValueSerializer<T> valueSerializer, boolean replica, TransactionMode transactionMode)
-
AttributeDescriptorBase
public AttributeDescriptorBase(java.lang.String name, AttributeDescriptor<T> targetRead, AttributeDescriptor<T> targetWrite, boolean replica, java.net.URI schemeURI, ValueSerializer<T> valueSerializer)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toAttributePrefix
public java.lang.String toAttributePrefix(boolean includeLastDot)
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
-
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
-
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
-
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
-
-