/** * should be used rather than accessing the logs set directly. * This method will never return null, but rather will return an instance * of {@link ome.util.EmptyIterator}. To test for a null collection, * see of {@link #sizeOfLogs()} is less than zero. */ public java.util.Iterator<ome.model.meta.EventLog> iterateLogs() { if (! _loaded ) errorIfUnloaded(); if ( getLogs() == null ) { return new ome.util.EmptyIterator<ome.model.meta.EventLog>(); } return getLogs().iterator(); // TODO should this be direct access }
/** * removes a single element from this set and makes the inverse call on ome.model.meta.EventLog */ public void removeEventLog(ome.model.meta.EventLog target) { if (! _loaded ) errorIfUnloaded(); if (getLogs() == null) { throwNullCollectionException("Logs"); } getLogs().remove( target ); target.setEvent ( null ); }
/** * use like removeEventLog */ public void removeEventLogSet(java.util.Collection<ome.model.meta.EventLog> targets ) { if (! _loaded ) errorIfUnloaded(); if (getLogs() == null) { throwNullCollectionException("Logs"); } getLogs().removeAll( targets ); java.util.Iterator<ome.model.meta.EventLog> it = targets.iterator(); while ( it.hasNext() ) { ome.model.meta.EventLog target = it.next(); target.setEvent ( null ); } }
/** * use like addEventLog. */ public void addEventLogSet(java.util.Collection<ome.model.meta.EventLog> targets) { if (! _loaded ) errorIfUnloaded(); if (getLogs() == null) { throwNullCollectionException("Logs"); } getLogs().addAll( targets ); java.util.Iterator<ome.model.meta.EventLog> it = targets.iterator(); while ( it.hasNext() ) { ome.model.meta.EventLog target = it.next(); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setEvent ( this ); } } }
/** * clears the set. */ public void clearLogs() { if (! _loaded ) errorIfUnloaded(); if (getLogs() == null) { throwNullCollectionException("Logs"); } getLogs().clear(); java.util.Iterator<ome.model.meta.EventLog> it = iterateLogs(); while (it.hasNext()) { ome.model.meta.EventLog target = it.next(); target.setEvent ( null ); } }
/** * use instead of setLogs . Makes the necessary * call on ome.model.meta.EventLog as well. */ public void addEventLog(ome.model.meta.EventLog target) { if (! _loaded ) errorIfUnloaded(); if (getLogs() == null) { throwNullCollectionException("Logs"); } getLogs().add( target ); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setEvent ( this ); } }
return getContainingEvent(); } else if (field.equals(LOGS)) { return getLogs(); } else if (field.equals(SESSION)) { return getSession();