Class BasicCassandraPersistentTupleProperty
java.lang.Object
org.springframework.data.mapping.model.AbstractPersistentProperty<P>
org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<CassandraPersistentProperty>
org.springframework.data.cassandra.core.mapping.BasicCassandraPersistentProperty
org.springframework.data.cassandra.core.mapping.BasicCassandraPersistentTupleProperty
- All Implemented Interfaces:
Aware
,ApplicationContextAware
,CassandraPersistentProperty
,PersistentProperty<CassandraPersistentProperty>
Cassandra Tuple specific
CassandraPersistentProperty
implementation.- Since:
- 2.1
- Author:
- Mark Paluch, Frank Spitulski, Aleksei Zotov
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBasicCassandraPersistentTupleProperty
(Property property, CassandraPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder) Create a newBasicCassandraPersistentTupleProperty
. -
Method Summary
Modifier and TypeMethodDescriptioncom.datastax.oss.driver.api.core.CqlIdentifier
The name of the single column to which the property is persisted.The name of the element ordinal to which the property is persisted when the owning type is a mapped tuple.The ordering (ascending or descending) for the column.boolean
Whether the property is a cluster key column.boolean
Whether the property is a composite primary key.boolean
boolean
Whether the property is a partition key column.boolean
Whether the property is a partition key column or a cluster key columnboolean
Whether the property maps to a static column.void
setColumnName
(com.datastax.oss.driver.api.core.CqlIdentifier columnName) If this property is mapped with a single column, set the column name to the givenCqlIdentifier
.Methods inherited from class org.springframework.data.cassandra.core.mapping.BasicCassandraPersistentProperty
createAssociation, findAnnotatedType, getAssociation, getOwner, hasExplicitColumnName, isMapLike, setApplicationContext, setForceQuote, setNamingStrategy
Methods inherited from class org.springframework.data.mapping.model.AnnotationBasedPersistentProperty
findAnnotation, findPropertyOrOwnerAnnotation, getAssociationTargetTypeInformation, getSpelExpression, isAnnotationPresent, isAssociation, isIdProperty, isTransient, isVersionProperty, isWritable, toString, usePropertyAccess
Methods inherited from class org.springframework.data.mapping.model.AbstractPersistentProperty
equals, getActualType, getActualTypeInformation, getAssociationTargetType, getComponentType, getField, getGetter, getMapValueType, getName, getPersistentEntityTypeInformation, getProperty, getRawType, getSetter, getType, getTypeInformation, getWither, hashCode, isArray, isCollectionLike, isEntity, isImmutable, isMap
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.data.cassandra.core.mapping.CassandraPersistentProperty
getRequiredColumnName, getRequiredOrdinal, hasOrdinal, setColumnName
Methods inherited from interface org.springframework.data.mapping.PersistentProperty
findAnnotation, findPropertyOrOwnerAnnotation, getAccessorForOwner, getActualType, getAssociationTargetType, getAssociationTargetTypeInformation, getComponentType, getField, getGetter, getMapValueType, getName, getPersistentEntityTypeInformation, getRawType, getRequiredAnnotation, getRequiredAssociation, getRequiredField, getRequiredGetter, getRequiredSetter, getRequiredWither, getSetter, getSpelExpression, getType, getTypeInformation, getWither, hasActualTypeAnnotation, isAnnotationPresent, isArray, isAssociation, isCollectionLike, isEntity, isIdProperty, isImmutable, isMap, isTransient, isVersionProperty, isWritable, usePropertyAccess
-
Constructor Details
-
BasicCassandraPersistentTupleProperty
public BasicCassandraPersistentTupleProperty(Property property, CassandraPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder) Create a newBasicCassandraPersistentTupleProperty
.- Parameters:
property
- the actualProperty
in the domain entity corresponding to this persistent entity.owner
- the containing object orCassandraPersistentEntity
of this persistent property.simpleTypeHolder
- mapping of Java [simple|wrapper] types to Cassandra data types.
-
-
Method Details
-
getColumnName
public com.datastax.oss.driver.api.core.CqlIdentifier getColumnName()Description copied from interface:CassandraPersistentProperty
The name of the single column to which the property is persisted.- Specified by:
getColumnName
in interfaceCassandraPersistentProperty
- Overrides:
getColumnName
in classBasicCassandraPersistentProperty
-
getOrdinal
Description copied from interface:CassandraPersistentProperty
The name of the element ordinal to which the property is persisted when the owning type is a mapped tuple.- Specified by:
getOrdinal
in interfaceCassandraPersistentProperty
- Overrides:
getOrdinal
in classBasicCassandraPersistentProperty
-
getPrimaryKeyOrdering
Description copied from interface:CassandraPersistentProperty
The ordering (ascending or descending) for the column. Valid only for primary key columns; returns null for non-primary key columns.- Specified by:
getPrimaryKeyOrdering
in interfaceCassandraPersistentProperty
- Overrides:
getPrimaryKeyOrdering
in classBasicCassandraPersistentProperty
-
isClusterKeyColumn
public boolean isClusterKeyColumn()Description copied from interface:CassandraPersistentProperty
Whether the property is a cluster key column.- Specified by:
isClusterKeyColumn
in interfaceCassandraPersistentProperty
- Overrides:
isClusterKeyColumn
in classBasicCassandraPersistentProperty
-
isCompositePrimaryKey
public boolean isCompositePrimaryKey()Description copied from interface:CassandraPersistentProperty
Whether the property is a composite primary key.- Specified by:
isCompositePrimaryKey
in interfaceCassandraPersistentProperty
- Overrides:
isCompositePrimaryKey
in classBasicCassandraPersistentProperty
-
isPartitionKeyColumn
public boolean isPartitionKeyColumn()Description copied from interface:CassandraPersistentProperty
Whether the property is a partition key column.- Specified by:
isPartitionKeyColumn
in interfaceCassandraPersistentProperty
- Overrides:
isPartitionKeyColumn
in classBasicCassandraPersistentProperty
-
isPrimaryKeyColumn
public boolean isPrimaryKeyColumn()Description copied from interface:CassandraPersistentProperty
Whether the property is a partition key column or a cluster key column- Specified by:
isPrimaryKeyColumn
in interfaceCassandraPersistentProperty
- Overrides:
isPrimaryKeyColumn
in classBasicCassandraPersistentProperty
- See Also:
-
isStaticColumn
public boolean isStaticColumn()Description copied from interface:CassandraPersistentProperty
Whether the property maps to a static column.- Specified by:
isStaticColumn
in interfaceCassandraPersistentProperty
- Overrides:
isStaticColumn
in classBasicCassandraPersistentProperty
-
isEmbedded
public boolean isEmbedded()- Returns:
- true if the property should be embedded.
-
setColumnName
public void setColumnName(com.datastax.oss.driver.api.core.CqlIdentifier columnName) Description copied from interface:CassandraPersistentProperty
If this property is mapped with a single column, set the column name to the givenCqlIdentifier
. If this property is not mapped by a single column, throwsIllegalStateException
. If the given column name is null,IllegalArgumentException
is thrown.- Specified by:
setColumnName
in interfaceCassandraPersistentProperty
- Overrides:
setColumnName
in classBasicCassandraPersistentProperty
- Parameters:
columnName
- must not be null.
-