/** * Handles linking a specific reference object to a target object in our * object graph. * @param target Target model object. * @param reference Reference model object. */ private void handleReference(ObjectiveSettings target, Objective reference) { target.setObjective(reference); }
public ome.model.acquisition.ObjectiveSettings newInstance() { return new ome.model.acquisition.ObjectiveSettings(); }
public void setMedium(ome.model.enums.Medium medium) { if (! _loaded ) errorIfUnloaded(); this.medium = medium; } protected java.lang.Double refractiveIndex = null;
@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(CORRECTIONCOLLAR)) { return getCorrectionCollar(); } else if (field.equals(MEDIUM)) { return getMedium(); } else if (field.equals(REFRACTIVEINDEX)) { return getRefractiveIndex(); } else if (field.equals(OBJECTIVE)) { return getObjective(); } else if (field.equals(DETAILS)) { return getDetails(); } else { if (_dynamicFields != null) { return _dynamicFields.get(field); } return null; } }
@Override public void putAt(String field, Object value) { if (field == null) { return; } else if (field.equals(ID)) { setId((Long) value); } else if (field.equals(VERSION)) { setVersion((Integer) value); } else if (field.equals(CORRECTIONCOLLAR)) { setCorrectionCollar((java.lang.Double)value); } else if (field.equals(MEDIUM)) { setMedium((ome.model.enums.Medium)value); } else if (field.equals(REFRACTIVEINDEX)) { setRefractiveIndex((java.lang.Double)value); } else if (field.equals(OBJECTIVE)) { setObjective((ome.model.acquisition.Objective)value); } else if (field.equals(DETAILS)) { setDetails((ome.model.internal.Details)value); } else { if (_dynamicFields == null) { _dynamicFields = new java.util.HashMap<String, Object>(); } _dynamicFields.put(field,value); } }
/** * Finds the matching unique settings for an image. * @param uniqueSettings Set of existing unique settings. * @param image Image to find unique settings for. * @return Matched unique settings or <code>null</code> if * <code>lc.getObjectiveSettings() == null</code>. */ private ObjectiveSettings getUniqueObjectiveSettings( Set<ObjectiveSettings> uniqueSettings, Image image) { ObjectiveSettings s1 = image.getObjectiveSettings(); if (s1 == null) { return null; } for (ObjectiveSettings s2 : uniqueSettings) { if (compare(s1.getCorrectionCollar(), s2.getCorrectionCollar()) && compare(s1.getMedium(), s2.getMedium()) && s1.getObjective() == s2.getObjective() && compare(s1.getRefractiveIndex(), s2.getRefractiveIndex())) { return s2; } } uniqueSettings.add(s1); return s1; }
/** * Main constructor. */ public ObjectiveSettings (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(); } }
boolean imagesContainsObjectiveSettings(Session s, List<Long> images, ObjectiveSettings os, Map<Long, List<Long>> cache) { Long osID = os.getId(); return imagesContainsObjectiveSettings(s, images, osID, cache); }
/** * 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, ObjectiveSettings sourceObject, Map<String, Integer> indexes) { Integer instrumentIndex = indexes.get("instrumentIndex"); Integer otfIndex = indexes.get("otfIndex"); Integer imageIndex = indexes.get("imageIndex"); if (instrumentIndex != null && otfIndex != null) { OTF o = getOTF(instrumentIndex, otfIndex); o.setObjective(sourceObject.getObjective()); } else { Image i = getImage(imageIndex); i.setObjectiveSettings(sourceObject); } }
public void setObjective(ome.model.acquisition.Objective objective) { if (! _loaded ) errorIfUnloaded(); this.objective = objective; } protected ome.model.internal.Details details = new Details();
public ObjectiveSettings( ome.model.acquisition.Objective _objective ) { this(null, true); setObjective(_objective); }
public ome.model.acquisition.ObjectiveSettings proxy() { return new ome.model.acquisition.ObjectiveSettings(this.id, false); }
/** * 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; }
@Override public void setVersion(Integer version) { if (! _loaded ) errorIfUnloaded(); this.version = version; }
public void setCorrectionCollar(java.lang.Double correctionCollar) { if (! _loaded ) errorIfUnloaded(); this.correctionCollar = (java.lang.Double) correctionCollar; } protected ome.model.enums.Medium medium = null;
public void setRefractiveIndex(java.lang.Double refractiveIndex) { if (! _loaded ) errorIfUnloaded(); this.refractiveIndex = (java.lang.Double) refractiveIndex; } protected ome.model.acquisition.Objective objective = null;
/** * 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; }
/** * Simple field ome.model.acquisition.ObjectiveSettings.correctionCollar (java.lang.Double) */ // No @Type annotation @org.hibernate.search.annotations.Fields({ @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED), @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED, name="combined_fields") }) @javax.persistence.Column(columnDefinition="", nullable=true, unique=false, name="correctionCollar", updatable=true) public java.lang.Double getCorrectionCollar() { if (! _loaded ) errorIfUnloaded(); return this.correctionCollar; }
/** * Simple field ome.model.acquisition.ObjectiveSettings.refractiveIndex (java.lang.Double) */ // No @Type annotation @org.hibernate.search.annotations.Fields({ @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED), @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED, name="combined_fields") }) @javax.persistence.Column(columnDefinition="", nullable=true, unique=false, name="refractiveIndex", updatable=true) public java.lang.Double getRefractiveIndex() { if (! _loaded ) errorIfUnloaded(); return this.refractiveIndex; }
/** * Many-to-one field ome.model.acquisition.ObjectiveSettings.objective (ome.model.acquisition.Objective) */ @javax.persistence.ManyToOne(fetch = javax.persistence.FetchType.LAZY, cascade = {javax.persistence.CascadeType.MERGE, javax.persistence.CascadeType.PERSIST, javax.persistence.CascadeType.REFRESH}, targetEntity = ome.model.acquisition.Objective.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="objective", nullable=false, unique=false, insertable=true, updatable=true) @org.hibernate.annotations.ForeignKey(name="FKobjectivesettings_objective_objective") public ome.model.acquisition.Objective getObjective() { if (! _loaded ) errorIfUnloaded(); return this.objective; }