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 forAttributeDescriptorImplandAttributeProxyDescriptor.- 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.Stringentityprotected java.lang.Stringnameprotected booleanproxyprotected booleanreplicaprotected java.net.URIschemeUriprotected TransactionModetransactionModeprotected ValueSerializer<T>valueSerializerprotected booleanwildcard
-
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 booleanequals(java.lang.Object obj)java.lang.StringgetEntity()Retrieve name of the associated entity.java.lang.StringgetName()Retrieve name of the attribute.java.net.URIgetSchemeUri()Retrieve URI of the scheme of 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.booleanisReplica()booleanisWildcard()Check if this is a wildcard attribute.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.-
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, getSchemaTypeDescriptor, getTransactionalManagerFamilies, 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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:
toAttributePrefixin interfaceAttributeDescriptor<T>- Parameters:
includeLastDot-trueto include dot suffix of the prefix- Returns:
- attribute prefix with or without dot
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
isReplica
public boolean isReplica()
-
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.
-
-