public ome.model.experiment.MicrobeamManipulation newInstance() { return new ome.model.experiment.MicrobeamManipulation(); }
/** * removes a single element from this set and makes the inverse call on ome.model.acquisition.LightSettings */ public void removeLightSettings(ome.model.acquisition.LightSettings target) { if (! _loaded ) errorIfUnloaded(); if (getLightSourceSettings() == null) { throwNullCollectionException("LightSourceSettings"); } getLightSourceSettings().remove( target ); target.setMicrobeamManipulation ( null ); }
/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.acquisition.LightSettings> unmodifiableLightSourceSettings() { if (! _loaded ) errorIfUnloaded(); if ( getLightSourceSettings() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getLightSourceSettings() ); }
@Override public Object retrieve(String field) { if (field == null) { return null; } else if (field.equals(ID)) { return getId(); } else if (field.equals(VERSION)) { return getVersion(); } else if (field.equals(TYPE)) { return getType(); } else if (field.equals(LIGHTSOURCESETTINGS)) { return getLightSourceSettings(); } else if (field.equals(EXPERIMENT)) { return getExperiment(); } else if (field.equals(DESCRIPTION)) { return getDescription(); } else if (field.equals(DETAILS)) { return getDetails(); } else { if (_dynamicFields != null) { return _dynamicFields.get(field); } return null; } }
/** * clears the set. */ public void clearLightSourceSettings() { if (! _loaded ) errorIfUnloaded(); if (getLightSourceSettings() == null) { throwNullCollectionException("LightSourceSettings"); } getLightSourceSettings().clear(); java.util.Iterator<ome.model.acquisition.LightSettings> it = iterateLightSourceSettings(); while (it.hasNext()) { ome.model.acquisition.LightSettings target = it.next(); target.setMicrobeamManipulation ( null ); } }
/** * Main constructor. */ public MicrobeamManipulation (Long id, boolean loaded) { setId(id); if (loaded) { getDetails().setContext(this); } else { if (this.id == null) { throw new ApiUsageException("Id cannot be null for a proxy"); } unload(); } }
/** * Use the {@link ome.model.internal.Details#copy(ome.model.internal.Details)} * or {@link ome.model.internal.Details#shallowCopy(ome.model.internal.Details)} * methods to set the {@link Details} instance instead. */ protected void setDetails(ome.model.internal.Details details) { if (! _loaded ) errorIfUnloaded(); this.details = (Details) details; }
/** * takes a CBlock and calls the block once for each ome.model.acquisition.LightSettings while * collecting the results. If <code>block == null</code>, then the * iterator values themselves are collected. This method uses * {@link #iterateLightSourceSettings} internally and so will return a value * even if the underlying collection is null. */ @SuppressWarnings("unchecked") public <E> java.util.List<E> collectLightSourceSettings(ome.util.CBlock<E> block) { if (! _loaded ) errorIfUnloaded(); java.util.List<E> result = new java.util.ArrayList<E>(); java.util.Iterator<ome.model.acquisition.LightSettings> it = iterateLightSourceSettings(); while ( it.hasNext() ) { IObject obj = (IObject) it.next(); if ( block != null ) { result.add( block.call( obj ) ); } else { result.add( (E) obj ); } } return result; }
if (i == microbeamManipulationIndex) mm.addLightSettings(sourceObject);
@Override public void setVersion(Integer version) { if (! _loaded ) errorIfUnloaded(); this.version = version; }
/** * should be used rather than accessing the lightSourceSettings 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 #sizeOfLightSourceSettings()} is less than zero. */ public java.util.Iterator<ome.model.acquisition.LightSettings> iterateLightSourceSettings() { if (! _loaded ) errorIfUnloaded(); if ( getLightSourceSettings() == null ) { return new ome.util.EmptyIterator<ome.model.acquisition.LightSettings>(); } return getLightSourceSettings().iterator(); // TODO should this be direct access }
/** * use instead of setLightSourceSettings . Makes the necessary * call on ome.model.acquisition.LightSettings as well. */ public void addLightSettings(ome.model.acquisition.LightSettings target) { if (! _loaded ) errorIfUnloaded(); if (getLightSourceSettings() == null) { throwNullCollectionException("LightSourceSettings"); } getLightSourceSettings().add( target ); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setMicrobeamManipulation ( this ); } }
public void setType(ome.model.enums.MicrobeamManipulationType type) { if (! _loaded ) errorIfUnloaded(); this.type = type; } protected java.util.Set<ome.model.acquisition.LightSettings> lightSourceSettings = new java.util.HashSet<ome.model.acquisition.LightSettings>();
public ome.model.experiment.MicrobeamManipulation proxy() { return new ome.model.experiment.MicrobeamManipulation(this.id, false); }
/** * use like removeLightSettings */ public void removeLightSettingsSet(java.util.Collection<ome.model.acquisition.LightSettings> targets ) { if (! _loaded ) errorIfUnloaded(); if (getLightSourceSettings() == null) { throwNullCollectionException("LightSourceSettings"); } getLightSourceSettings().removeAll( targets ); java.util.Iterator<ome.model.acquisition.LightSettings> it = targets.iterator(); while ( it.hasNext() ) { ome.model.acquisition.LightSettings target = it.next(); target.setMicrobeamManipulation ( null ); } }
public void setExperiment(ome.model.experiment.Experiment experiment) { if (! _loaded ) errorIfUnloaded(); this.experiment = experiment; } protected java.lang.String description = null;
/** * use like addLightSettings. */ public void addLightSettingsSet(java.util.Collection<ome.model.acquisition.LightSettings> targets) { if (! _loaded ) errorIfUnloaded(); if (getLightSourceSettings() == null) { throwNullCollectionException("LightSourceSettings"); } getLightSourceSettings().addAll( targets ); java.util.Iterator<ome.model.acquisition.LightSettings> it = targets.iterator(); while ( it.hasNext() ) { ome.model.acquisition.LightSettings target = it.next(); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setMicrobeamManipulation ( this ); } } }
/** * setter for lightSourceSettings should be avoided. Does not fulfill normal semantics. */ protected void setLightSourceSettings(java.util.Set<ome.model.acquisition.LightSettings> lightSourceSettings) { if (! _loaded ) errorIfUnloaded(); this.lightSourceSettings = lightSourceSettings; } /**
public void setDescription(java.lang.String description) { if (! _loaded ) errorIfUnloaded(); this.description = (java.lang.String) description; } protected ome.model.internal.Details details = new Details();
/** * This version number is controlled by the database for optimisitic * locking. */ @javax.persistence.Column(name="version") // @javax.persistence.Version //TODO mark off #118 if this succeeds, otherwise, completely remove versions and test updateEvent @Override public Integer getVersion() { if (! _loaded ) errorIfUnloaded(); return this.version; }