code: static <V> EntityMetadata buildEntityMetadata(@NotNull Class<V> clazz, @NotNull CassandraClient cassandraClient) throws MetadataException {
          Table tableAnnotation = clazz.getAnnotation(Table.class);
  
          if (tableAnnotation == null) {
              throw new MetadataException(String.format("Table annotation is missing for %s", clazz.getName()));
          }
  
          String tableKeyspace = StringUtils.isEmpty(tableAnnotation.keyspace()) ? cassandraClient.getDefaultKeyspace() : tableAnnotation.keyspace();
  
          String tableName = tableAnnotation.name();
  
          TableMetadata tableMetadata = cassandraClient.getTableMetadata(tableKeyspace, tableName);
  
          EntityMetadata entityMetadata = new EntityMetadata(
                  tableName,
                  tableKeyspace,
                  tableAnnotation.compactStorage(),
                  tableAnnotation.fetchSize(),
                  tableAnnotation.readConsistencyLevel(),
                  tableAnnotation.writeConsistencyLevel(),
                  tableMetadata
          );
  
          try {
              BeanInfo beanInfo = Introspector.getBeanInfo(clazz);
  
              for (PropertyDescriptor propertyDescriptor : beanInfo.getPropertyDescriptors()) {
  
                  ColumnMetadata columnMetadata = buildColumnMetadata(propertyDescriptor, clazz, cassandraClient, tableMetadata);
  
                  if (columnMetadata != null) {
                      entityMetadata.addColumnMetadata(columnMetadata);
                  }
  
                  LOGGER.debug("Property descriptor: {} {}", propertyDescriptor.getName(), propertyDescriptor.getDisplayName());
              }
          } catch (IntrospectionException e) {
              LOGGER.warn("Can't build column metadata", e);
          }
  
          EntityMetadata.validate(entityMetadata);
  
          return entityMetadata;
      }
docs: Build cassandra entity metadata
  
  @param clazz           Entity class
  @param cassandraClient Cassandra Client from which will be retrieved table information
  @param <V>             Entity class type
  
  @return Entity metadata
  
  @throws MetadataException