|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.baidubce.services.moladb.model.KeySchemaElement
public class KeySchemaElement
Represents the key schema for a table. A key schema can be a hashkey, or a hashkey and a rangekey. For a hashkey or a rangekey, there is an attribute name and corresponding attribute value for it.
Field Summary | |
---|---|
static String |
HASH_KEY_TYPE
|
static String |
RANGE_KEY_TYPE
|
Constructor Summary | |
---|---|
KeySchemaElement()
Constructs a new KeySchemaElement object. |
|
KeySchemaElement(String attributeName,
String keyType)
Constructs a new KeySchemaElement object. |
Method Summary | |
---|---|
String |
getAttributeName()
Get the attribute name for the key schema. |
String |
getKeyType()
Get the key type for the key schema. |
void |
setAttributeName(String name)
Set the attribute name for the key schema. |
void |
setKeyType(String type)
Set the key type for the key schema. |
protected Object |
toJsonObj()
|
String |
toString()
Return a string representation of the object. |
KeySchemaElement |
withAttributeName(String name)
Set the attribute name for the key schema. |
KeySchemaElement |
withKeyType(String type)
Set the key type for the key schema. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String HASH_KEY_TYPE
public static final String RANGE_KEY_TYPE
Constructor Detail |
---|
public KeySchemaElement()
public KeySchemaElement(String attributeName, String keyType)
attributeName
- The attribute name for a key.keyType
- The type of the key, it is hashKey or rangeKey.Method Detail |
---|
public void setAttributeName(String name)
name
- The attribute name for a key to be set.public KeySchemaElement withAttributeName(String name)
name
- The attribute name for a key to be set.
public String getAttributeName()
public void setKeyType(String type)
type
- The key type name for the key schema.
IllegalArgumentException
- if the key type is not HASH_KEY_TYPE or RANGE_KEY_TYPE.public KeySchemaElement withKeyType(String type)
type
- The key type name for the key schema.
public String getKeyType()
protected Object toJsonObj()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |