| Chunk |
|---|
| Conflicting content |
|---|
// ----- BEGIN automatic property resolution -----
// check for static relationships and return related nodes
<<<<<<< HEAD
String singularType = (key.endsWith("ies")
? key.substring(0,
key.length() - 3).concat("y")
: (key.endsWith("s")
? key.substring(0,
key.length() - 1)
: key));
if (EntityContext.getRelations(type).containsKey(singularType)) {
=======
String singularType = getSingularTypeName(key);
if(key.endsWith("Id")) {
// remove "Id" from the end of the value and set "id requested"-flag
singularType = singularType.substring(0, singularType.length() - 2);
idRequested = true;
}
if(singularType != null && EntityContext.getRelations(type).containsKey(singularType)) {
>>>>>>> 05d63fbbafdc5b7f12e0f0df4850d3766b405136
// static relationship detected, return related nodes
// (we omit null check here because containsKey ensures that rel is not null) |
| Solution content |
|---|
// ----- BEGIN automatic property resolution -----
// check for static relationships and return related nodes
String singularType = getSingularTypeName(key);
if(key.endsWith("Id")) {
// remove "Id" from the end of the value and set "id requested"-flag
singularType = singularType.substring(0, singularType.length() - 2);
idRequested = true;
}
if(singularType != null && EntityContext.getRelations(type).containsKey(singularType)) {
// static relationship detected, return related nodes
// (we omit null check here because containsKey ensures that rel is not null) |
| File |
|---|
| AbstractNode.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// static relationship detected, return related nodes
// (we omit null check here because containsKey ensures that rel is not null)
DirectedRelationship rel = EntityContext.getRelations(type).get(singularType);
<<<<<<< HEAD
if (rel != null) {
return getTraversalResults(rel.getRelType(),
rel.getDirection(),
StringUtils.capitalize(singularType));
=======
if(idRequested) {
AbstractNode node = rel.getRelatedNode(securityContext, this, singularType);
if(node != null) {
return node.getId();
} else {
// TODO: handle "not found"..
}
} else {
return rel.getRelatedNodes(securityContext, this, singularType);
>>>>>>> 05d63fbbafdc5b7f12e0f0df4850d3766b405136
}
}
// ----- END automatic property resolution ----- |
| Solution content |
|---|
// static relationship detected, return related nodes
// (we omit null check here because containsKey ensures that rel is not null)
DirectedRelationship rel = EntityContext.getRelations(type).get(singularType);
if(idRequested) {
AbstractNode node = rel.getRelatedNode(securityContext, this, singularType);
if(node != null) {
return node.getId();
} else {
// TODO: handle "not found"..
}
} else {
return rel.getRelatedNodes(securityContext, this, singularType);
}
}
// ----- END automatic property resolution ----- |
| File |
|---|
| AbstractNode.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
return (size); } <<<<<<< HEAD public Set |
| Solution content |
|---|
return (size); } /** * Return unordered list of all direct child nodes (no recursion) * with given relationship type |
| File |
|---|
| AbstractNode.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
return;
}
<<<<<<< HEAD
// TODO: add setProperty function for entities here!
Class type = this.getClass();
=======
String singularType = getSingularTypeName(key);
if(key.endsWith("Id")) {
singularType = singularType.substring(0, singularType.length() - 2);
}
// check for static relationships and connect node
if(EntityContext.getRelations(type).containsKey(singularType)) {
// static relationship detected, create relationship
DirectedRelationship rel = EntityContext.getRelations(type).get(singularType);
if(rel != null) {
// FIXME: return here, or do something else?
rel.createRelationship(securityContext, this, value);
return;
}
}
>>>>>>> 05d63fbbafdc5b7f12e0f0df4850d3766b405136
PropertyConverter converter = EntityContext.getPropertyConverter(securityContext,
type,
key); |
| Solution content |
|---|
return;
}
String singularType = getSingularTypeName(key);
if(key.endsWith("Id")) {
singularType = singularType.substring(0, singularType.length() - 2);
}
// check for static relationships and connect node
if(EntityContext.getRelations(type).containsKey(singularType)) {
// static relationship detected, create relationship
DirectedRelationship rel = EntityContext.getRelations(type).get(singularType);
if(rel != null) {
// FIXME: return here, or do something else?
rel.createRelationship(securityContext, this, value);
return;
}
}
PropertyConverter converter = EntityContext.getPropertyConverter(securityContext,
type,
key); |
| File |
|---|
| AbstractNode.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Variable |