Module spring.data.cassandra
Class CreateUserTypeSpecification
java.lang.Object
org.springframework.data.cassandra.core.cql.keyspace.UserTypeNameSpecification
org.springframework.data.cassandra.core.cql.keyspace.UserTypeSpecification<CreateUserTypeSpecification>
org.springframework.data.cassandra.core.cql.keyspace.CreateUserTypeSpecification
- All Implemented Interfaces:
CqlSpecification
public class CreateUserTypeSpecification
extends UserTypeSpecification<CreateUserTypeSpecification>
implements CqlSpecification
Object to configure a
CREATE TYPE specification.- Since:
- 1.5
- Author:
- Fabio J. Mendes, Mark Paluch
- See Also:
-
CqlIdentifier
-
Method Summary
Modifier and TypeMethodDescriptionstatic CreateUserTypeSpecificationcreateType(com.datastax.oss.driver.api.core.CqlIdentifier typeName) Entry point into theCreateUserTypeSpecification's fluent API giventypeNameto create a type.static CreateUserTypeSpecificationcreateType(com.datastax.oss.driver.api.core.CqlIdentifier keyspace, com.datastax.oss.driver.api.core.CqlIdentifier typeName) Entry point into theCreateUserTypeSpecification's fluent API giventypeNameto create a type.static CreateUserTypeSpecificationcreateType(String typeName) Entry point into theCreateUserTypeSpecification's fluent API giventypeNameto create a type.booleanEnables the inclusion of anIF NOT EXISTSclause.ifNotExists(boolean ifNotExists) Sets the inclusion of anIF NOT EXISTSclause.Methods inherited from class org.springframework.data.cassandra.core.cql.keyspace.UserTypeSpecification
field, field, getFieldsMethods inherited from class org.springframework.data.cassandra.core.cql.keyspace.UserTypeNameSpecification
getKeyspace, getName
-
Method Details
-
createType
Entry point into theCreateUserTypeSpecification's fluent API giventypeNameto create a type. Convenient if imported statically.- Parameters:
typeName- must not null or empty.- Returns:
- a new
CreateUserTypeSpecification.
-
createType
public static CreateUserTypeSpecification createType(com.datastax.oss.driver.api.core.CqlIdentifier typeName) Entry point into theCreateUserTypeSpecification's fluent API giventypeNameto create a type. Convenient if imported statically.- Parameters:
typeName- must not null.- Returns:
- a new
CreateUserTypeSpecification.
-
createType
public static CreateUserTypeSpecification createType(@Nullable com.datastax.oss.driver.api.core.CqlIdentifier keyspace, com.datastax.oss.driver.api.core.CqlIdentifier typeName) Entry point into theCreateUserTypeSpecification's fluent API giventypeNameto create a type. Convenient if imported statically. Uses the default keyspace ifkeyspaceis null; otherwise, of thekeyspaceis not {@link null}, then the UDT name is prefixed withkeyspace.- Parameters:
keyspace- can be null.typeName- must not null.- Returns:
- a new
CreateUserTypeSpecification. - Since:
- 4.4
-
ifNotExists
Enables the inclusion of anIF NOT EXISTSclause.- Returns:
- this
CreateUserTypeSpecification.
-
ifNotExists
Sets the inclusion of anIF NOT EXISTSclause.- Parameters:
ifNotExists- true to include anIF NOT EXISTSclause, false to omit theIF NOT EXISTSclause.- Returns:
- this
CreateUserTypeSpecification.
-
getIfNotExists
public boolean getIfNotExists()- Returns:
- true if the
IF NOT EXISTSclause is included.
-