Class EntityBeanDefinition<T>
java.lang.Object
com.datastax.astra.internal.reflection.EntityBeanDefinition<T>
- Type Parameters:
T
- the type of the JavaBean entity being introspected
Provides introspection and metadata for a JavaBean entity.
This class inspects a JavaBean of type T
to extract and manage metadata about its properties.
It is used to populate fields directly based on the output or other sources.
The EntityBeanDefinition
is useful in scenarios where JavaBean introspection is needed
for tasks such as data mapping, serialization, or populating object fields dynamically.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Document
createTableCommand
(String tableName, Class<?> clazz) Create a table command based on the annotated fields.Build the partition Key based on annotated fields with @PartitionBy with position.Build the partition sort based on annotated fields @PartitionSort with position and order.
-
Constructor Details
-
EntityBeanDefinition
Constructor for the beam.- Parameters:
clazz
- class type
-
-
Method Details
-
getPartitionBy
Build the partition Key based on annotated fields with @PartitionBy with position.- Returns:
- An ordered list of partition keys (partition key)
-
getPartitionSort
Build the partition sort based on annotated fields @PartitionSort with position and order.- Returns:
- an ordered map representing the partition sort (clustering columns)
-
createTableCommand
Create a table command based on the annotated fields.- Parameters:
tableName
- the table nameclazz
- the class- Returns:
- a document representing the table command
-