Example usage for org.springframework.data.mapping.model SpELContext SpELContext

List of usage examples for org.springframework.data.mapping.model SpELContext SpELContext

Introduction

In this page you can find the example usage for org.springframework.data.mapping.model SpELContext SpELContext.

Prototype

public SpELContext(PropertyAccessor accessor) 

Source Link

Document

Creates a new SpELContext with the given PropertyAccessor .

Usage

From source file:org.develspot.data.orientdb.convert.MappingOrientConverter.java

public MappingOrientConverter(
        MappingContext<? extends OrientPersistentEntity<?>, OrientPersistentProperty> mappingContext) {
    super(new DefaultConversionService());
    Assert.notNull(mappingContext, "MappingContext should not be null!");
    this.mappingContext = mappingContext;
    this.spELContext = new SpELContext(new MapAccessor());
    this.fieldAccessOnly = true;
}

From source file:com.joyveb.dbpimpl.cass.prepare.convert.MappingCassandraConverter.java

/**
 * Creates a new {@link MappingCassandraConverter} given the new {@link MappingContext}.
 * /*from   w w  w  .ja  v  a  2  s . co m*/
 * @param mappingContext must not be {@literal null}.
 */
public MappingCassandraConverter(
        MappingContext<? extends CassandraPersistentEntity<?>, CassandraPersistentProperty> mappingContext) {
    super(new DefaultConversionService());
    this.mappingContext = mappingContext;
    this.spELContext = new SpELContext(RowReaderPropertyAccessor.INSTANCE);
}

From source file:io.twipple.springframework.data.clusterpoint.convert.DefaultClusterpointEntityConverter.java

/**
 * Create a new converter and hand it over the {@link ConversionService}
 *
 * @param mappingContext the mapping context to use
 *//*from ww w.j a v  a 2 s.com*/
public DefaultClusterpointEntityConverter(@NotNull ClusterpointMappingContext mappingContext) {

    Assert.notNull(mappingContext);

    this.mappingContext = mappingContext;
    conversionService = new DefaultConversionService();
    typeMapper = new DefaultClusterpointTypeMapper(mappingContext);
    spELContext = new SpELContext(ClusterpointDocumentPropertyAccessor.INSTANCE);
}

From source file:org.springframework.data.gemfire.mapping.MappingPdxSerializer.java

/**
 * Creates a new {@link MappingPdxSerializer} using the given
 * {@link GemfireMappingContext} and {@link ConversionService}.
 *
 * @param mappingContext must not be {@literal null}.
 * @param conversionService must not be {@literal null}.
 *///from   w  ww . j a v a2  s .c o m
public MappingPdxSerializer(GemfireMappingContext mappingContext, ConversionService conversionService) {

    Assert.notNull(mappingContext);
    Assert.notNull(conversionService);

    this.mappingContext = mappingContext;
    this.conversionService = conversionService;
    this.instantiators = new EntityInstantiators();
    this.customSerializers = Collections.emptyMap();
    this.context = new SpELContext(PdxReaderPropertyAccessor.INSTANCE);
}