| Chunk |
|---|
| Conflicting content |
|---|
import org.apache.log4j.Logger; <<<<<<< HEAD import java.io.File; ======= >>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c import java.net.InetAddress; import java.net.UnknownHostException; |
| Solution content |
|---|
import org.apache.log4j.Logger; import java.io.File; import java.net.InetAddress; import java.net.UnknownHostException; |
| File |
|---|
| ProxyImpl.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public Collection customServerSearch(final User user, final CidsServerSearch serverSearch) throws RemoteException {
serverSearch.setUser(user);
<<<<<<< HEAD
serverSearch.setActiveLoaclServers(activeLocalServers);
try {
return serverSearch.performServerSearch();
} catch (Exception e) {
logger.error("Error in customSearch", e);
throw new RemoteException("Error in customSearch", e);
}
=======
serverSearch.setActiveLocalServers(activeLocalServers);
return serverSearch.performServerSearch();
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
}
} |
| Solution content |
|---|
*/
public Collection customServerSearch(final User user, final CidsServerSearch serverSearch) throws RemoteException {
serverSearch.setUser(user);
<<<<<<< HEAD
serverSearch.setActiveLoaclServers(activeLocalServers);
try {
return serverSearch.performServerSearch();
} catch (Exception e) {
logger.error("Error in customSearch", e);
throw new RemoteException("Error in customSearch", e);
}
=======
serverSearch.setActiveLocalServers(activeLocalServers);
return serverSearch.performServerSearch();
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
}
} |
| File |
|---|
| SearchServiceImpl.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
return aln;
} catch (Exception e) {
<<<<<<< HEAD
getLog().error("Problem during Fulltextsearch", e);
throw new Exception("Problem during Fulltextsearch", e);
=======
getLog().error("Problem", e);
return null;
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
}
}
} |
| Solution content |
|---|
}
return aln;
} catch (Exception e) {
getLog().error("Problem during Fulltextsearch", e);
throw new Exception("Problem during Fulltextsearch", e);
}
}
} |
| File |
|---|
| FullTextSearch.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
getLog().info("geosearch started");
// Deppensuche sequentiell
<<<<<<< HEAD
final HashSet keyset = new HashSet(getActiveLoaclServers().keySet());
=======
final HashSet keyset = new HashSet(getActiveLocalServers().keySet());
final String cidsSearchGeometryWKT = searchGeometry.toText();
final String sridString = Integer.toString(searchGeometry.getSRID());
if ((cidsSearchGeometryWKT == null) || (cidsSearchGeometryWKT.trim().length() == 0)
|| (sridString == null)
|| (sridString.trim().length() == 0)) {
// TODO: Notify user?
getLog().error(
"Search geometry or srid is not given. Can't perform a search without those information.");
return aln;
}
for (final Object key : keyset) {
final MetaService ms = (MetaService)getActiveLocalServers().get(key);
final String classesInStatement = getClassesInSnippetsPerDomain().get((String)key);
if (getLog().isDebugEnabled()) {
getLog().debug("cidsClassesInStatement=" + classesInStatement);
}
if (getLog().isDebugEnabled()) {
getLog().debug("cidsSearchGeometryWKT=" + cidsSearchGeometryWKT);
}
if (getLog().isDebugEnabled()) {
getLog().debug("cidsSearchGeometrySRID=" + sridString);
}
if ((classesInStatement == null) || (classesInStatement.trim().length() == 0)) {
getLog().warn("There are no search classes defined for domain '" + key
+ "'. This domain will be skipped.");
continue;
}
final String sqlStatement = sql.replaceAll(" |
| Solution content |
|---|
getLog().info("geosearch started");
// Deppensuche sequentiell
final HashSet keyset = new HashSet(getActiveLoaclServers().keySet());
for (final Object domainKey : keyset) {
final MetaService ms = (MetaService)getActiveLoaclServers().get(domainKey); |
| File |
|---|
| GeoSearch.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Cast expression |
| For statement |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* @return DOCUMENT ME!
*/
public boolean hasObjectWritePermission(final User user) {
<<<<<<< HEAD
if (metaObject != null) {
return metaObject.hasObjectWritePermission(user);
} else {
LOG.error("meta object is null. The write permission cannot be determined.");
return false;
=======
if (LOG.isDebugEnabled()) {
LOG.debug("hasObjectWritePermission for user: " + user); // NOI18N
}
if (customPermissionProvider == null) {
try {
final Class cpp = ClassloadingHelper.getDynamicClass(getMetaObject().getMetaClass(),
ClassloadingHelper.CLASS_TYPE.PERMISSION_PROVIDER);
if (LOG.isDebugEnabled()) {
LOG.debug("custom write permission provider retrieval result: " + cpp); // NOI18N
}
if (cpp == null) {
return true;
}
customPermissionProvider = (CustomBeanPermissionProvider)cpp.getConstructor().newInstance();
customPermissionProvider.setCidsBean(this);
} catch (final Exception ex) {
// FIXME: probably this behaviour is error prone since we allow write permission if there is a problem
// with the loading of the custom permission provider, which probably would say "NO" if it was loaded
// correctly
LOG.warn("error during creation of custom permission provider", ex); // NOI18N
}
}
if (customPermissionProvider != null) {
return customPermissionProvider.getCustomWritePermissionDecisionforUser(user);
} else {
return true;
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
}
}
|
| Solution content |
|---|
* @return DOCUMENT ME!
*/
public boolean hasObjectWritePermission(final User user) {
if (metaObject != null) {
return metaObject.hasObjectWritePermission(user);
} else {
LOG.error("meta object is null. The write permission cannot be determined.");
return false;
}
}
|
| File |
|---|
| CidsBean.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
final ObjectAttribute oa = metaObject.getAttributeByFieldName(field);
// if oa is array we won't have to do anything because the listElement* operations take care of array elements
<<<<<<< HEAD
if (!oa.isArray() && !oa.isVirtualOneToManyAttribute()) {
final Object oldValue = oa.getValue();
final Object value = evt.getNewValue();
boolean realChanges = false;
if (oa.referencesObject() && (value instanceof CidsBean) && (value != null)) {
final CidsBean cbv = (CidsBean)value;
realChanges = ((oldValue == null)
|| ((oldValue instanceof MetaObject)
&& !((Sirius.server.middleware.types.MetaObject)oldValue).getBean().toJSONString()
.equals(
cbv.toJSONString())));
=======
if (!oa.isArray()) {
final Object oldValue = oa.getValue();
final Object value = evt.getNewValue();
if (oa.referencesObject() && (value instanceof CidsBean) && (value != null)) {
final CidsBean cbv = (CidsBean)value;
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
oa.setValue(cbv.getMetaObject());
cbv.setBacklinkInformation(field, this);
if (cbv.getMetaObject().getStatus() == MetaObject.TO_DELETE) { |
| Solution content |
|---|
final ObjectAttribute oa = metaObject.getAttributeByFieldName(field);
// if oa is array we won't have to do anything because the listElement* operations take care of array elements
if (!oa.isArray() && !oa.isVirtualOneToManyAttribute()) {
final Object oldValue = oa.getValue();
final Object value = evt.getNewValue();
boolean realChanges = false;
if (oa.referencesObject() && (value instanceof CidsBean) && (value != null)) {
final CidsBean cbv = (CidsBean)value;
realChanges = ((oldValue == null)
|| ((oldValue instanceof MetaObject)
&& !((Sirius.server.middleware.types.MetaObject)oldValue).getBean().toJSONString()
.equals(
cbv.toJSONString())));
oa.setValue(cbv.getMetaObject());
cbv.setBacklinkInformation(field, this);
if (cbv.getMetaObject().getStatus() == MetaObject.TO_DELETE) { |
| File |
|---|
| CidsBean.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Cast expression |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
cbv.getMetaObject().setStatus(MetaObject.MODIFIED);
}
} else {
<<<<<<< HEAD
if (((oldValue != null) && !oldValue.equals(value)) || ((oldValue == null) && (value != null))) {
oa.setValue(value);
realChanges = true;
}
}
if (LOG.isDebugEnabled()) {
if (realChanges) {
if (LOG.isDebugEnabled()) {
LOG.debug("a property changed:" + metaObject.getDebugString()); // NOI18N
}
} else {
if (LOG.isDebugEnabled()) {
LOG.debug(
"a property changed, but the content of the object was not changed. seams to be a caching or normalization move.:"
+ metaObject.getDebugString()); // NOI18N
}
}
}
if (((oldValue == null) && (value != null))
|| ((oldValue != null) && realChanges)) {
=======
oa.setValue(value);
}
if (LOG.isDebugEnabled()) {
LOG.debug("a property changed:" + metaObject.getDebugString()); // NOI18N
}
if (((oldValue == null) && (value != null)) || ((oldValue != null) && !oldValue.equals(value))) {
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
oa.setChanged(true);
metaObject.setStatus(MetaObject.MODIFIED);
|
| Solution content |
|---|
cbv.getMetaObject().setStatus(MetaObject.MODIFIED);
}
} else {
if (((oldValue != null) && !oldValue.equals(value)) || ((oldValue == null) && (value != null))) {
oa.setValue(value);
realChanges = true;
}
}
if (LOG.isDebugEnabled()) {
if (realChanges) {
if (LOG.isDebugEnabled()) {
LOG.debug("a property changed:" + metaObject.getDebugString()); // NOI18N
}
} else {
if (LOG.isDebugEnabled()) {
LOG.debug(
"a property changed, but the content of the object was not changed. seams to be a caching or normalization move.:"
+ metaObject.getDebugString()); // NOI18N
}
}
}
if (((oldValue == null) && (value != null))
|| ((oldValue != null) && realChanges)) {
oa.setChanged(true);
metaObject.setStatus(MetaObject.MODIFIED);
|
| File |
|---|
| CidsBean.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
// TODO seems to call nonexisting properties on array classes?
PropertyUtils.setProperty(this, name, value);
} catch (Exception e) {
<<<<<<< HEAD
LOG.warn("Error in setProperty:" + name + ". Result will be null. No exception is being thrown.", e); // NOI18N
=======
LOG.error("Fehler in setProperty:" + name + "\n", e);
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
}
}
|
| Solution content |
|---|
// TODO seems to call nonexisting properties on array classes?
PropertyUtils.setProperty(this, name, value);
} catch (Exception e) {
LOG.warn("Error in setProperty:" + name + ". Result will be null. No exception is being thrown.", e); // NOI18N
}
}
|
| File |
|---|
| CidsBean.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
try {
return PropertyUtils.getProperty(this, name);
} catch (Exception e) {
<<<<<<< HEAD
LOG.warn("Error in getproperty:" + name + ". Result will be null. No exception is being thrown.", e); // NOI18N
=======
LOG.error("Fehler in getproperty:" + name, e); // NOI18N
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
}
return null; |
| Solution content |
|---|
try {
return PropertyUtils.getProperty(this, name);
} catch (Exception e) {
LOG.warn("Error in getproperty:" + name + ". Result will be null. No exception is being thrown.", e); // NOI18N
}
return null; |
| File |
|---|
| CidsBean.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* Notification that elements have been added to the list.
*
<<<<<<< HEAD
* @param arrayfield DOCUMENT ME!
* @param list the {@code ObservableList} that has changed
* @param index the index the elements were added to
* @param length the number of elements that were added
*
* @throws RuntimeException DOCUMENT ME!
=======
* @param arrayfield DOCUMENT ME!
* @param list the {@code ObservableList} that has changed
* @param index the index the elements were added to
* @param length the number of elements that were added
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
*/
public void listElementsAdded(final String arrayfield,
final ObservableList list, |
| Solution content |
|---|
/**
* Notification that elements have been added to the list.
*
* @param arrayfield DOCUMENT ME!
* @param list the {@code ObservableList} that has changed
* @param index the index the elements were added to
* @param length the number of elements that were added
*
* @throws RuntimeException DOCUMENT ME!
*/
public void listElementsAdded(final String arrayfield,
final ObservableList list, |
| File |
|---|
| CidsBean.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
old.remove(i);
for (int i = index; i < (index + length); ++i) {
try {
<<<<<<< HEAD
old.remove(i - (list.size() - old.size()));
=======
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
final Object o = list.get(i);
if (arrayfield != null) {
if (o instanceof CidsBean) { |
| Solution content |
|---|
for (int i = index; i < (index + length); ++i) {
try {
old.remove(i - (list.size() - old.size()));
final Object o = list.get(i);
if (arrayfield != null) {
if (o instanceof CidsBean) { |
| File |
|---|
| CidsBean.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
final CidsBean cb = (CidsBean)o;
cb.setBacklinkInformation(arrayfield, this);
final ObjectAttribute oa = this.getMetaObject().getAttributeByFieldName(arrayfield);
<<<<<<< HEAD
final MemberAttributeInfo mai = oa.getMai();
walkUpAndSetChangedAndModified(oa);
// Wenn noch kein Dummy-Objekt existiert (Wert ist noch null)
// Anlegen eines Dummy-Objektes
MetaObject dummy = (MetaObject)oa.getValue();
if (dummy == null) {
=======
walkUpAndSetChangedAndModified(oa);
// ArrayElement anlegen
final MetaClass zwischenTabellenKlasse = (MetaClass)(getMetaObject().getAllClasses()).get(
getMetaObject().getDomain()
+ oa.getMai().getForeignKeyClassId());
final MetaObject arrayElement = zwischenTabellenKlasse.getEmptyInstance();
final ObjectAttribute[] arrayElementAttrs = arrayElement.getAttribs();
for (final ObjectAttribute arrayElementAttribute : arrayElementAttrs) {
arrayElementAttribute.setParentObject(arrayElement);
if (arrayElementAttribute.isPrimaryKey()) {
arrayElementAttribute.setValue(-1);
} else if (arrayElementAttribute.referencesObject()) {
arrayElementAttribute.setValue(cb.getMetaObject());
arrayElementAttribute.setChanged(true);
cb.getMetaObject().setReferencingObjectAttribute(arrayElementAttribute);
} else {
arrayElementAttribute.setValue(getMetaObject().getID());
}
}
// Wen noch kein Dummy-Objekt existiert (Wert ist noch null)
// Anlegen eines Dummy-Objektes
if (oa.getValue() == null) {
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
final Sirius.server.localserver.object.Object dummyO =
new Sirius.server.localserver.object.DefaultObject(
getMetaObject().getID(), |
| Solution content |
|---|
final CidsBean cb = (CidsBean)o;
cb.setBacklinkInformation(arrayfield, this);
final ObjectAttribute oa = this.getMetaObject().getAttributeByFieldName(arrayfield);
final MemberAttributeInfo mai = oa.getMai();
walkUpAndSetChangedAndModified(oa);
// Wenn noch kein Dummy-Objekt existiert (Wert ist noch null)
// Anlegen eines Dummy-Objektes
MetaObject dummy = (MetaObject)oa.getValue();
if (dummy == null) {
final Sirius.server.localserver.object.Object dummyO =
new Sirius.server.localserver.object.DefaultObject(
getMetaObject().getID(), |
| File |
|---|
| CidsBean.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Cast expression |
| Comment |
| For statement |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
new Sirius.server.localserver.object.DefaultObject(
getMetaObject().getID(),
oa.getMai().getForeignKeyClassId());
<<<<<<< HEAD
dummy = new DefaultMetaObject(dummyO, getMetaObject().getDomain());
dummy.setReferencingObjectAttribute(oa);
dummy.setDummy(true);
dummy.setStatus(MetaObject.NEW);
oa.setValue(dummy);
oa.setChanged(true);
}
// 1:n Beziehung??
if (oa.isVirtualOneToManyAttribute()) {
final ObjectAttribute[] arrayElementAttrs = dummy.getAttribs();
dummy.setStatus(MetaObject.MODIFIED);
final ObjectAttribute entryToAddOA = new ObjectAttribute(
mai.getId()
+ "."
+ arrayElementAttrs.length,
mai,
-1,
cb.getMetaObject(),
cb.getMetaObject().getMetaClass().getAttributePolicy());
entryToAddOA.setParentObject(dummy);
entryToAddOA.setChanged(true);
dummy.addAttribute(entryToAddOA);
cb.getMetaObject().setReferencingObjectAttribute(entryToAddOA);
// entryToAddOA.setValue(getMetaObject());
} else { // n-m Beziehung
// ArrayElement anlegen
final MetaClass zwischenTabellenKlasse = (MetaClass)(getMetaObject().getAllClasses()).get(
getMetaObject().getDomain()
+ oa.getMai().getForeignKeyClassId());
final MetaObject arrayElement = zwischenTabellenKlasse.getEmptyInstance();
final ObjectAttribute[] arrayElementAttrs = arrayElement.getAttribs();
for (final ObjectAttribute arrayElementAttribute : arrayElementAttrs) {
arrayElementAttribute.setParentObject(arrayElement);
if (arrayElementAttribute.isPrimaryKey()) {
arrayElementAttribute.setValue(-1);
} else if (arrayElementAttribute.referencesObject()) {
arrayElementAttribute.setValue(cb.getMetaObject());
arrayElementAttribute.setChanged(true);
cb.getMetaObject().setReferencingObjectAttribute(arrayElementAttribute);
} else {
arrayElementAttribute.setValue(getMetaObject().getID());
}
}
// // Wen noch kein Dummy-Objekt existiert (Wert ist noch null)
// // Anlegen eines Dummy-Objektes
// if (oa.getValue() == null) {
// final Sirius.server.localserver.object.Object dummyO =
// new Sirius.server.localserver.object.DefaultObject(
// getMetaObject().getID(),
// oa.getMai().getForeignKeyClassId());
// final MetaObject dummyMO = new DefaultMetaObject(dummyO, getMetaObject().getDomain());
// dummyMO.setReferencingObjectAttribute(oa);
// dummyMO.setDummy(true);
// dummyMO.setStatus(MetaObject.NEW);
// oa.setValue(dummyMO);
// oa.setChanged(true);
// }
// hinzufuegen eines Attributes, das auf das angelegte Arrayelement zeigt
dummy.setStatus(MetaObject.MODIFIED);
int counter = dummy.getAttribs().length;
final ObjectAttribute dummyOA = new ObjectAttribute(
mai.getId()
+ "."
+ ++counter,
mai,
-1,
arrayElement,
zwischenTabellenKlasse.getAttributePolicy());
dummyOA.setParentObject(dummy);
dummyOA.setChanged(true);
dummy.addAttribute(dummyOA);
arrayElement.setReferencingObjectAttribute(dummyOA);
}
=======
final MetaObject dummyMO = new DefaultMetaObject(dummyO, getMetaObject().getDomain());
dummyMO.setReferencingObjectAttribute(oa);
dummyMO.setDummy(true);
dummyMO.setStatus(MetaObject.NEW);
oa.setValue(dummyMO);
oa.setChanged(true);
}
// hinzufuegen eines Attributes, das auf das angelegte Arrayelement zeigt
final MetaObject dummy = (MetaObject)oa.getValue();
dummy.setStatus(MetaObject.MODIFIED);
int counter = dummy.getAttribs().length;
// MAI des ArrayFeldes des Hauptobjektes
final MemberAttributeInfo mai = oa.getMai();
final ObjectAttribute dummyOA = new ObjectAttribute(
mai.getId()
+ "."
+ ++counter,
mai,
-1,
arrayElement,
zwischenTabellenKlasse.getAttributePolicy());
dummyOA.setParentObject(dummy);
dummyOA.setChanged(true);
dummy.addAttribute(dummyOA);
arrayElement.setReferencingObjectAttribute(dummyOA);
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
} else {
throw new IllegalArgumentException("Every element of an array must be a CidsBean"); // NOI18N
} |
| Solution content |
|---|
new Sirius.server.localserver.object.DefaultObject(
getMetaObject().getID(),
oa.getMai().getForeignKeyClassId());
dummy = new DefaultMetaObject(dummyO, getMetaObject().getDomain());
dummy.setReferencingObjectAttribute(oa);
dummy.setDummy(true);
dummy.setStatus(MetaObject.NEW);
oa.setValue(dummy);
oa.setChanged(true);
}
// 1:n Beziehung??
if (oa.isVirtualOneToManyAttribute()) {
final ObjectAttribute[] arrayElementAttrs = dummy.getAttribs();
dummy.setStatus(MetaObject.MODIFIED);
final ObjectAttribute entryToAddOA = new ObjectAttribute(
mai.getId()
+ "."
+ arrayElementAttrs.length,
mai,
-1,
cb.getMetaObject(),
cb.getMetaObject().getMetaClass().getAttributePolicy());
entryToAddOA.setParentObject(dummy);
entryToAddOA.setChanged(true);
dummy.addAttribute(entryToAddOA);
cb.getMetaObject().setReferencingObjectAttribute(entryToAddOA);
// entryToAddOA.setValue(getMetaObject());
} else { // n-m Beziehung
// ArrayElement anlegen
final MetaClass zwischenTabellenKlasse = (MetaClass)(getMetaObject().getAllClasses()).get(
getMetaObject().getDomain()
+ oa.getMai().getForeignKeyClassId());
final MetaObject arrayElement = zwischenTabellenKlasse.getEmptyInstance();
final ObjectAttribute[] arrayElementAttrs = arrayElement.getAttribs();
for (final ObjectAttribute arrayElementAttribute : arrayElementAttrs) {
arrayElementAttribute.setParentObject(arrayElement);
if (arrayElementAttribute.isPrimaryKey()) {
arrayElementAttribute.setValue(-1);
} else if (arrayElementAttribute.referencesObject()) {
arrayElementAttribute.setValue(cb.getMetaObject());
arrayElementAttribute.setChanged(true);
cb.getMetaObject().setReferencingObjectAttribute(arrayElementAttribute);
} else {
arrayElementAttribute.setValue(getMetaObject().getID());
}
}
// // Wen noch kein Dummy-Objekt existiert (Wert ist noch null)
// // Anlegen eines Dummy-Objektes
// if (oa.getValue() == null) {
// final Sirius.server.localserver.object.Object dummyO =
// new Sirius.server.localserver.object.DefaultObject(
// getMetaObject().getID(),
// oa.getMai().getForeignKeyClassId());
// final MetaObject dummyMO = new DefaultMetaObject(dummyO, getMetaObject().getDomain());
// dummyMO.setReferencingObjectAttribute(oa);
// dummyMO.setDummy(true);
// dummyMO.setStatus(MetaObject.NEW);
// oa.setValue(dummyMO);
// oa.setChanged(true);
// }
// hinzufuegen eines Attributes, das auf das angelegte Arrayelement zeigt
dummy.setStatus(MetaObject.MODIFIED);
int counter = dummy.getAttribs().length;
final ObjectAttribute dummyOA = new ObjectAttribute(
mai.getId()
+ "."
+ ++counter,
mai,
-1,
arrayElement,
zwischenTabellenKlasse.getAttributePolicy());
dummyOA.setParentObject(dummy);
dummyOA.setChanged(true);
dummy.addAttribute(dummyOA);
arrayElement.setReferencingObjectAttribute(dummyOA);
}
} else {
throw new IllegalArgumentException("Every element of an array must be a CidsBean"); // NOI18N
} |
| File |
|---|
| CidsBean.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Cast expression |
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
throw new IllegalArgumentException("ObservableList is not registered as Array"); // NOI18N
}
} catch (final Exception e) {
<<<<<<< HEAD
final String msg = "Fehler in listElementsAdded";
LOG.error(msg, e); // NOI18N
throw new RuntimeException(msg, e);
=======
LOG.error("Fehler in listElementsAdded", e); // NOI18N
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
}
}
|
| Solution content |
|---|
}
throw new IllegalArgumentException("ObservableList is not registered as Array"); // NOI18N
}
} catch (final Exception e) {
final String msg = "Fehler in listElementsAdded";
LOG.error(msg, e); // NOI18N
throw new RuntimeException(msg, e);
} |
| File |
|---|
| CidsBean.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Throw statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
final CidsBean cidsBean = (CidsBean)element;
final ObjectAttribute deepestReferencingAttribute = cidsBean.getMetaObject()
.getReferencingObjectAttribute();
<<<<<<< HEAD
final ObjectAttribute oa = this.getMetaObject().getAttributeByFieldName(arrayfield);
final MetaObject dummy = (MetaObject)oa.getValue();
final boolean virtualOneToMany = oa.isVirtualOneToManyAttribute();
if ((cidsBean.getMetaObject().getStatus() == MetaObject.TO_DELETE)
|| ((cidsBean.getMetaObject().getStatus() == MetaObject.MODIFIED)
|| (cidsBean.getMetaObject().getStatus() == MetaObject.NO_STATUS))) {
if (virtualOneToMany) {
oa.setChanged(true);
cidsBean.getMetaObject().setStatus(MetaObject.TO_DELETE);
} else {
deepestReferencingAttribute.setChanged(true);
}
} else if (cidsBean.getMetaObject().getStatus() == MetaObject.NEW) {
// wurde gerade erst angelegt, braucht nur entfernt zu werden
if (virtualOneToMany) {
dummy.removeAttribute(deepestReferencingAttribute);
} else {
deepestReferencingAttribute.setValue(null);
}
}
if (!virtualOneToMany) {
final Sirius.server.localserver.object.Object arrayEntry =
deepestReferencingAttribute.getParentObject();
if (arrayEntry.getStatus() == MetaObject.NEW) {
// wurde gerade erst angelegt, braucht nur entfernt zu werden
final ObjectAttribute toDelete = arrayEntry.getReferencingObjectAttribute();
toDelete.getParentObject().removeAttribute(toDelete);
} else if ((arrayEntry.getStatus() != MetaObject.TEMPLATE)
|| (arrayEntry.getStatus() != MetaObject.TEMPLATE)) {
arrayEntry.setStatus(MetaObject.TO_DELETE);
final ObjectAttribute referencingOA = arrayEntry.getReferencingObjectAttribute();
walkUpAndSetChangedAndModified(referencingOA);
}
=======
if ((cidsBean.getMetaObject().getStatus() == MetaObject.TO_DELETE)
|| (cidsBean.getMetaObject().getStatus() == MetaObject.MODIFIED)) {
deepestReferencingAttribute.setChanged(true);
} else if (cidsBean.getMetaObject().getStatus() == MetaObject.NEW) {
// wurde gerade erst angelegt, braucht nur entfernt zu werden
deepestReferencingAttribute.setValue(null);
}
final Sirius.server.localserver.object.Object arrayEntry = deepestReferencingAttribute.getParentObject();
if (arrayEntry.getStatus() == MetaObject.NEW) {
// wurde gerade erst angelegt, braucht nur entfernt zu werden
final ObjectAttribute toDelete = arrayEntry.getReferencingObjectAttribute();
toDelete.getParentObject().removeAttribute(toDelete);
} else if ((arrayEntry.getStatus() != MetaObject.TEMPLATE)
|| (arrayEntry.getStatus() != MetaObject.TEMPLATE)) {
arrayEntry.setStatus(MetaObject.TO_DELETE);
final ObjectAttribute referencingOA = arrayEntry.getReferencingObjectAttribute();
walkUpAndSetChangedAndModified(referencingOA);
>>>>>>> 9f1fff4708f1c721346c85769a57744dbcfb007c
}
}
getMetaObject().setStatus(MetaObject.MODIFIED); |
| Solution content |
|---|
final CidsBean cidsBean = (CidsBean)element;
final ObjectAttribute deepestReferencingAttribute = cidsBean.getMetaObject()
.getReferencingObjectAttribute();
final ObjectAttribute oa = this.getMetaObject().getAttributeByFieldName(arrayfield);
final MetaObject dummy = (MetaObject)oa.getValue();
final boolean virtualOneToMany = oa.isVirtualOneToManyAttribute();
if ((cidsBean.getMetaObject().getStatus() == MetaObject.TO_DELETE)
|| ((cidsBean.getMetaObject().getStatus() == MetaObject.MODIFIED)
|| (cidsBean.getMetaObject().getStatus() == MetaObject.NO_STATUS))) {
if (virtualOneToMany) {
oa.setChanged(true);
cidsBean.getMetaObject().setStatus(MetaObject.TO_DELETE);
} else {
deepestReferencingAttribute.setChanged(true);
}
} else if (cidsBean.getMetaObject().getStatus() == MetaObject.NEW) {
// wurde gerade erst angelegt, braucht nur entfernt zu werden
if (virtualOneToMany) {
dummy.removeAttribute(deepestReferencingAttribute);
} else {
deepestReferencingAttribute.setValue(null);
}
}
if (!virtualOneToMany) {
final Sirius.server.localserver.object.Object arrayEntry =
deepestReferencingAttribute.getParentObject();
if (arrayEntry.getStatus() == MetaObject.NEW) {
// wurde gerade erst angelegt, braucht nur entfernt zu werden
final ObjectAttribute toDelete = arrayEntry.getReferencingObjectAttribute();
toDelete.getParentObject().removeAttribute(toDelete);
} else if ((arrayEntry.getStatus() != MetaObject.TEMPLATE)
|| (arrayEntry.getStatus() != MetaObject.TEMPLATE)) {
arrayEntry.setStatus(MetaObject.TO_DELETE);
final ObjectAttribute referencingOA = arrayEntry.getReferencingObjectAttribute();
walkUpAndSetChangedAndModified(referencingOA);
}
}
}
getMetaObject().setStatus(MetaObject.MODIFIED); |
| File |
|---|
| CidsBean.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Cast expression |
| Comment |
| If statement |
| Method invocation |
| Variable |