public ome.model.experiment.Experiment newInstance() { return new ome.model.experiment.Experiment(); }
/** * removes a single element from this set and makes the inverse call on ome.model.experiment.MicrobeamManipulation */ public void removeMicrobeamManipulation(ome.model.experiment.MicrobeamManipulation target) { if (! _loaded ) errorIfUnloaded(); if (getMicrobeamManipulation() == null) { throwNullCollectionException("MicrobeamManipulation"); } getMicrobeamManipulation().remove( target ); target.setExperiment ( null ); }
/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.experiment.MicrobeamManipulation> unmodifiableMicrobeamManipulation() { if (! _loaded ) errorIfUnloaded(); if ( getMicrobeamManipulation() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getMicrobeamManipulation() ); }
@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(MICROBEAMMANIPULATION)) { return getMicrobeamManipulation(); } 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 clearMicrobeamManipulation() { if (! _loaded ) errorIfUnloaded(); if (getMicrobeamManipulation() == null) { throwNullCollectionException("MicrobeamManipulation"); } getMicrobeamManipulation().clear(); java.util.Iterator<ome.model.experiment.MicrobeamManipulation> it = iterateMicrobeamManipulation(); while (it.hasNext()) { ome.model.experiment.MicrobeamManipulation target = it.next(); target.setExperiment ( null ); } }
/** * Main constructor. */ public Experiment (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(); } }
/** * takes a CBlock and calls the block once for each ome.model.experiment.MicrobeamManipulation while * collecting the results. If <code>block == null</code>, then the * iterator values themselves are collected. This method uses * {@link #iterateMicrobeamManipulation} internally and so will return a value * even if the underlying collection is null. */ @SuppressWarnings("unchecked") public <E> java.util.List<E> collectMicrobeamManipulation(ome.util.CBlock<E> block) { if (! _loaded ) errorIfUnloaded(); java.util.List<E> result = new java.util.ArrayList<E>(); java.util.Iterator<ome.model.experiment.MicrobeamManipulation> it = iterateMicrobeamManipulation(); while ( it.hasNext() ) { IObject obj = (IObject) it.next(); if ( block != null ) { result.add( block.call( obj ) ); } else { result.add( (E) obj ); } } return result; }
e.iterateMicrobeamManipulation(); for (int i = 0; i < e.sizeOfMicrobeamManipulation(); i++)
@Override public void setVersion(Integer version) { if (! _loaded ) errorIfUnloaded(); this.version = version; }
/** * Handles inserting a specific type of model object into our object graph. * @param LSID LSID of the model object. * @param sourceObject Model object itself. * @param indexes Any indexes that should be used to reference the model * object. */ private void handle(String LSID, MicrobeamManipulation sourceObject, Map<String, Integer> indexes) { int experimentIndex = indexes.get("experimentIndex"); Experiment e = experimentList.get(experimentIndex); e.addMicrobeamManipulation(sourceObject); }
public void setType(ome.model.enums.ExperimentType type) { if (! _loaded ) errorIfUnloaded(); this.type = type; } protected java.util.Set<ome.model.experiment.MicrobeamManipulation> microbeamManipulation = new java.util.HashSet<ome.model.experiment.MicrobeamManipulation>();
/** * should be used rather than accessing the microbeamManipulation 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 #sizeOfMicrobeamManipulation()} is less than zero. */ public java.util.Iterator<ome.model.experiment.MicrobeamManipulation> iterateMicrobeamManipulation() { if (! _loaded ) errorIfUnloaded(); if ( getMicrobeamManipulation() == null ) { return new ome.util.EmptyIterator<ome.model.experiment.MicrobeamManipulation>(); } return getMicrobeamManipulation().iterator(); // TODO should this be direct access }
/** * use instead of setMicrobeamManipulation . Makes the necessary * call on ome.model.experiment.MicrobeamManipulation as well. */ public void addMicrobeamManipulation(ome.model.experiment.MicrobeamManipulation target) { if (! _loaded ) errorIfUnloaded(); if (getMicrobeamManipulation() == null) { throwNullCollectionException("MicrobeamManipulation"); } getMicrobeamManipulation().add( target ); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setExperiment ( this ); } }
/** * setter for microbeamManipulation should be avoided. Does not fulfill normal semantics. */ protected void setMicrobeamManipulation(java.util.Set<ome.model.experiment.MicrobeamManipulation> microbeamManipulation) { if (! _loaded ) errorIfUnloaded(); this.microbeamManipulation = microbeamManipulation; } /**
public ome.model.experiment.Experiment proxy() { return new ome.model.experiment.Experiment(this.id, false); }
/** * use like removeMicrobeamManipulation */ public void removeMicrobeamManipulationSet(java.util.Collection<ome.model.experiment.MicrobeamManipulation> targets ) { if (! _loaded ) errorIfUnloaded(); if (getMicrobeamManipulation() == null) { throwNullCollectionException("MicrobeamManipulation"); } getMicrobeamManipulation().removeAll( targets ); java.util.Iterator<ome.model.experiment.MicrobeamManipulation> it = targets.iterator(); while ( it.hasNext() ) { ome.model.experiment.MicrobeamManipulation target = it.next(); target.setExperiment ( null ); } }
public void setDescription(java.lang.String description) { if (! _loaded ) errorIfUnloaded(); this.description = (java.lang.String) description; } protected ome.model.internal.Details details = new Details();
/** * use like addMicrobeamManipulation. */ public void addMicrobeamManipulationSet(java.util.Collection<ome.model.experiment.MicrobeamManipulation> targets) { if (! _loaded ) errorIfUnloaded(); if (getMicrobeamManipulation() == null) { throwNullCollectionException("MicrobeamManipulation"); } getMicrobeamManipulation().addAll( targets ); java.util.Iterator<ome.model.experiment.MicrobeamManipulation> it = targets.iterator(); while ( it.hasNext() ) { ome.model.experiment.MicrobeamManipulation target = it.next(); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setExperiment ( this ); } } }
/** * 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; }
/** * 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; }