public class CreateKeyspaceSpecification extends KeyspaceSpecification<CreateKeyspaceSpecification>
options
Constructor and Description |
---|
CreateKeyspaceSpecification() |
CreateKeyspaceSpecification(KeyspaceIdentifier name) |
CreateKeyspaceSpecification(String name) |
Modifier and Type | Method and Description |
---|---|
static CreateKeyspaceSpecification |
createKeyspace()
Entry point into the
CreateKeyspaceSpecification 's fluent API to create a keyspace. |
static CreateKeyspaceSpecification |
createKeyspace(KeyspaceIdentifier name)
Entry point into the
CreateKeyspaceSpecification 's fluent API to create a keyspace. |
static CreateKeyspaceSpecification |
createKeyspace(String name)
Entry point into the
CreateKeyspaceSpecification 's fluent API to create a keyspace. |
boolean |
getIfNotExists() |
CreateKeyspaceSpecification |
ifNotExists()
Causes the inclusion of an
IF NOT EXISTS clause. |
CreateKeyspaceSpecification |
ifNotExists(boolean ifNotExists)
Toggles the inclusion of an
IF NOT EXISTS clause. |
CreateKeyspaceSpecification |
name(KeyspaceIdentifier name)
Sets the keyspace name.
|
CreateKeyspaceSpecification |
name(String name)
Sets the keyspace name.
|
CreateKeyspaceSpecification |
with(KeyspaceOption option)
Convenience method that calls
with(option, null) . |
CreateKeyspaceSpecification |
with(KeyspaceOption option,
Object value)
Sets the given table option.
|
CreateKeyspaceSpecification |
with(String name,
Object value,
boolean escape,
boolean quote)
Adds the given option by name to this keyspaces's options.
|
CreateKeyspaceSpecification |
withNetworkReplication(DataCenterReplication... dcrs) |
CreateKeyspaceSpecification |
withSimpleReplication() |
CreateKeyspaceSpecification |
withSimpleReplication(long replicationFactor) |
getOptions
equals, getName, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getName, getOptions
public CreateKeyspaceSpecification()
public CreateKeyspaceSpecification(String name)
public CreateKeyspaceSpecification(KeyspaceIdentifier name)
public static CreateKeyspaceSpecification createKeyspace()
CreateKeyspaceSpecification
's fluent API to create a keyspace. Convenient if imported
statically.public static CreateKeyspaceSpecification createKeyspace(String name)
CreateKeyspaceSpecification
's fluent API to create a keyspace. Convenient if imported
statically.public static CreateKeyspaceSpecification createKeyspace(KeyspaceIdentifier name)
CreateKeyspaceSpecification
's fluent API to create a keyspace. Convenient if imported
statically.public CreateKeyspaceSpecification ifNotExists()
IF NOT EXISTS
clause.public CreateKeyspaceSpecification ifNotExists(boolean ifNotExists)
IF NOT EXISTS
clause.public boolean getIfNotExists()
public CreateKeyspaceSpecification withSimpleReplication()
public CreateKeyspaceSpecification withSimpleReplication(long replicationFactor)
public CreateKeyspaceSpecification withNetworkReplication(DataCenterReplication... dcrs)
public CreateKeyspaceSpecification name(String name)
KeyspaceActionSpecification
name
in class KeyspaceOptionsSpecification<KeyspaceSpecification<CreateKeyspaceSpecification>>
public CreateKeyspaceSpecification name(KeyspaceIdentifier name)
KeyspaceActionSpecification
name
in class KeyspaceActionSpecification<KeyspaceOptionsSpecification<KeyspaceSpecification<CreateKeyspaceSpecification>>>
public CreateKeyspaceSpecification with(KeyspaceOption option)
KeyspaceOptionsSpecification
with(option, null)
.with
in class KeyspaceOptionsSpecification<KeyspaceSpecification<CreateKeyspaceSpecification>>
public CreateKeyspaceSpecification with(KeyspaceOption option, Object value)
KeyspaceOptionsSpecification
KeyspaceOptionsSpecification.with(String, Object, boolean, boolean)
appropriately from the given KeyspaceOption
and value for
that option.with
in class KeyspaceOptionsSpecification<KeyspaceSpecification<CreateKeyspaceSpecification>>
option
- The option to set.value
- The value of the option. Must be type-compatible with the KeyspaceOption
.KeyspaceOptionsSpecification.with(String, Object, boolean, boolean)
public CreateKeyspaceSpecification with(String name, Object value, boolean escape, boolean quote)
KeyspaceOptionsSpecification
null
values are considered single string options where the name of the option is the
string to be used. Otherwise, the result of Object.toString()
is considered to be the value of the option
with the given name. The value, after conversion to string, may have embedded single quotes escaped according to
parameter escape
and may be single-quoted according to parameter quote
.with
in class KeyspaceOptionsSpecification<KeyspaceSpecification<CreateKeyspaceSpecification>>
name
- The name of the optionvalue
- The value of the option. If null
, the value is ignored and the option is considered to be
composed of only the name, otherwise the value's Object.toString()
value is used.escape
- Whether to escape the value via CqlStringUtils.escapeSingle(Object)
. Ignored if given value
is an instance of a Map
.quote
- Whether to quote the value via CqlStringUtils.singleQuote(Object)
. Ignored if given value is
an instance of a Map
.Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.