public void setInstrument(ome.model.acquisition.Instrument instrument) { if (! _loaded ) errorIfUnloaded(); this.instrument = instrument; } protected java.util.Set<ome.model.annotations.LightSourceAnnotationLink> annotationLinks = new java.util.HashSet<ome.model.annotations.LightSourceAnnotationLink>();
@Override public void setVersion(Integer version) { if (! _loaded ) errorIfUnloaded(); this.version = version; }
public void setLotNumber(java.lang.String lotNumber) { if (! _loaded ) errorIfUnloaded(); this.lotNumber = (java.lang.String) lotNumber; } protected java.lang.String serialNumber = null;
public void setManufacturer(java.lang.String manufacturer) { if (! _loaded ) errorIfUnloaded(); this.manufacturer = (java.lang.String) manufacturer; } protected java.lang.String model = null;
public void setSerialNumber(java.lang.String serialNumber) { if (! _loaded ) errorIfUnloaded(); this.serialNumber = (java.lang.String) serialNumber; } protected ome.model.acquisition.Instrument instrument = null;
public void setModel(java.lang.String model) { if (! _loaded ) errorIfUnloaded(); this.model = (java.lang.String) model; } protected ome.model.units.Power power = null;
/** * setter for annotationLinks should be avoided. Does not fulfill normal semantics. */ protected void setAnnotationLinks(java.util.Set<ome.model.annotations.LightSourceAnnotationLink> annotationLinks) { if (! _loaded ) errorIfUnloaded(); this.annotationLinks = annotationLinks; } /**
/** * 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; }
/** * returns the size of annotationLinks. If less than zero, the Set was null. */ public int sizeOfAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); return this.annotationLinks == null ? -1 : this.annotationLinks.size(); }
/** * 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; }
/** * unlinks all ome.model.annotations.Annotation instances from this instance. */ public void unlinkAnnotation (ome.model.annotations.Annotation removal) { if (! _loaded ) errorIfUnloaded(); java.util.Set<ome.model.annotations.LightSourceAnnotationLink> toRemove = findLightSourceAnnotationLink( removal ); java.util.Iterator<ome.model.annotations.LightSourceAnnotationLink> it = toRemove.iterator(); while ( it.hasNext() ) { removeLightSourceAnnotationLink( it.next(), true ); } }
/** * Many-to-one field ome.model.acquisition.LightSource.instrument (ome.model.acquisition.Instrument) */ @javax.persistence.ManyToOne(fetch = javax.persistence.FetchType.EAGER, cascade = {javax.persistence.CascadeType.MERGE, javax.persistence.CascadeType.PERSIST, javax.persistence.CascadeType.REFRESH}, targetEntity = ome.model.acquisition.Instrument.class) @org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK, org.hibernate.annotations.CascadeType.MERGE, org.hibernate.annotations.CascadeType.PERSIST, org.hibernate.annotations.CascadeType.REPLICATE, org.hibernate.annotations.CascadeType.REFRESH, org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.EVICT}) @javax.persistence.JoinColumn(name="instrument", nullable=false, unique=false, insertable=true, updatable=true) @org.hibernate.annotations.ForeignKey(name="FKlightsource_instrument_instrument") public ome.model.acquisition.Instrument getInstrument() { if (! _loaded ) errorIfUnloaded(); return this.instrument; }
/** * Enum-mapped unit-based field ome.model.acquisition.LightSource.power (ome.model.units.Power) */ @javax.persistence.Embedded @javax.persistence.AttributeOverrides( { @javax.persistence.AttributeOverride(name="value", column = @javax.persistence.Column(name="\"power\"") ), @javax.persistence.AttributeOverride(name="unit", column = @javax.persistence.Column(name="powerUnit") ) } ) public ome.model.units.Power getPower() { if (! _loaded ) errorIfUnloaded(); return this.power; }
/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.annotations.LightSourceAnnotationLink> unmodifiableAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getAnnotationLinks() ); }
/** * clears the set. */ public void clearAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); java.util.List<ome.model.annotations.LightSourceAnnotationLink> list = new java.util.ArrayList<ome.model.annotations.LightSourceAnnotationLink>( getAnnotationLinks() ); for (ome.model.annotations.LightSourceAnnotationLink link : list) { removeLightSourceAnnotationLink( link, true ); } }
/** * removes the given LightSourceAnnotationLink from annotationLinks, allowing for recursion -- whether * or not the removal will call unlinkLightSource again <b>if loaded</b>. */ public void removeLightSourceAnnotationLink (ome.model.annotations.LightSourceAnnotationLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().remove( link ); }
/** * Adds a ome.model.annotations.LightSourceAnnotationLink to annotationLinks, allowing for recursion -- whether * or not addLightSourceAnnotationLink will be called on the addition <b>if it is loaded</b> */ public void addLightSourceAnnotationLink (ome.model.annotations.LightSourceAnnotationLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().add( link ); }
/** * should be used rather than accessing the annotationLinks 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 #sizeOfAnnotationLinks()} is less than zero. */ public java.util.Iterator<ome.model.annotations.LightSourceAnnotationLink> iterateAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { return new ome.util.EmptyIterator<ome.model.annotations.LightSourceAnnotationLink>(); } return getAnnotationLinks().iterator(); // TODO should this be direct access }
/** * removes a single element from this set and makes the inverse call on ome.model.annotations.LightSourceAnnotationLink */ public void removeLightSourceAnnotationLink(ome.model.annotations.LightSourceAnnotationLink target) { if (! _loaded ) errorIfUnloaded(); if (getAnnotationLinks() == null) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().remove( target ); target.setParent ( null ); }
/** * Adds a ome.model.annotations.LightSourceAnnotationLink to annotationLinks . This entails changing our annotationLinks Set, * creating a new ome.model.annotations.LightSourceAnnotationLink and calling linkAnnotation on the ome.model.annotations.Annotation. */ public ome.model.annotations.LightSourceAnnotationLink linkAnnotation (ome.model.annotations.Annotation addition) { if (! _loaded ) errorIfUnloaded(); // Setup link ome.model.annotations.LightSourceAnnotationLink link = new ome.model.annotations.LightSourceAnnotationLink(); link.link( this, addition ); // Add it to us and possibly the other side. addLightSourceAnnotationLink( link, true ); return link; }