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.CqlIdentifierThe 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.booleanWhether the property is a cluster key column.booleanWhether the property is a composite primary key.booleanbooleanWhether the property is a partition key column.booleanWhether the property is a partition key column or a cluster key columnbooleanWhether the property maps to a static column.voidsetColumnName(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, setNamingStrategyMethods inherited from class org.springframework.data.mapping.model.AnnotationBasedPersistentProperty
findAnnotation, findPropertyOrOwnerAnnotation, getAssociationTargetTypeInformation, getSpelExpression, isAnnotationPresent, isAssociation, isIdProperty, isTransient, isVersionProperty, isWritable, toString, usePropertyAccessMethods 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, isMapMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.data.cassandra.core.mapping.CassandraPersistentProperty
getRequiredColumnName, getRequiredOrdinal, hasOrdinal, setColumnNameMethods 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 actualPropertyin the domain entity corresponding to this persistent entity.owner- the containing object orCassandraPersistentEntityof 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:CassandraPersistentPropertyThe name of the single column to which the property is persisted.- Specified by:
getColumnNamein interfaceCassandraPersistentProperty- Overrides:
getColumnNamein classBasicCassandraPersistentProperty
-
getOrdinal
Description copied from interface:CassandraPersistentPropertyThe name of the element ordinal to which the property is persisted when the owning type is a mapped tuple.- Specified by:
getOrdinalin interfaceCassandraPersistentProperty- Overrides:
getOrdinalin classBasicCassandraPersistentProperty
-
getPrimaryKeyOrdering
Description copied from interface:CassandraPersistentPropertyThe ordering (ascending or descending) for the column. Valid only for primary key columns; returns null for non-primary key columns.- Specified by:
getPrimaryKeyOrderingin interfaceCassandraPersistentProperty- Overrides:
getPrimaryKeyOrderingin classBasicCassandraPersistentProperty
-
isClusterKeyColumn
public boolean isClusterKeyColumn()Description copied from interface:CassandraPersistentPropertyWhether the property is a cluster key column.- Specified by:
isClusterKeyColumnin interfaceCassandraPersistentProperty- Overrides:
isClusterKeyColumnin classBasicCassandraPersistentProperty
-
isCompositePrimaryKey
public boolean isCompositePrimaryKey()Description copied from interface:CassandraPersistentPropertyWhether the property is a composite primary key.- Specified by:
isCompositePrimaryKeyin interfaceCassandraPersistentProperty- Overrides:
isCompositePrimaryKeyin classBasicCassandraPersistentProperty
-
isPartitionKeyColumn
public boolean isPartitionKeyColumn()Description copied from interface:CassandraPersistentPropertyWhether the property is a partition key column.- Specified by:
isPartitionKeyColumnin interfaceCassandraPersistentProperty- Overrides:
isPartitionKeyColumnin classBasicCassandraPersistentProperty
-
isPrimaryKeyColumn
public boolean isPrimaryKeyColumn()Description copied from interface:CassandraPersistentPropertyWhether the property is a partition key column or a cluster key column- Specified by:
isPrimaryKeyColumnin interfaceCassandraPersistentProperty- Overrides:
isPrimaryKeyColumnin classBasicCassandraPersistentProperty- See Also:
-
isStaticColumn
public boolean isStaticColumn()Description copied from interface:CassandraPersistentPropertyWhether the property maps to a static column.- Specified by:
isStaticColumnin interfaceCassandraPersistentProperty- Overrides:
isStaticColumnin 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:CassandraPersistentPropertyIf 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,IllegalArgumentExceptionis thrown.- Specified by:
setColumnNamein interfaceCassandraPersistentProperty- Overrides:
setColumnNamein classBasicCassandraPersistentProperty- Parameters:
columnName- must not be null.
-