DATAES-46 - Apply code formatting

This commit is contained in:
Mohsin Husen 2014-08-17 09:47:36 +01:00
parent a66dc08975
commit 097c5f68ce
12 changed files with 1795 additions and 395 deletions

View File

@ -881,8 +881,8 @@ public class ElasticsearchTemplate implements ElasticsearchOperations, Applicati
@Override @Override
public void setApplicationContext(ApplicationContext context) throws BeansException { public void setApplicationContext(ApplicationContext context) throws BeansException {
if(elasticsearchConverter instanceof ApplicationContextAware){ if (elasticsearchConverter instanceof ApplicationContextAware) {
((ApplicationContextAware)elasticsearchConverter).setApplicationContext(context); ((ApplicationContextAware) elasticsearchConverter).setApplicationContext(context);
} }
} }

View File

@ -61,8 +61,8 @@ public class MappingElasticsearchConverter implements ElasticsearchConverter, Ap
@Override @Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext; this.applicationContext = applicationContext;
if(mappingContext instanceof ApplicationContextAware){ if (mappingContext instanceof ApplicationContextAware) {
((ApplicationContextAware)mappingContext).setApplicationContext(applicationContext); ((ApplicationContextAware) mappingContext).setApplicationContext(applicationContext);
} }
} }
} }

View File

@ -33,7 +33,7 @@ import org.springframework.data.util.TypeInformation;
*/ */
public class SimpleElasticsearchMappingContext extends public class SimpleElasticsearchMappingContext extends
AbstractMappingContext<SimpleElasticsearchPersistentEntity<?>, ElasticsearchPersistentProperty> implements ApplicationContextAware{ AbstractMappingContext<SimpleElasticsearchPersistentEntity<?>, ElasticsearchPersistentProperty> implements ApplicationContextAware {
private ApplicationContext context; private ApplicationContext context;
@ -41,8 +41,7 @@ public class SimpleElasticsearchMappingContext extends
protected <T> SimpleElasticsearchPersistentEntity<?> createPersistentEntity(TypeInformation<T> typeInformation) { protected <T> SimpleElasticsearchPersistentEntity<?> createPersistentEntity(TypeInformation<T> typeInformation) {
final SimpleElasticsearchPersistentEntity<T> persistentEntity = final SimpleElasticsearchPersistentEntity<T> persistentEntity =
new SimpleElasticsearchPersistentEntity<T>(typeInformation); new SimpleElasticsearchPersistentEntity<T>(typeInformation);
if(context != null) if (context != null) {
{
persistentEntity.setApplicationContext(context); persistentEntity.setApplicationContext(context);
} }
return persistentEntity; return persistentEntity;

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 the original author or authors. * Copyright 2014 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -31,9 +31,10 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/** /**
* User: akonczak@gmail.com * SpELEntityTest
* Date: 07/08/14 *
* Time: 22:35 * @author Artur Konczak
*
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 the original author or authors. * Copyright 2014 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -19,9 +19,10 @@ import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document; import org.springframework.data.elasticsearch.annotations.Document;
/** /**
* User: akonczak@gmail.com * SpELEntity
* Date: 07/08/14 *
* Time: 22:26 * @author Artur Konczak
*
*/ */
@Document(indexName = "#{'abz'+'-'+'entity'}", type = "spel", indexStoreType = "memory", shards = 1, replicas = 0, refreshInterval = "-1") @Document(indexName = "#{'abz'+'-'+'entity'}", type = "spel", indexStoreType = "memory", shards = 1, replicas = 0, refreshInterval = "-1")
public class SpELEntity { public class SpELEntity {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 the original author or authors. * Copyright 2014 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -19,8 +19,10 @@ import org.springframework.data.elasticsearch.entities.SpELEntity;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
/** /**
* @author Rizwan Idrees * SpELRepository
* @author Mohsin Husen *
* @author Artur Konczak
*
*/ */
public interface SpELRepository extends ElasticsearchRepository<SpELEntity, String> { public interface SpELRepository extends ElasticsearchRepository<SpELEntity, String> {