java.lang.Object | |
↳ | com.netflix.astyanax.mapping.Mapping<T> |
Utility for doing object/relational mapping between bean-like instances and Cassandra
The mapper stores values in Cassandra and maps in/out to native types. Column
names must be strings. Annotate your bean with Id
and Column
.
Or, provide an AnnotationSet
that defines IDs and Columns in your
bean.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DEFAULT_ID_COLUMN_NAME | If the ID column does not have a Column annotation, this column name is used |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Map a bean to a column mutation.
| |||||||||||
Load a set of rows into new instances populated with values from the
column lists
| |||||||||||
Return the value for the given column from the given instance
| |||||||||||
Return the value for the ID/Key column from the given instance
| |||||||||||
Return the set of column names discovered from the bean class
| |||||||||||
Populate the given instance with the values from the given column list
| |||||||||||
Convenience for allocation a mapping object
| |||||||||||
Convenience for allocation a mapping object
| |||||||||||
Allocate a new instance and populate it with the values from the given
column list
| |||||||||||
Set the value for the given column for the given instance
| |||||||||||
Set the value for the ID/Key column for the given instance
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
If the ID column does not have a Column annotation, this column name is used
clazz | clazz type to map |
---|---|
annotationSet | annotations to use when analyzing a bean |
Map a bean to a column mutation. i.e. set the columns in the mutation to the corresponding values from the instance
instance | instance |
---|---|
mutation | mutation |
Load a set of rows into new instances populated with values from the column lists
rows | the rows |
---|
IllegalAccessException | if a new instance could not be instantiated |
---|---|
InstantiationException | if a new instance could not be instantiated |
Return the value for the given column from the given instance
instance | the instance |
---|---|
columnName | name of the column (must match a corresponding annotated field in the instance's class) |
valueClass | type of the value (must match the actual native type in the instance's class) |
Return the value for the ID/Key column from the given instance
instance | the instance |
---|---|
valueClass | type of the value (must match the actual native type in the instance's class) |
Return the set of column names discovered from the bean class
Populate the given instance with the values from the given column list
instance | instance |
---|---|
columns | column this |
Convenience for allocation a mapping object
clazz | clazz type to map |
---|
Convenience for allocation a mapping object
clazz | clazz type to map |
---|---|
annotationSet | annotations to use when analyzing a bean |
Allocate a new instance and populate it with the values from the given column list
columns | column list |
---|
IllegalAccessException | if a new instance could not be instantiated |
---|---|
InstantiationException | if a new instance could not be instantiated |
Set the value for the given column for the given instance
instance | the instance |
---|---|
columnName | name of the column (must match a corresponding annotated field in the instance's class) |
value | The value (must match the actual native type in the instance's class) |
Set the value for the ID/Key column for the given instance
instance | the instance |
---|---|
value | The value (must match the actual native type in the instance's class) |