*/
protected void setInstanceIdField() {
if (registerable) {
- if (vorbaId!=null)
+ if (vorbaId != null)
try {
java.lang.reflect.Field fd = this.getClass().getField("id");
fd.set((Object) this, (Object) new String(vorbaId.id));
} catch (IllegalAccessException e) {
- System.err.println("SourceGeneration of "+this.getClass().toString()
- +"\n has resulted in an inaccessible 'id' field!\nCannot set ID from the vorbaId object.")
- e.printStackTrace(System.err);
- }
- catch (SecurityException e) {
+ System.err
+ .println("SourceGeneration of "
+ + this.getClass().toString()
+ + "\n has resulted in an inaccessible 'id' field!\nCannot set ID from the vorbaId object.");
+ e.printStackTrace(System.err);
+ } catch (SecurityException e) {
e.printStackTrace(System.err);
} catch (NoSuchFieldException e) {
this.setRegisterable(false);
}
} else {
System.err.println("Client error. Trying to setInstanceIdField on a "
- +this.getClass().toString()+" (which cannot be given a vorbaId)");
+ + this.getClass().toString() + " (which cannot be given a vorbaId)");
}
}
+
/**
* calculate a hash for the object with all housekeeping fields at standard
* values. (isRegisterable is an immutable attribute property)
}
/**
+ * TODO: combine two versions of the same collection object to resolve
+ * asynchronous updates to the same vamsas object Merges two vamsas objects,
+ * one of which is a later version of the earlier (ie they have the same
+ * vorbaId but one is a later version recently read from the vamsasDocument
+ * collection.
+ *
+ * @return
+ */
+ protected boolean merge(object laterCopy) {
+ return true;
+ }
+
+ /**
*
* @return true if object is registered
*/