ca.sqlpower.wabit.report.chart
Class ChartColumn

java.lang.Object
  extended by ca.sqlpower.object.AbstractSPObject
      extended by ca.sqlpower.wabit.AbstractWabitObject
          extended by ca.sqlpower.wabit.report.chart.ChartColumn
All Implemented Interfaces:
ca.sqlpower.object.SPObject, WabitObject

public class ChartColumn
extends AbstractWabitObject

This class handles some of the generic methods to the ColumnIdentifier. This will not store the specific object that makes the column be uniquely identified.


Nested Class Summary
static class ChartColumn.DataType
          Enumeration of the data types a chart column can have.
 
Field Summary
 
Fields inherited from class ca.sqlpower.object.AbstractSPObject
uuid
 
Constructor Summary
ChartColumn(java.lang.String columnName, ChartColumn.DataType dataType)
          Creates a new chart column descriptor for the given name simplified SQL data type.
ChartColumn(java.lang.String columnName, int jdbcType)
          Creates a new chart column descriptor for the given name and JDBC data type.
 
Method Summary
 boolean allowsChildren()
           
 int childPositionOffset(java.lang.Class<? extends ca.sqlpower.object.SPObject> childType)
           
 boolean equals(java.lang.Object obj)
          Two identifiers for the same column name are considered equal.
 java.util.List<java.lang.Class<? extends ca.sqlpower.object.SPObject>> getAllowedChildTypes()
           
 java.util.List<? extends WabitObject> getChildren()
           
 java.lang.String getColumnName()
           
 ChartColumn.DataType getDataType()
           
 java.util.List<WabitObject> getDependencies()
           
 ColumnRole getRoleInChart()
           
 ChartColumn getXAxisIdentifier()
           
 int hashCode()
           
protected  boolean removeChildImpl(ca.sqlpower.object.SPObject child)
           
 void removeDependency(ca.sqlpower.object.SPObject dependency)
           
 void setRoleInChart(ColumnRole dataType)
           
 void setXAxisIdentifier(ChartColumn xAxisIdentifier)
           
 java.lang.String toString()
           
 
Methods inherited from class ca.sqlpower.wabit.AbstractWabitObject
cleanup, commit, generateNewUUID, getParent, getSession, isForegroundThread, removeChild, rollback, runInBackground, runInForeground
 
Methods inherited from class ca.sqlpower.object.AbstractSPObject
addChild, addChildImpl, addSPListener, begin, fireChildAdded, fireChildRemoved, firePropertyChange, firePropertyChange, firePropertyChange, fireTransactionEnded, fireTransactionRollback, fireTransactionStarted, getChildren, getName, getUUID, removeSPListener, setName, setParent, setUUID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ca.sqlpower.object.SPObject
addChild, addSPListener, begin, getChildren, getName, getUUID, removeSPListener, setName, setParent, setUUID
 

Constructor Detail

ChartColumn

public ChartColumn(@Nonnull
                   java.lang.String columnName,
                   int jdbcType)
Creates a new chart column descriptor for the given name and JDBC data type.

Parameters:
columnName - The column's name (generally case sensitive)
jdbcType - The java.sql.Types type code.

ChartColumn

public ChartColumn(@Nonnull
                   java.lang.String columnName,
                   @Nonnull
                   ChartColumn.DataType dataType)
Creates a new chart column descriptor for the given name simplified SQL data type.

Parameters:
columnName - The column's name (generally case sensitive)
jdbcType - The java.sql.Types type code.
Method Detail

getRoleInChart

public ColumnRole getRoleInChart()

setRoleInChart

public void setRoleInChart(ColumnRole dataType)

getXAxisIdentifier

public ChartColumn getXAxisIdentifier()

setXAxisIdentifier

public void setXAxisIdentifier(ChartColumn xAxisIdentifier)

getDataType

public ChartColumn.DataType getDataType()

allowsChildren

public boolean allowsChildren()

childPositionOffset

public int childPositionOffset(java.lang.Class<? extends ca.sqlpower.object.SPObject> childType)

getChildren

public java.util.List<? extends WabitObject> getChildren()

getDependencies

public java.util.List<WabitObject> getDependencies()

removeDependency

public void removeDependency(ca.sqlpower.object.SPObject dependency)

getColumnName

public java.lang.String getColumnName()

equals

public boolean equals(java.lang.Object obj)
Two identifiers for the same column name are considered equal.

Overrides:
equals in class AbstractWabitObject

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class AbstractWabitObject

removeChildImpl

protected boolean removeChildImpl(ca.sqlpower.object.SPObject child)
Specified by:
removeChildImpl in class ca.sqlpower.object.AbstractSPObject

getAllowedChildTypes

public java.util.List<java.lang.Class<? extends ca.sqlpower.object.SPObject>> getAllowedChildTypes()


Copyright © 2009. All Rights Reserved.