All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.xmldbms.maps.OrderInfo

java.lang.Object
   |
   +----org.xmlmiddleware.xmldbms.maps.MapBase
           |
           +----org.xmlmiddleware.xmldbms.maps.OrderInfo

public class OrderInfo
extends MapBase
Contains information about ordering child elements, PCDATA, or multiple attribute values; not for general use.

Order occurs in two places in an XML document: the order of child elements and PCDATA in a parent element, and the order of values in multi-valued attributes (IDREFS, NMTOKENS, and ENTITIES).

There are three possible ways to order a given item:

OrderInfo objects are stored in PropertyMaps, RelatedClassMaps, InlineClassMaps, RelatedTableMaps, and ElementInsertionMaps.

Version:
2.0
Author:
Ronald Bourret, 1998-1999, 2001

Variable Index

 o UNORDERED
Special value used to indicate that child is unordered.

Method Index

 o create()
Create a new OrderInfo object.
 o generateOrder()
Get whether the order column value is generated.
 o getFixedOrderValue()
Get the fixed order value.
 o getOrderColumn()
Get the order column.
 o isAscending()
Get whether the order is ascending.
 o orderValueIsFixed()
Whether a fixed order value or an order column is used.
 o setFixedOrderValue(long)
Set the fixed order value.
 o setGenerateOrder(boolean)
Set whether to generate the order column value.
 o setIsAscending(boolean)
Set whether the order is ascending.
 o setOrderColumn(Column)
Set the order column.

Variables

 o UNORDERED
 public static final long UNORDERED
Special value used to indicate that child is unordered.

Methods

 o create
 public static OrderInfo create()
Create a new OrderInfo object.

Returns:
The OrderInfo object.
 o isAscending
 public final boolean isAscending()
Get whether the order is ascending.

Returns:
Whether the order is ascending.
 o setIsAscending
 public void setIsAscending(boolean ascending)
Set whether the order is ascending.

Parameters:
ascending - Whether the order is ascending.
 o orderValueIsFixed
 public final boolean orderValueIsFixed()
Whether a fixed order value or an order column is used.

Returns:
Whether a fixed order value is used.
 o getFixedOrderValue
 public final long getFixedOrderValue()
Get the fixed order value.

This method should be called only if a fixed order value is used -- that is, if orderValueIsFixed() returns true. If orderValueIsFixed() returns false, the returned value is undefined.

Returns:
The fixed order value. This is 0 by default.
 o setFixedOrderValue
 public void setFixedOrderValue(long orderValue)
Set the fixed order value.

This method sets the order column to null and whether to generate order to false.

Parameters:
orderValue - The fixed order value.
 o getOrderColumn
 public final Column getOrderColumn()
Get the order column.

This method should be called only if an order column is used -- that is, if orderValueIsFixed() returns false. If orderValueIsFixed() returns true, the returned value is undefined.

Returns:
The order column.
 o setOrderColumn
 public void setOrderColumn(Column orderColumn)
Set the order column.

This method sets the fixed order value to 0.

Parameters:
orderColumn - The order column.
 o generateOrder
 public boolean generateOrder()
Get whether the order column value is generated.

This method should be called only if an order column is used -- that is, if orderValueIsFixed() returns false. If orderValueIsFixed() returns true, the returned value is undefined.

Returns:
Whether the order column value is generated.
 o setGenerateOrder
 public void setGenerateOrder(boolean generateOrder)
Set whether to generate the order column value.

This method can be called only if an order column is used -- that is, if orderValueIsFixed() returns false.

Parameters:
generateOrder - Whether to generate the order column value. If the order value is not generated, the order column must also be mapped as a data column with a PropertyMap or ColumnMap.

All Packages  Class Hierarchy  This Package  Previous  Next  Index