DATACMNS-216 - Adapt API changes in Spring Data Commons.
This commit is contained in:
@@ -61,7 +61,7 @@ TransactionalRepositoryFactoryBeanSupport<R, T, Long> {
|
||||
|
||||
if (neo4jMappingContext == null) {
|
||||
Neo4jMappingContext context = new Neo4jMappingContext();
|
||||
context.afterPropertiesSet();
|
||||
context.initialize();
|
||||
this.neo4jMappingContext = context;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,15 +97,6 @@ public class Neo4jMappingContext extends AbstractMappingContext<Neo4jPersistentE
|
||||
return tryToResolveAliasAsEntityClassName(alias);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
try {
|
||||
super.afterPropertiesSet();
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private Neo4jPersistentEntity<?> tryToResolveAliasAsEntityClassName(Object alias) {
|
||||
if (alias instanceof Class) {
|
||||
try {
|
||||
@@ -147,7 +138,8 @@ public class Neo4jMappingContext extends AbstractMappingContext<Neo4jPersistentE
|
||||
private void cacheType(Class<?> type) {
|
||||
try {
|
||||
final Neo4jPersistentEntityImpl<?> entity = getPersistentEntity(type);
|
||||
if (entity.isNodeEntity()) annotationCheckCache.put(type, NodeEntity.class);
|
||||
if (entity == null) annotationCheckCache.put(type, type);
|
||||
else if (entity.isNodeEntity()) annotationCheckCache.put(type, NodeEntity.class);
|
||||
else if (entity.isRelationshipEntity()) annotationCheckCache.put(type, RelationshipEntity.class);
|
||||
else annotationCheckCache.put(type, type);
|
||||
} catch (InvalidEntityTypeException me) {
|
||||
|
||||
@@ -42,7 +42,7 @@ public class MatchClauseUnitTest {
|
||||
public void setUp() {
|
||||
context = new Neo4jMappingContext();
|
||||
context.setInitialEntitySet(Collections.singleton(Person.class));
|
||||
context.afterPropertiesSet();
|
||||
context.initialize();
|
||||
variableContext = new VariableContext();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user