org.springframework.data.mapping.model.PropertyNameFieldNamingStrategy Java Examples

The following examples show how to use org.springframework.data.mapping.model.PropertyNameFieldNamingStrategy. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultArangoPersistentProperty.java    From spring-data with Apache License 2.0 5 votes vote down vote up
public DefaultArangoPersistentProperty(final Property property,
	final PersistentEntity<?, ArangoPersistentProperty> owner, final SimpleTypeHolder simpleTypeHolder,
	final FieldNamingStrategy fieldNamingStrategy) {
	super(property, owner, simpleTypeHolder);
	this.fieldNamingStrategy = fieldNamingStrategy != null ? fieldNamingStrategy
			: PropertyNameFieldNamingStrategy.INSTANCE;
}
 
Example #2
Source File: DatastorePersistentPropertyImpl.java    From spring-cloud-gcp with Apache License 2.0 5 votes vote down vote up
/**
 * Constructor.
 *
 * @param property the property to store
 * @param owner the entity to which this property belongs
 * @param simpleTypeHolder the type holder
 * @param fieldNamingStrategy the naming strategy used to get the column name of this
 * property
 */
DatastorePersistentPropertyImpl(Property property,
		PersistentEntity<?, DatastorePersistentProperty> owner,
		SimpleTypeHolder simpleTypeHolder, FieldNamingStrategy fieldNamingStrategy) {
	super(property, owner, simpleTypeHolder);
	this.fieldNamingStrategy = (fieldNamingStrategy != null)
			? fieldNamingStrategy
			: PropertyNameFieldNamingStrategy.INSTANCE;
	verify();
}
 
Example #3
Source File: SpannerMappingContextTests.java    From spring-cloud-gcp with Apache License 2.0 5 votes vote down vote up
@Test
public void testNullSetFieldNamingStrategy() {
	SpannerMappingContext context = new SpannerMappingContext();

	context.setFieldNamingStrategy(null);
	assertThat(context.getFieldNamingStrategy())
			.isEqualTo(PropertyNameFieldNamingStrategy.INSTANCE);
}
 
Example #4
Source File: ArangoConfiguration.java    From spring-data with Apache License 2.0 4 votes vote down vote up
default FieldNamingStrategy fieldNamingStrategy() {
	return PropertyNameFieldNamingStrategy.INSTANCE;
}
 
Example #5
Source File: SpannerPersistentPropertyImpl.java    From spring-cloud-gcp with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new {@link SpannerPersistentPropertyImpl}.
 *
 * @param property the property to store
 * @param owner the entity to which this property belongs
 * @param simpleTypeHolder the type holder
 * @param fieldNamingStrategy the naming strategy used to get the column name of this
 * property
 */
SpannerPersistentPropertyImpl(Property property,
		PersistentEntity<?, SpannerPersistentProperty> owner,
		SimpleTypeHolder simpleTypeHolder, FieldNamingStrategy fieldNamingStrategy) {
	super(property, owner, simpleTypeHolder);
	this.fieldNamingStrategy = (fieldNamingStrategy != null)
			? fieldNamingStrategy
			: PropertyNameFieldNamingStrategy.INSTANCE;
}