public class DefaultNamingStrategy extends Object implements NamingStrategy
splitthe Java name according to the Java convention, and then
jointhe resulting tokens according to the Cassandra convention. For example, a possible implementation might:
|Constructor and Description|
Builds a new instance with the default conventions, namely
Builds a new instance.
|Modifier and Type||Method and Description|
Infers a Cassandra column/field name from a Java property name.
lower camel casefor the Java convention, and
lower casefor the Cassandra convention. For example, a "userName" Java property will be mapped to a "username" column.
public DefaultNamingStrategy(NamingConvention javaConvention, NamingConvention cassandraConvention)
javaConvention- the naming convention that will be used to tokenize the Java property names.
cassandraConvention- the naming convention that will be used to build the Cassandra names from the Java tokens.
public String toCassandraName(String javaPropertyName)
javaPropertyName- the name of the Java property. Depending on the
property access strategy, this might the name of the Java field, or be inferred from a getter/setter based on the usual Java beans conventions.
Copyright © 2012–2018. All rights reserved.