/** * setter for folderLinks should be avoided. Does not fulfill normal semantics. */ protected void setFolderLinks(java.util.Set<ome.model.containers.FolderRoiLink> folderLinks) { if (! _loaded ) errorIfUnloaded(); this.folderLinks = folderLinks; } /**
public void setSource(ome.model.core.OriginalFile source) { if (! _loaded ) errorIfUnloaded(); this.source = source; } protected java.util.Set<ome.model.containers.FolderRoiLink> folderLinks = new java.util.HashSet<ome.model.containers.FolderRoiLink>();
/** * setter for annotationLinks should be avoided. Does not fulfill normal semantics. */ protected void setAnnotationLinks(java.util.Set<ome.model.annotations.RoiAnnotationLink> annotationLinks) { if (! _loaded ) errorIfUnloaded(); this.annotationLinks = annotationLinks; } /**
public void setName(java.lang.String name) { if (! _loaded ) errorIfUnloaded(); this.name = (java.lang.String) name; } protected java.util.List<ome.model.roi.Shape> shapes = new java.util.ArrayList<ome.model.roi.Shape>();
/** * 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; }
/** * setter for shapes should be avoided. Does not fulfill normal semantics. */ protected void setShapes(java.util.List<ome.model.roi.Shape> shapes) { if (! _loaded ) errorIfUnloaded(); this.shapes = shapes; } /**
/** * returns the size of shapes. If less than zero, the Set was null. */ public int sizeOfShapes() { if (! _loaded ) errorIfUnloaded(); return this.shapes == null ? -1 : this.shapes.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.containers.Folder instances from this instance. */ public void unlinkFolder (ome.model.containers.Folder removal) { if (! _loaded ) errorIfUnloaded(); java.util.Set<ome.model.containers.FolderRoiLink> toRemove = findFolderRoiLink( removal ); java.util.Iterator<ome.model.containers.FolderRoiLink> it = toRemove.iterator(); while ( it.hasNext() ) { removeFolderRoiLink( it.next(), true ); } }
/** * 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.RoiAnnotationLink> toRemove = findRoiAnnotationLink( removal ); java.util.Iterator<ome.model.annotations.RoiAnnotationLink> it = toRemove.iterator(); while ( it.hasNext() ) { removeRoiAnnotationLink( it.next(), true ); } }
/** * Many-to-one field ome.model.roi.Roi.image (ome.model.core.Image) */ @javax.persistence.ManyToOne(fetch = javax.persistence.FetchType.LAZY, cascade = {javax.persistence.CascadeType.MERGE, javax.persistence.CascadeType.PERSIST, javax.persistence.CascadeType.REFRESH}, targetEntity = ome.model.core.Image.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="image", nullable=true, unique=false, insertable=true, updatable=true) @org.hibernate.annotations.ForeignKey(name="FKroi_image_image") public ome.model.core.Image getImage() { if (! _loaded ) errorIfUnloaded(); return this.image; }
/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.roi.Shape> unmodifiableShapes() { if (! _loaded ) errorIfUnloaded(); if ( getShapes() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getShapes() ); }
/** * Many-to-one field ome.model.roi.Roi.source (ome.model.core.OriginalFile) */ @javax.persistence.ManyToOne(fetch = javax.persistence.FetchType.LAZY, cascade = {javax.persistence.CascadeType.MERGE, javax.persistence.CascadeType.PERSIST, javax.persistence.CascadeType.REFRESH}, targetEntity = ome.model.core.OriginalFile.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="source", nullable=true, unique=false, insertable=true, updatable=true) @org.hibernate.annotations.ForeignKey(name="FKroi_source_originalfile") public ome.model.core.OriginalFile getSource() { if (! _loaded ) errorIfUnloaded(); return this.source; }
/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.annotations.RoiAnnotationLink> unmodifiableAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getAnnotationLinks() ); }
/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.containers.FolderRoiLink> unmodifiableFolderLinks() { if (! _loaded ) errorIfUnloaded(); if ( getFolderLinks() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getFolderLinks() ); }
/** * clears the set. */ public void clearAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); java.util.List<ome.model.annotations.RoiAnnotationLink> list = new java.util.ArrayList<ome.model.annotations.RoiAnnotationLink>( getAnnotationLinks() ); for (ome.model.annotations.RoiAnnotationLink link : list) { removeRoiAnnotationLink( link, true ); } }
/** * removes the given RoiAnnotationLink from annotationLinks, allowing for recursion -- whether * or not the removal will call unlinkRoi again <b>if loaded</b>. */ public void removeRoiAnnotationLink (ome.model.annotations.RoiAnnotationLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().remove( 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.RoiAnnotationLink> iterateAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { return new ome.util.EmptyIterator<ome.model.annotations.RoiAnnotationLink>(); } return getAnnotationLinks().iterator(); // TODO should this be direct access }
/** * Gets the ome.model.roi.Shape at the given index. */ public ome.model.roi.Shape getShape(int index) throws IndexOutOfBoundsException { if (! _loaded ) errorIfUnloaded(); if (getShapes() == null) { throwNullCollectionException("Shapes"); } return getShapes().get(index); }
/** * removes a single element from this set and makes the inverse call on ome.model.containers.FolderRoiLink */ public void removeFolderRoiLink(ome.model.containers.FolderRoiLink target) { if (! _loaded ) errorIfUnloaded(); if (getFolderLinks() == null) { throwNullCollectionException("FolderLinks"); } getFolderLinks().remove( target ); target.setChild ( null ); }