}
@Override
public <R> R createRelationshipBetween(Object start, Object end, Class<R> relationshipEntityClass, String relationshipType, boolean allowDuplicates) {
notNull(start, "start", end, "end", relationshipEntityClass, "relationshipEntityClass", relationshipType, "relationshipType");
final RelationshipResult result = infrastructure.getEntityStateHandler().createRelationshipBetween(start, end, relationshipType, allowDuplicates);
if (result.type == RelationshipResult.Type.NEW) {
// TODO
postEntityCreation(result.relationship, relationshipEntityClass);
}
return createEntityFromState(result.relationship, relationshipEntityClass, getMappingPolicy(relationshipEntityClass));