All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.molgenis.omx.xgap.Spot Maven / Gradle / Ivy
/* File: org.molgenis.omx/model/Spot.java
* Generator: org.molgenis.generators.DataTypeGen 4.0.0-testing
*
* THIS FILE HAS BEEN GENERATED, PLEASE DO NOT EDIT!
*/
package org.molgenis.omx.xgap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import org.molgenis.data.AttributeMetaData;
import org.molgenis.data.support.MapEntity;
import org.molgenis.data.Entity;
/**
* Spot:
This is the spot on a microarray.
Note: We don't distinquish between probes (the sequence) and spots
(the sequence as spotted on the array).
.
* @author MOLGENIS generator
*/
@javax.persistence.Entity
@javax.persistence.Table(name = "Spot", uniqueConstraints={ @javax.persistence.UniqueConstraint( columnNames={ "x", "y", "GridX", "GridY" } ) }
)
@javax.xml.bind.annotation.XmlAccessorType(javax.xml.bind.annotation.XmlAccessType.FIELD)
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value={"EI_EXPOSE_REP", "EI_EXPOSE_REP2"}, justification="Exposing internal representation is accepted")
public class Spot extends org.molgenis.omx.xgap.Probe implements org.molgenis.data.Entity
{
/** default serial version ID */
private static final long serialVersionUID = 1L;
public final static String ENTITY_NAME = "Spot";
// fieldname constants
public final static String X = "x";
public final static String Y = "y";
public final static String GRIDX = "GridX";
public final static String GRIDY = "GridY";
public final static String ID = "id";
// member variables (including setters.getters for interface)
public String getEntityName()
{
return ENTITY_NAME;
}
//Row[type=int]
@javax.persistence.Column(name="x", nullable=false)
@javax.xml.bind.annotation.XmlElement(name="x")
@javax.validation.constraints.NotNull
private Integer x = null;
//Column[type=int]
@javax.persistence.Column(name="y", nullable=false)
@javax.xml.bind.annotation.XmlElement(name="y")
@javax.validation.constraints.NotNull
private Integer y = null;
//Meta Row[type=int]
@javax.persistence.Column(name="GridX")
@javax.xml.bind.annotation.XmlElement(name="gridX")
private Integer gridX = null;
//Meta Column[type=int]
@javax.persistence.Column(name="GridY")
@javax.xml.bind.annotation.XmlElement(name="gridY")
private Integer gridY = null;
//automatically generated internal id, only for internal use.[type=int]
//constructors
public Spot()
{
//set the type for a new instance
set__Type(this.getClass().getSimpleName());
}
//getters and setters
/**
* Get the Row.
* @return x.
*/
public Integer getX()
{
return this.x;
}
/**
* Set the Row.
* @param x
*/
public void setX( Integer x)
{
this.x = x;
}
/**
* Get the Column.
* @return y.
*/
public Integer getY()
{
return this.y;
}
/**
* Set the Column.
* @param y
*/
public void setY( Integer y)
{
this.y = y;
}
/**
* Get the Meta Row.
* @return gridX.
*/
public Integer getGridX()
{
return this.gridX;
}
/**
* Set the Meta Row.
* @param gridX
*/
public void setGridX( Integer gridX)
{
this.gridX = gridX;
}
/**
* Get the Meta Column.
* @return gridY.
*/
public Integer getGridY()
{
return this.gridY;
}
/**
* Set the Meta Column.
* @param gridY
*/
public void setGridY( Integer gridY)
{
this.gridY = gridY;
}
/**
* Generic getter. Get the property by using the name.
*/
@Override
public Object get(String name)
{
name = name.toLowerCase();
if (name.equals("id"))
return getId();
if (name.equals("identifier"))
return getIdentifier();
if (name.equals("name"))
return getName();
if (name.equals("__type"))
return get__Type();
if(name.equals("__type_label"))
return get__TypeLabel();
if (name.equals("description"))
return getDescription();
if (name.equals("chromosome"))
return getChromosome();
if (name.equals("cm"))
return getCM();
if (name.equals("bpstart"))
return getBpStart();
if (name.equals("bpend"))
return getBpEnd();
if (name.equals("seq"))
return getSeq();
if (name.equals("symbol"))
return getSymbol();
if (name.equals("mismatch"))
return getMismatch();
if (name.equals("probeset"))
return getProbeSet();
if (name.equals("reportsfor"))
return getReportsFor();
if (name.equals("x"))
return getX();
if (name.equals("y"))
return getY();
if (name.equals("gridx"))
return getGridX();
if (name.equals("gridy"))
return getGridY();
return null;
}
@Override
public void set(org.molgenis.data.Entity entity, boolean strict)
{
//set Id
// query formal name, else lowercase name
if(entity.getInt("id") != null) this.setId(entity.getInt("id"));
else if(entity.getInt("id") != null) this.setId(entity.getInt("id"));
else if(strict) this.setId(entity.getInt("id")); // setting null is not an option due to function overloading
if( entity.getInt("spot_id") != null) this.setId(entity.getInt("spot_id"));
else if( entity.getInt("Spot_id") != null) this.setId(entity.getInt("Spot_id"));
//set Identifier
// query formal name, else lowercase name
if(entity.getString("identifier") != null) this.setIdentifier(entity.getString("identifier"));
else if(entity.getString("Identifier") != null) this.setIdentifier(entity.getString("Identifier"));
else if(strict) this.setIdentifier(entity.getString("identifier")); // setting null is not an option due to function overloading
if( entity.getString("spot_identifier") != null) this.setIdentifier(entity.getString("spot_identifier"));
else if( entity.getString("Spot_Identifier") != null) this.setIdentifier(entity.getString("Spot_Identifier"));
//set Name
// query formal name, else lowercase name
if(entity.getString("name") != null) this.setName(entity.getString("name"));
else if(entity.getString("Name") != null) this.setName(entity.getString("Name"));
else if(strict) this.setName(entity.getString("name")); // setting null is not an option due to function overloading
if( entity.getString("spot_name") != null) this.setName(entity.getString("spot_name"));
else if( entity.getString("Spot_Name") != null) this.setName(entity.getString("Spot_Name"));
//set __Type
// query formal name, else lowercase name
if(entity.getString("__type") != null) this.set__Type(entity.getString("__type"));
else if(entity.getString("__Type") != null) this.set__Type(entity.getString("__Type"));
else if(strict) this.set__Type(entity.getString("__type")); // setting null is not an option due to function overloading
if( entity.getString("spot___type") != null) this.set__Type(entity.getString("spot___type"));
else if( entity.getString("Spot___Type") != null) this.set__Type(entity.getString("Spot___Type"));
//set Description
// query formal name, else lowercase name
if(entity.getString("description") != null) this.setDescription(entity.getString("description"));
else if(entity.getString("description") != null) this.setDescription(entity.getString("description"));
else if(strict) this.setDescription(entity.getString("description")); // setting null is not an option due to function overloading
if( entity.getString("spot_description") != null) this.setDescription(entity.getString("spot_description"));
else if( entity.getString("Spot_description") != null) this.setDescription(entity.getString("Spot_description"));
//set Chromosome
// query formal name, else lowercase name
if( entity.getEntity("Chromosome", org.molgenis.omx.xgap.Chromosome.class) != null) {
this.setChromosome(entity.getEntity("Chromosome", org.molgenis.omx.xgap.Chromosome.class));
}
else if( entity.getEntity("chromosome", org.molgenis.omx.xgap.Chromosome.class) != null) {
this.setChromosome(entity.getEntity("chromosome", org.molgenis.omx.xgap.Chromosome.class));
}
else if( entity.getEntity("Spot_Chromosome", org.molgenis.omx.xgap.Chromosome.class) != null) {
this.setChromosome(entity.getEntity("Spot_Chromosome", org.molgenis.omx.xgap.Chromosome.class));
}
else if( entity.getEntity("spot_chromosome", org.molgenis.omx.xgap.Chromosome.class) != null) {
this.setChromosome(entity.getEntity("Spot_Chromosome", org.molgenis.omx.xgap.Chromosome.class));
}
//set CM
// query formal name, else lowercase name
if(entity.getDouble("cm") != null) this.setCM(entity.getDouble("cm"));
else if(entity.getDouble("cM") != null) this.setCM(entity.getDouble("cM"));
else if(strict) this.setCM(entity.getDouble("cm")); // setting null is not an option due to function overloading
if( entity.getDouble("spot_cm") != null) this.setCM(entity.getDouble("spot_cm"));
else if( entity.getDouble("Spot_cM") != null) this.setCM(entity.getDouble("Spot_cM"));
//set BpStart
// query formal name, else lowercase name
if(entity.getLong("bpstart") != null) this.setBpStart(entity.getLong("bpstart"));
else if(entity.getLong("bpStart") != null) this.setBpStart(entity.getLong("bpStart"));
else if(strict) this.setBpStart(entity.getLong("bpstart")); // setting null is not an option due to function overloading
if( entity.getLong("spot_bpstart") != null) this.setBpStart(entity.getLong("spot_bpstart"));
else if( entity.getLong("Spot_bpStart") != null) this.setBpStart(entity.getLong("Spot_bpStart"));
//set BpEnd
// query formal name, else lowercase name
if(entity.getLong("bpend") != null) this.setBpEnd(entity.getLong("bpend"));
else if(entity.getLong("bpEnd") != null) this.setBpEnd(entity.getLong("bpEnd"));
else if(strict) this.setBpEnd(entity.getLong("bpend")); // setting null is not an option due to function overloading
if( entity.getLong("spot_bpend") != null) this.setBpEnd(entity.getLong("spot_bpend"));
else if( entity.getLong("Spot_bpEnd") != null) this.setBpEnd(entity.getLong("Spot_bpEnd"));
//set Seq
// query formal name, else lowercase name
if(entity.getString("seq") != null) this.setSeq(entity.getString("seq"));
else if(entity.getString("Seq") != null) this.setSeq(entity.getString("Seq"));
else if(strict) this.setSeq(entity.getString("seq")); // setting null is not an option due to function overloading
if( entity.getString("spot_seq") != null) this.setSeq(entity.getString("spot_seq"));
else if( entity.getString("Spot_Seq") != null) this.setSeq(entity.getString("Spot_Seq"));
//set Symbol
// query formal name, else lowercase name
if(entity.getString("symbol") != null) this.setSymbol(entity.getString("symbol"));
else if(entity.getString("Symbol") != null) this.setSymbol(entity.getString("Symbol"));
else if(strict) this.setSymbol(entity.getString("symbol")); // setting null is not an option due to function overloading
if( entity.getString("spot_symbol") != null) this.setSymbol(entity.getString("spot_symbol"));
else if( entity.getString("Spot_Symbol") != null) this.setSymbol(entity.getString("Spot_Symbol"));
//set Mismatch
// query formal name, else lowercase name
if(entity.getBoolean("mismatch") != null) this.setMismatch(entity.getBoolean("mismatch"));
else if(entity.getBoolean("Mismatch") != null) this.setMismatch(entity.getBoolean("Mismatch"));
else if(strict) this.setMismatch(entity.getBoolean("mismatch")); // setting null is not an option due to function overloading
if( entity.getBoolean("spot_mismatch") != null) this.setMismatch(entity.getBoolean("spot_mismatch"));
else if( entity.getBoolean("Spot_Mismatch") != null) this.setMismatch(entity.getBoolean("Spot_Mismatch"));
//set ProbeSet
// query formal name, else lowercase name
if( entity.getEntity("ProbeSet", org.molgenis.omx.xgap.ProbeSet.class) != null) {
this.setProbeSet(entity.getEntity("ProbeSet", org.molgenis.omx.xgap.ProbeSet.class));
}
else if( entity.getEntity("probeset", org.molgenis.omx.xgap.ProbeSet.class) != null) {
this.setProbeSet(entity.getEntity("probeset", org.molgenis.omx.xgap.ProbeSet.class));
}
else if( entity.getEntity("Spot_ProbeSet", org.molgenis.omx.xgap.ProbeSet.class) != null) {
this.setProbeSet(entity.getEntity("Spot_ProbeSet", org.molgenis.omx.xgap.ProbeSet.class));
}
else if( entity.getEntity("spot_probeset", org.molgenis.omx.xgap.ProbeSet.class) != null) {
this.setProbeSet(entity.getEntity("Spot_ProbeSet", org.molgenis.omx.xgap.ProbeSet.class));
}
//set ReportsFor
// query formal name, else lowercase name
if( entity.getEntity("ReportsFor", org.molgenis.omx.xgap.Gene.class) != null) {
this.setReportsFor(entity.getEntity("ReportsFor", org.molgenis.omx.xgap.Gene.class));
}
else if( entity.getEntity("reportsfor", org.molgenis.omx.xgap.Gene.class) != null) {
this.setReportsFor(entity.getEntity("reportsfor", org.molgenis.omx.xgap.Gene.class));
}
else if( entity.getEntity("Spot_ReportsFor", org.molgenis.omx.xgap.Gene.class) != null) {
this.setReportsFor(entity.getEntity("Spot_ReportsFor", org.molgenis.omx.xgap.Gene.class));
}
else if( entity.getEntity("spot_reportsfor", org.molgenis.omx.xgap.Gene.class) != null) {
this.setReportsFor(entity.getEntity("Spot_ReportsFor", org.molgenis.omx.xgap.Gene.class));
}
//set X
// query formal name, else lowercase name
if(entity.getInt("x") != null) this.setX(entity.getInt("x"));
else if(entity.getInt("x") != null) this.setX(entity.getInt("x"));
else if(strict) this.setX(entity.getInt("x")); // setting null is not an option due to function overloading
if( entity.getInt("spot_x") != null) this.setX(entity.getInt("spot_x"));
else if( entity.getInt("Spot_x") != null) this.setX(entity.getInt("Spot_x"));
//set Y
// query formal name, else lowercase name
if(entity.getInt("y") != null) this.setY(entity.getInt("y"));
else if(entity.getInt("y") != null) this.setY(entity.getInt("y"));
else if(strict) this.setY(entity.getInt("y")); // setting null is not an option due to function overloading
if( entity.getInt("spot_y") != null) this.setY(entity.getInt("spot_y"));
else if( entity.getInt("Spot_y") != null) this.setY(entity.getInt("Spot_y"));
//set GridX
// query formal name, else lowercase name
if(entity.getInt("gridx") != null) this.setGridX(entity.getInt("gridx"));
else if(entity.getInt("GridX") != null) this.setGridX(entity.getInt("GridX"));
else if(strict) this.setGridX(entity.getInt("gridx")); // setting null is not an option due to function overloading
if( entity.getInt("spot_gridx") != null) this.setGridX(entity.getInt("spot_gridx"));
else if( entity.getInt("Spot_GridX") != null) this.setGridX(entity.getInt("Spot_GridX"));
//set GridY
// query formal name, else lowercase name
if(entity.getInt("gridy") != null) this.setGridY(entity.getInt("gridy"));
else if(entity.getInt("GridY") != null) this.setGridY(entity.getInt("GridY"));
else if(strict) this.setGridY(entity.getInt("gridy")); // setting null is not an option due to function overloading
if( entity.getInt("spot_gridy") != null) this.setGridY(entity.getInt("spot_gridy"));
else if( entity.getInt("Spot_GridY") != null) this.setGridY(entity.getInt("Spot_GridY"));
}
@Override
public String toString()
{
return this.toString(false);
}
public String toString(boolean verbose)
{
StringBuilder sb = new StringBuilder("Spot(");
sb.append("id='" + getId()+"' ");
sb.append("identifier='" + getIdentifier()+"' ");
sb.append("name='" + getName()+"' ");
sb.append("__Type='" + get__Type()+"' ");
sb.append("description='" + getDescription()+"' ");
sb.append("chromosome='" + getChromosome()+"' ");
sb.append("cM='" + getCM()+"' ");
sb.append("bpStart='" + getBpStart()+"' ");
sb.append("bpEnd='" + getBpEnd()+"' ");
sb.append("seq='" + getSeq()+"' ");
sb.append("symbol='" + getSymbol()+"' ");
sb.append("mismatch='" + getMismatch()+"' ");
sb.append("probeSet='" + getProbeSet()+"' ");
sb.append("reportsFor='" + getReportsFor()+"' ");
sb.append("x='" + getX()+"' ");
sb.append("y='" + getY()+"' ");
sb.append("gridX='" + getGridX()+"' ");
sb.append("gridY='" + getGridY()+"'");
sb.append(");");
return sb.toString();
}
@Override
public Integer getIdValue()
{
return getId();
}
@Override
public Iterable getAttributeNames()
{
Set attributeNames = new LinkedHashSet();
for (AttributeMetaData attr : new SpotMetaData().getAttributes())
{
attributeNames.add(attr.getName());
}
return attributeNames;
}
@Override
public java.util.List getLabelAttributeNames()
{
java.util.List result = new java.util.ArrayList();
result.add("Identifier");
return result;
}
@Override
public void set(String attributeName, Object value)
{
if("id".equalsIgnoreCase(attributeName)) {
this.setId((Integer)value);
return;
}
if("Identifier".equalsIgnoreCase(attributeName)) {
this.setIdentifier((String)value);
return;
}
if("Name".equalsIgnoreCase(attributeName)) {
this.setName((String)value);
return;
}
if("__Type".equalsIgnoreCase(attributeName)) {
this.set__Type((String)value);
return;
}
if("description".equalsIgnoreCase(attributeName)) {
this.setDescription((String)value);
return;
}
if("Chromosome".equalsIgnoreCase(attributeName)) {
org.molgenis.omx.xgap.Chromosome e = new org.molgenis.omx.xgap.Chromosome();
e.set((Entity)value);
this.setChromosome(e);
return;
}
if("cM".equalsIgnoreCase(attributeName)) {
this.setCM((Double)value);
return;
}
if("bpStart".equalsIgnoreCase(attributeName)) {
this.setBpStart((Long)value);
return;
}
if("bpEnd".equalsIgnoreCase(attributeName)) {
this.setBpEnd((Long)value);
return;
}
if("Seq".equalsIgnoreCase(attributeName)) {
this.setSeq((String)value);
return;
}
if("Symbol".equalsIgnoreCase(attributeName)) {
this.setSymbol((String)value);
return;
}
if("Mismatch".equalsIgnoreCase(attributeName)) {
this.setMismatch((Boolean)value);
return;
}
if("ProbeSet".equalsIgnoreCase(attributeName)) {
org.molgenis.omx.xgap.ProbeSet e = new org.molgenis.omx.xgap.ProbeSet();
e.set((Entity)value);
this.setProbeSet(e);
return;
}
if("ReportsFor".equalsIgnoreCase(attributeName)) {
org.molgenis.omx.xgap.Gene e = new org.molgenis.omx.xgap.Gene();
e.set((Entity)value);
this.setReportsFor(e);
return;
}
if("x".equalsIgnoreCase(attributeName)) {
this.setX((Integer)value);
return;
}
if("y".equalsIgnoreCase(attributeName)) {
this.setY((Integer)value);
return;
}
if("GridX".equalsIgnoreCase(attributeName)) {
this.setGridX((Integer)value);
return;
}
if("GridY".equalsIgnoreCase(attributeName)) {
this.setGridY((Integer)value);
return;
}
}
@Override
public boolean equals(Object obj)
{
if (this == obj) return true;
if (obj == null) return false;
if (!super.equals(obj)) return false;
if (getClass() != obj.getClass()) return false;
Spot other = (Spot) obj;
if (x == null)
{
if (other.x != null) return false;
}
else if (!x.equals(other.x)) return false;
if (y == null)
{
if (other.y != null) return false;
}
else if (!y.equals(other.y)) return false;
if (gridX == null)
{
if (other.gridX != null) return false;
}
else if (!gridX.equals(other.gridX)) return false;
if (gridY == null)
{
if (other.gridY != null) return false;
}
else if (!gridY.equals(other.gridY)) return false;
return true;
}
@Override
public int hashCode()
{
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((x == null) ? 0 : x.hashCode());
result = prime * result + ((y == null) ? 0 : y.hashCode());
result = prime * result + ((gridX == null) ? 0 : gridX.hashCode());
result = prime * result + ((gridY == null) ? 0 : gridY.hashCode());
return result;
}
@Override
public org.molgenis.data.EntityMetaData getEntityMetaData()
{
return new SpotMetaData();
}
}