Oracle Data-aware Controls Reference

oracle.dacf.dataset
Class ColumnInfo

java.lang.Object
  extended byoracle.dacf.dataset.DacObject
      extended byoracle.dacf.dataset.ProducerObject
          extended byoracle.dacf.dataset.InfoObject
              extended byoracle.dacf.dataset.ColumnInfo
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
AttributeInfo, CalculatedAttributeInfo, LOVAttributeInfo

public class ColumnInfo
extends InfoObject

Contains all of the Dac column-specific properties, validators, formatter, format string, column alignment values, and so on. Also contains the data to map between the ImmediateAccess DataItem and the attribute in the server-side Java Business Objects RowSet.

All InfoObjects contain metadata regarding the ImmediateAccess DataItems and the RowSet Access DataItems that goes across to the consumer. Validation listeners and navigation listeners are present, so if the DataItem needs to be validated, instead of propagating the validator among all the DataItems, the DataItems reference the InfoObject and cause the appropriate piece of code to be executed.

Version:
SDK: since JDeveloper 2.0

Field Summary
static int DEFAULT
          The alignment for this column: DEFAULT is defined as LEFT for text and dates, and RIGHT for numbers.
protected static java.lang.String ERR_PROD_CODE
           
protected static int UPDATEABLE_IF_NEW
          This data can be updated if it has not been committed to the database.
 
Fields inherited from class oracle.dacf.dataset.InfoObject
_updateMode, LEVEL_APPLICATION, LEVEL_ATTRIBUTE, LEVEL_COLUMN, LEVEL_QUERY_VIEW, LEVEL_ROOT, LEVEL_ROW, LEVEL_ROWSET, LEVEL_SESSION, PROPERTIES_COLUMN_NAME, UPDATEABLE_FALSE, UPDATEABLE_MAX_VAL, UPDATEABLE_TRUE, UPDATEABLE_UNDEFINED
 
Fields inherited from class oracle.dacf.dataset.ProducerObject
_openLock
 
Fields inherited from class oracle.dacf.dataset.DacObject
EMPTY_PREFIX, INITIAL_CAPACITY, ITEMNAME_DELIMITER
 
Constructor Summary
  ColumnInfo()
          Default constructor.
  ColumnInfo(int sqlType)
          Constructor requiring the column to be identified by its SQL type according to java.sql.Types.
protected ColumnInfo(java.lang.String colName)
          Constructor requiring the column to be identified by its name.
 
Method Summary
 java.lang.Object clone()
          Clones the DacObject.
protected  void closeCheck()
          Checks to see if close is permitted.
protected  void closeChildren()
          A subclass specific method for disconnecting the child objects from their server objects counterparts.
protected  void closeDataItems()
          Disconnects the ImmediateAccess from the server-side objects Internal to the framework; should never be called by client classes
protected  void closeProducerObject()
          A subclass specific method for disconnecting the client object from the appropriate server objects.
protected  void createPropertyColumn()
          Creates the property column for this ColumnView.
protected  oracle.jbo.AttributeDef getAttributeDef()
          Returns the AttributeRef associated with this ColumnInfo's parent.
 int getColumnAlignment()
          Returns column horizontal alignment used for display.
 int getColumnIndex()
          Returns the index of the column within the underlying rowset.
 java.lang.String getColumnName()
          Returns the column name that can be used in a dynamic WHERE clause.
 int getColumnWidth()
          Returns the column width used for display.
protected  javax.infobus.DataItem getDataItem()
          Returns a ImmediateAccess DataItem for this column reference.
 boolean getDisplayable()
          Returns the value of the displayable property A column has two properties pertaining to its display state: Displayable: whether or not it can be displayed Displayed: whether or not it is displayed.
 boolean getDisplayed()
          Returns the value of the displayed property A column has two properties pertaining to its display state: Displayable: whether or not it can be displayed Displayed: whether or not it is displayed.
 java.lang.String getFormatString()
          Gets the format string currently in use.
 Formatter getFormatter()
          Gets the Formatter currently in use.
 FormatterInfo getFormatterInfo()
          Returns the information necessary for formatting the Attribute value.
 javax.infobus.ImmediateAccess getImmediateAccess()
          Returns the ImmediateAccess interface published by this ColumnInfo.
 java.lang.String getLabel()
          Gets the label to use as the column title or prompt.
 java.lang.String getName()
          Returns the name of the DacObject.
 int getSQLType()
          Gets the java.sql.Types of this attribute.
 boolean isDirty()
          Determines whether the value of the object is changed and needs to be validated.
 boolean isNullAllowed()
          Returns true if this attribute accepts null values.
 boolean isPrimaryKey()
          Returns true if this attribute is a or part of a primary key.
 boolean isSortingEnabled()
          Returns whether sorting is enabled for this column.
 boolean isUpdateable()
          Returns true if this attribute is updateable.
 boolean isUpdateableIfNew()
          Returns true if this attribute is updateable only when the current row is a new row.
 boolean isValid()
          Indicates whether the value currently referenced by the ColumnView is valid.
protected  void openChildren()
          A subclass specific method for connecting the child objects to their server counterparts.
protected  void openDataItems()
          A subclass specific method for connecting the Dataitems Internal to the framework; should never be called by client classes
protected  void openProducerObject()
          Connect to the server-side column objects.
 void setColumnAlignment(int alignment)
          Specifies the column horizontal alignment.
 void setColumnName(java.lang.String columnName)
          Deprecated. the column name is retrieved when the ColumnInfo is opened.
 void setColumnWidth(int width)
          Specifies the column width for display.
protected  void setDirty(boolean dirty)
          Set the dirty state of the ColumnInfo.
 void setDisplayable(boolean displayable)
          Sets the value of the displayable property A column has two properties pertaining to its display state: Displayable: whether or not it can be displayed Displayed: whether or not it is displayed.
 void setDisplayed(boolean displayed)
          Sets the value of the displayed property A column has two properties pertaining to its display state: Displayable: whether or not it can be displayed Displayed: whether or not it is displayed.
 void setFormatString(java.lang.String formatString)
          Sets the formatter string to be used for formatting.
 void setFormatter(Formatter formatterToUse)
          Sets the Formatter to be used.
 void setFormatterInfo(FormatterInfo formatterInfo)
          Sets info necessary for formatting the Attribute value.
 void setLabel(java.lang.String label)
          Sets the label to use as a column title or prompt.
 void setName(java.lang.String st)
          Sets the InfoBus bind name of the object.
 void setSortingEnabled(boolean sortingEnabled)
          Enable/Disable sorting for this column.
 void setUpdateableIfNew(boolean b)
          Determines whether this attribute is updateable only when the current row is a new row.
protected  void setValid(boolean valid)
          Sets the validation state of the value current referenced by the ColumnView.
protected  void setViewObject(oracle.jbo.ViewObject vo)
           
 
Methods inherited from class oracle.dacf.dataset.InfoObject
addChangeListener, addValidationListener, areParentsValid, clearDirty, createChild, fireValidationEvent, forceValid, getChangeListeners, getLocale, getUpdateMode, getValidationListeners, internalValidation, isActive, processValidationEvent, removeChangeListener, removeValidationListener, setActive, setLocale, setUpdateable, toString, validate, validate, validate
 
Methods inherited from class oracle.dacf.dataset.ProducerObject
addChild, addClonedDataItem, close, findDataItem, findProducerObject, findProducerObject, getClonedDataItems, getDataItemImpl, getDataProducer, getDataSourceName, getFullName, isAClonedDataItem, isOpen, open, publishDataItem, publishDataItem, removeChild, removeClonedDataItem, revokeDataItem, setClonedDataItems, setDataItem, setDataSourceName, setOpen
 
Methods inherited from class oracle.dacf.dataset.DacObject
addChild, findDescendant, genCloneName, getChild, getChildIndex, getChildren, getNumOfChildren, getParent, getPrefix, insertChildAt, removeChild, removeChildren, setChildren, setParent, setPrefix
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT

public static final int DEFAULT
The alignment for this column: DEFAULT is defined as LEFT for text and dates, and RIGHT for numbers.

See Also:
Constant Field Values

UPDATEABLE_IF_NEW

protected static final int UPDATEABLE_IF_NEW
This data can be updated if it has not been committed to the database.

See Also:
Constant Field Values

ERR_PROD_CODE

protected static final java.lang.String ERR_PROD_CODE
Constructor Detail

ColumnInfo

public ColumnInfo()
Default constructor.


ColumnInfo

public ColumnInfo(int sqlType)
Constructor requiring the column to be identified by its SQL type according to java.sql.Types.


ColumnInfo

protected ColumnInfo(java.lang.String colName)
Constructor requiring the column to be identified by its name.

Parameters:
colName - the column name.
Method Detail

setName

public void setName(java.lang.String st)
Description copied from class: ProducerObject
Sets the InfoBus bind name of the object.

Overrides:
setName in class ProducerObject
Parameters:
st - the InfoBus bind name.

getName

public java.lang.String getName()
Description copied from class: DacObject
Returns the name of the DacObject.

Overrides:
getName in class DacObject
Returns:
the name of the DacObject.

clone

public java.lang.Object clone()
Description copied from class: ProducerObject
Clones the DacObject.

The returned clone will not be open. The clone must be opened via open() prior to use.

Overrides:
clone in class InfoObject

setDisplayable

public void setDisplayable(boolean displayable)
Sets the value of the displayable property A column has two properties pertaining to its display state:

Parameters:
displayable - true indicates that the column can be displayed
See Also:
getDisplayed(), setDisplayed(boolean), getDisplayable()

getDisplayable

public boolean getDisplayable()
Returns the value of the displayable property A column has two properties pertaining to its display state:

Returns:
true if the column is displayable
See Also:
getDisplayed(), setDisplayed(boolean), setDisplayable(boolean)

setDisplayed

public void setDisplayed(boolean displayed)
Sets the value of the displayed property A column has two properties pertaining to its display state:

Returns:
true if the column is displayed
See Also:
getDisplayable(), setDisplayable(boolean), getDisplayed()

getDisplayed

public boolean getDisplayed()
Returns the value of the displayed property A column has two properties pertaining to its display state:

Returns:
true if the column is displayed
See Also:
getDisplayable(), setDisplayable(boolean), setDisplayed(boolean)

setColumnName

public void setColumnName(java.lang.String columnName)
Deprecated. the column name is retrieved when the ColumnInfo is opened.

Sets the column name that can be used in a dynamic WHERE clause.

Parameters:
columnName - the SQL column name.

getColumnName

public java.lang.String getColumnName()
Returns the column name that can be used in a dynamic WHERE clause.

The following query :

  SELECT DeptXX.DEPTNO AS DEPTNOXX,
         DeptXX.DNAME AS DNAMEXX,
         DeptXX.LOC AS LOCXX
  FROM   DEPT DeptXX
  
will return the full columnName (e.g. DeptXX.DeptNo) for a non-expert mode query. It will return the Attribute's alias name for an expert mode query (e.g. DEPTNOXX). The BC4J alias name for the attribute, has to match the alias name in the query.

This method should be used, when creating dynamic where and order by clauses via ResultSetInfo.setQueryCondition() and ResultSetInfo.setQueryOrderbyClause().

Returns:
the SQL column name.
See Also:
ResultSetInfo.setQueryCondition(String cond), ResultSetInfo.setQueryOrderbyClause(String orderBy)

getColumnIndex

public int getColumnIndex()
Returns the index of the column within the underlying rowset.

This method should not be called until after the RowSet has been opened. If it is called before the rowset has been opened, it will return -1.

Returns:
the index of the column within the underlying rowset; -1 if the underlying rowset has not been opened yet.

isDirty

public boolean isDirty()
Determines whether the value of the object is changed and needs to be validated. The value has not yet been saved back to the server.

Overrides:
isDirty in class InfoObject
Returns:
true if the current data value has been changed and needs validation.
See Also:
InfoObject.setDirty(boolean)

getImmediateAccess

public javax.infobus.ImmediateAccess getImmediateAccess()
Returns the ImmediateAccess interface published by this ColumnInfo.

Returns:
an implementation of the ImmediateAccess interface.

setFormatter

public void setFormatter(Formatter formatterToUse)
Sets the Formatter to be used.

Parameters:
formatterToUse - a formatter object.

getFormatter

public Formatter getFormatter()
Gets the Formatter currently in use.

Returns:
formatter object currently in use.

setFormatString

public void setFormatString(java.lang.String formatString)
Sets the formatter string to be used for formatting.

Parameters:
formatString - format string to use.

getFormatString

public java.lang.String getFormatString()
Gets the format string currently in use.

Returns:
format string currently in use.

setFormatterInfo

public void setFormatterInfo(FormatterInfo formatterInfo)
Sets info necessary for formatting the Attribute value.

Bean Property editors use this method to set Formatter and the Format string.


getFormatterInfo

public FormatterInfo getFormatterInfo()
Returns the information necessary for formatting the Attribute value.

Bean property editors use this method to edit the Formatter property.


setLabel

public void setLabel(java.lang.String label)
Sets the label to use as a column title or prompt.

Parameters:
label - the column label to use.

getLabel

public java.lang.String getLabel()
Gets the label to use as the column title or prompt.

Returns:
the column label.

setColumnWidth

public void setColumnWidth(int width)
Specifies the column width for display.

Parameters:
width - the column width.

getColumnWidth

public int getColumnWidth()
Returns the column width used for display.

Returns:
the column width.

setColumnAlignment

public void setColumnAlignment(int alignment)
Specifies the column horizontal alignment.

Parameters:
alignment - DEFAULT is the default, which will use LEFT for text and dates, and RIGHT for numbers. Can also be one of the following constants defined in SwingConstants:
  • LEFT (the default for text and dates)
  • CENTER, RIGHT (the default for numbers)
  • LEADING or TRAILING

getColumnAlignment

public int getColumnAlignment()
Returns column horizontal alignment used for display.

Returns:
the column alignment.

getSQLType

public int getSQLType()
Gets the java.sql.Types of this attribute.

Returns:
the data type of the attribute.
See Also:
Types

isUpdateable

public boolean isUpdateable()
Returns true if this attribute is updateable.

Overrides:
isUpdateable in class InfoObject
Returns:
true if this is an editable attribute.
See Also:
InfoObject.setUpdateable(boolean), #getUpdateable()

setUpdateableIfNew

public void setUpdateableIfNew(boolean b)
Determines whether this attribute is updateable only when the current row is a new row. A new row is a row that does not exist in the database.

Parameters:
b - true if this is attribute can only be edited when the row is new.

isUpdateableIfNew

public boolean isUpdateableIfNew()
Returns true if this attribute is updateable only when the current row is a new row. A new row is a row that does not exist in the database.

Returns:
true if this is attribute can be edited only when the row is new.

setSortingEnabled

public void setSortingEnabled(boolean sortingEnabled)
Enable/Disable sorting for this column. This flag will be ignored if the underlying SQL type for this column does not support sorting.

Parameters:
sortingEnabled - allows the sorting on this column.

isSortingEnabled

public boolean isSortingEnabled()
Returns whether sorting is enabled for this column.

If true, this column to be sorted.

Returns:
true if the sorting on the column is allowed.
See Also:
setSortingEnabled(boolean sortingEnabled)

isPrimaryKey

public boolean isPrimaryKey()
Returns true if this attribute is a or part of a primary key.

Returns:
true if this is a primary key attribute.

isNullAllowed

public boolean isNullAllowed()
Returns true if this attribute accepts null values.

Returns:
true if this attribute accepts null values

isValid

public boolean isValid()
Indicates whether the value currently referenced by the ColumnView is valid. Overrides the implementation in InfoObject.

Overrides:
isValid in class InfoObject
Returns:
true if the value is valid.
See Also:
InfoObject

setValid

protected void setValid(boolean valid)
Sets the validation state of the value current referenced by the ColumnView. Extends the implementation in InfoObject.

Overrides:
setValid in class InfoObject
Parameters:
valid - true if the value is valid.
See Also:
InfoObject

setViewObject

protected void setViewObject(oracle.jbo.ViewObject vo)

setDirty

protected void setDirty(boolean dirty)
Set the dirty state of the ColumnInfo.

A ColumnInfo is dirty if is value has been changed and that value has not been saved to the server.

Overrides:
setDirty in class InfoObject
Parameters:
dirty - true indicates that the data value should be considered dirty and needs to be saved to the server.
See Also:
InfoObject.isDirty()

openProducerObject

protected void openProducerObject()
Connect to the server-side column objects. Internal to the framework; should never be called by client classes

Specified by:
openProducerObject in class ProducerObject

openChildren

protected void openChildren()
A subclass specific method for connecting the child objects to their server counterparts. Internal to the framework; should never be called by client classes

Specified by:
openChildren in class ProducerObject

openDataItems

protected void openDataItems()
A subclass specific method for connecting the Dataitems Internal to the framework; should never be called by client classes

Specified by:
openDataItems in class ProducerObject

closeCheck

protected void closeCheck()
Checks to see if close is permitted.

Internal to the framework; should never be called by client classes

Specified by:
closeCheck in class ProducerObject
Throws:
DataSourceOperationException - Occurs when closing isn't allowed.

closeProducerObject

protected void closeProducerObject()
A subclass specific method for disconnecting the client object from the appropriate server objects. Internal to the framework; should never be called by client classes

Specified by:
closeProducerObject in class ProducerObject

closeChildren

protected void closeChildren()
A subclass specific method for disconnecting the child objects from their server objects counterparts. Internal to the framework; should never be called by client classes

Specified by:
closeChildren in class ProducerObject

closeDataItems

protected void closeDataItems()
Disconnects the ImmediateAccess from the server-side objects Internal to the framework; should never be called by client classes

Specified by:
closeDataItems in class ProducerObject

createPropertyColumn

protected void createPropertyColumn()
Creates the property column for this ColumnView.

This method must be called after the column is opened. Furthermore, it is recommended the property columns for the individual columns not be called until after all the columns in a RowSet have been opened.


getDataItem

protected javax.infobus.DataItem getDataItem()
Returns a ImmediateAccess DataItem for this column reference.

Overrides:
getDataItem in class ProducerObject
Returns:
an ImmediateAccess DataItem.

getAttributeDef

protected oracle.jbo.AttributeDef getAttributeDef()
Returns the AttributeRef associated with this ColumnInfo's parent.

Returns:
the AttributeRef.

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.