Interface NameConverter


  • public interface NameConverter
    A custom converter to infer CQL column names from the names used in an Entity-annotated class.
    See Also:
    NamingStrategy
    • Method Detail

      • toCassandraName

        @NonNull
        String toCassandraName​(@NonNull
                               String javaName)
        Convert the given Java name into a CQL name.

        Note that this will be invoked by the generated code each time the name is referenced. If the conversion is expensive, implementors might consider an internal cache.

        Parameters:
        javaName - the name to convert. Note that if it is capitalized (e.g. Product), it is a class name, to be converted into a table name; otherwise (e.g. productId), it is a property name, to be converted into a column name.
        Returns:
        the corresponding CQL name. If you want it to be case-sensitive, it must be enclosed in double-quotes.