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 CreateUserTypeSpecification
createType
(com.datastax.oss.driver.api.core.CqlIdentifier typeName) Entry point into theCreateUserTypeSpecification
's fluent API giventypeName
to create a type.static CreateUserTypeSpecification
createType
(com.datastax.oss.driver.api.core.CqlIdentifier keyspace, com.datastax.oss.driver.api.core.CqlIdentifier typeName) Entry point into theCreateUserTypeSpecification
's fluent API giventypeName
to create a type.static CreateUserTypeSpecification
createType
(String typeName) Entry point into theCreateUserTypeSpecification
's fluent API giventypeName
to create a type.boolean
Enables the inclusion of anIF NOT EXISTS
clause.ifNotExists
(boolean ifNotExists) Sets the inclusion of anIF NOT EXISTS
clause.Methods inherited from class org.springframework.data.cassandra.core.cql.keyspace.UserTypeSpecification
field, field, getFields
Methods inherited from class org.springframework.data.cassandra.core.cql.keyspace.UserTypeNameSpecification
getKeyspace, getName
-
Method Details
-
createType
Entry point into theCreateUserTypeSpecification
's fluent API giventypeName
to 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 giventypeName
to 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 giventypeName
to create a type. Convenient if imported statically. Uses the default keyspace ifkeyspace
is null; otherwise, of thekeyspace
is 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 EXISTS
clause.- Returns:
- this
CreateUserTypeSpecification
.
-
ifNotExists
Sets the inclusion of anIF NOT EXISTS
clause.- Parameters:
ifNotExists
- true to include anIF NOT EXISTS
clause, false to omit theIF NOT EXISTS
clause.- Returns:
- this
CreateUserTypeSpecification
.
-
getIfNotExists
public boolean getIfNotExists()- Returns:
- true if the
IF NOT EXISTS
clause is included.
-