Package org.intermine.api.results
Class Column
- java.lang.Object
-
- org.intermine.api.results.Column
-
public class Column extends java.lang.Object
Configuration information for a column in a table- Author:
- Andrew Varley
-
-
Constructor Summary
Constructors Constructor Description Column(java.lang.String name, int index, java.lang.Class type)
Constructor that takes a String name.Column(Path path, int index, java.lang.Class type)
Constructor that takes a Path object.Column(Path path, java.lang.String name, int index, java.lang.Class type)
Constructor that takes a Path object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
java.lang.String
getColumnId()
java.lang.String
getColumnIdentifier()
Used in the view to match this elementint
getIndex()
Gets the value of indexjava.lang.String
getName()
Get the name (title) of the column.Path
getPath()
Get the Path set by setPath().java.lang.Class
getType()
Return the type of this Columnjava.lang.String
getTypeClsString()
Get the column type unqualified as a Stringint
hashCode()
boolean
isSelectable()
Gets the value of selectableboolean
isVisible()
Gets the value of visiblevoid
setColumnId(java.lang.String columnId)
void
setIndex(int index)
Sets the value of indexvoid
setSelectable(boolean selectable)
Sets the value of selectablevoid
setVisible(boolean visible)
Sets the value of visiblejava.lang.String
toString()
-
-
-
Constructor Detail
-
Column
public Column(Path path, java.lang.String name, int index, java.lang.Class type)
Constructor that takes a Path object.- Parameters:
path
- a Path objectname
- an optional, more human readable description of the Column that will be returned by getName() - can be null in which case the column name (given by path.toStringNoConstraints()) will be usedindex
- the number of the columntype
- the type of the column (ClassDescriptor or Class)
-
Column
public Column(Path path, int index, java.lang.Class type)
Constructor that takes a Path object. The human readable name for getName() will be generated from the path.- Parameters:
path
- a Path objectindex
- the number of the columntype
- the type of the column (ClassDescriptor or Class)
-
Column
public Column(java.lang.String name, int index, java.lang.Class type)
Constructor that takes a String name.- Parameters:
name
- a column nameindex
- the number of the columntype
- the type of the column (ClassDescriptor or Class)
-
-
Method Detail
-
getColumnId
public java.lang.String getColumnId()
- Returns:
- the columnId
-
setColumnId
public void setColumnId(java.lang.String columnId)
- Parameters:
columnId
- the columnId to set
-
isSelectable
public boolean isSelectable()
Gets the value of selectable- Returns:
- a boolean
-
setSelectable
public void setSelectable(boolean selectable)
Sets the value of selectable- Parameters:
selectable
- value to assign to selectable
-
isVisible
public boolean isVisible()
Gets the value of visible- Returns:
- the value of visible
-
setVisible
public void setVisible(boolean visible)
Sets the value of visible- Parameters:
visible
- value to assign to visible
-
getIndex
public int getIndex()
Gets the value of index- Returns:
- the value of index
-
setIndex
public void setIndex(int index)
Sets the value of index- Parameters:
index
- value to assign to index
-
getType
public java.lang.Class getType()
Return the type of this Column- Returns:
- a Class or a FieldDescriptor
-
getColumnIdentifier
public java.lang.String getColumnIdentifier()
Used in the view to match this element- Returns:
- column identifier
-
getTypeClsString
public java.lang.String getTypeClsString()
Get the column type unqualified as a String- Returns:
- the column type
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getPath
public Path getPath()
Get the Path set by setPath().- Returns:
- the Path
-
getName
public java.lang.String getName()
Get the name (title) of the column.- Returns:
- the name
-
-