public class AttributeDefinition extends Object implements Serializable
Represents an attribute for describing the key schema for the table and indexes.
Constructor and Description |
---|
AttributeDefinition()
Default constructor for a new AttributeDefinition object.
|
AttributeDefinition(String attributeName,
ScalarAttributeType attributeType)
Constructs a new AttributeDefinition object.
|
AttributeDefinition(String attributeName,
String attributeType)
Constructs a new AttributeDefinition object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getAttributeName()
A name for the attribute.
|
String |
getAttributeType()
The data type for the attribute.
|
int |
hashCode() |
void |
setAttributeName(String attributeName)
A name for the attribute.
|
void |
setAttributeType(ScalarAttributeType attributeType)
The data type for the attribute.
|
void |
setAttributeType(String attributeType)
The data type for the attribute.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AttributeDefinition |
withAttributeName(String attributeName)
A name for the attribute.
|
AttributeDefinition |
withAttributeType(ScalarAttributeType attributeType)
The data type for the attribute.
|
AttributeDefinition |
withAttributeType(String attributeType)
The data type for the attribute.
|
public AttributeDefinition()
public AttributeDefinition(String attributeName, String attributeType)
attributeName
- A name for the attribute.attributeType
- The data type for the attribute.public AttributeDefinition(String attributeName, ScalarAttributeType attributeType)
attributeName
- A name for the attribute.attributeType
- The data type for the attribute.public String getAttributeName()
Constraints:
Length: 1 - 255
public void setAttributeName(String attributeName)
Constraints:
Length: 1 - 255
attributeName
- A name for the attribute.public AttributeDefinition withAttributeName(String attributeName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
attributeName
- A name for the attribute.public String getAttributeType()
Constraints:
Allowed Values: S, N, B
ScalarAttributeType
public void setAttributeType(String attributeType)
Constraints:
Allowed Values: S, N, B
attributeType
- The data type for the attribute.ScalarAttributeType
public AttributeDefinition withAttributeType(String attributeType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: S, N, B
attributeType
- The data type for the attribute.ScalarAttributeType
public void setAttributeType(ScalarAttributeType attributeType)
Constraints:
Allowed Values: S, N, B
attributeType
- The data type for the attribute.ScalarAttributeType
public AttributeDefinition withAttributeType(ScalarAttributeType attributeType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: S, N, B
attributeType
- The data type for the attribute.ScalarAttributeType
public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.