public Date getCreatedDate() { return wrappedInteraction.getCreatedDate(); }
public void onCreatedDateUpdate(T interaction, Date oldCreated) { if (oldCreated == null){ interactionChangeLogger.log(Level.INFO, "The creation date has been initialised for the interaction " + interaction.toString()); } else if (interaction.getCreatedDate() == null){ interactionChangeLogger.log(Level.INFO, "The creation date has been reset for the interaction " + interaction.toString()); } else { interactionChangeLogger.log(Level.INFO, "The creation date " + oldCreated + " has been updated with " + interaction.getCreatedDate() + " in the interaction " + interaction.toString()); } }
/** * * @param interaction * @return the hashcode consistent with the equals method for this comparator */ public static int hashCode(Interaction interaction){ if (unambiguousCuratedInteractionBaseComparator == null){ unambiguousCuratedInteractionBaseComparator = new UnambiguousCuratedInteractionBaseComparator(); } if (interaction == null){ return 0; } int hashcode = 31; hashcode = 31*hashcode + UnambiguousInteractionBaseComparator.hashCode(interaction); hashcode = 31*hashcode + (interaction.getCreatedDate() != null ? interaction.getCreatedDate().hashCode() : 0); hashcode = 31*hashcode + (interaction.getUpdatedDate() != null ? interaction.getUpdatedDate().hashCode() : 0); return hashcode; } }
Date createdDate1 = interaction1.getCreatedDate(); Date createdDate2 = interaction2.getCreatedDate();
Date createdDate1 = interaction1.getCreatedDate(); Date createdDate2 = interaction2.getCreatedDate();
/** * This method will copy basic properties from the Interaction source in the complex target. * It will erase existing annotations, xrefs, checksums and identifiers * This method does not copy the participants of the source * @param source * @param target */ public static void copyAndOverrideBasicComplexPropertiesWithInteractionProperties(Interaction source, Complex target){ if (source != null && target != null){ target.setInteractionType(source.getInteractionType()); target.setCreatedDate(source.getCreatedDate()); target.setUpdatedDate(source.getUpdatedDate()); if (source.getShortName() != null){ target.setShortName(source.getShortName()); } // copy collections target.getAnnotations().clear(); target.getAnnotations().addAll(source.getAnnotations()); target.getXrefs().clear(); target.getXrefs().addAll(source.getXrefs()); target.getIdentifiers().clear(); target.getIdentifiers().addAll(source.getIdentifiers()); target.getChecksums().clear(); target.getChecksums().addAll(source.getChecksums()); } }
target.setCreatedDate(source.getCreatedDate()); target.setShortName(source.getShortName()); target.setInteractionType(source.getInteractionType());