DATACMNS-216 - Adapt API changes in Spring Data Commons.

This commit is contained in:
Oliver Gierke
2012-08-16 14:11:08 +02:00
parent 81a573904a
commit b72a54d07d
3 changed files with 4 additions and 12 deletions

View File

@@ -61,7 +61,7 @@ TransactionalRepositoryFactoryBeanSupport<R, T, Long> {
if (neo4jMappingContext == null) {
Neo4jMappingContext context = new Neo4jMappingContext();
context.afterPropertiesSet();
context.initialize();
this.neo4jMappingContext = context;
}

View File

@@ -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) {

View File

@@ -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();
}