jet.datasource
Interface JRHierarchicalDatasetMetaData


public interface JRHierarchicalDatasetMetaData

A JRHierarchicalDatasetMetaData provides meta data for JRHierarchicalDataset. JRHierarchicalDatasetMetaData class is developed by users of JReport, and it will work together with JRHierarchicalDataset.


Field Summary
static java.lang.String PATH_DELIMITER
          The delimiter is used in the full path of the tree node, so the node name can not inculde it.
 
Method Summary
 java.lang.String[] getBranchNames(java.lang.String parentName)
          Returns all branch names for the specified parent node.
 int getLeafCount(java.lang.String parentName)
          Returns the number of the leaves of the specified branch node.
 java.lang.String[] getLeafNames(java.lang.String parentName)
          Returns all leaf node names under the branch node which is specified by the parentName.
 int getLeafType(java.lang.String parentName, java.lang.String leafName)
          Returns the data type of the leaf.
 java.lang.String getParentName(java.lang.String name)
          Returns the full name of the parent.
 int getPrecision(java.lang.String parentName, java.lang.String leafName)
          Returns the precision of the leaf.
 java.lang.String getRoot()
          Returns root node names.
 int getScale(java.lang.String parentName, java.lang.String leafName)
          Returns the scale of the leaf.
 boolean isArray(java.lang.String parentName, java.lang.String leafName)
          If the leaf is multiple values, then return true.
 boolean isCurrency(java.lang.String parentName, java.lang.String leafName)
          Returns the currency state of the leaf.
 int isNullable(java.lang.String parentName, java.lang.String leafName)
          Returns the nullable state of the leaf.
 

Field Detail

PATH_DELIMITER

static final java.lang.String PATH_DELIMITER
The delimiter is used in the full path of the tree node, so the node name can not inculde it.

See Also:
Constant Field Values
Method Detail

getRoot

java.lang.String getRoot()
Returns root node names.


getParentName

java.lang.String getParentName(java.lang.String name)
Returns the full name of the parent.

Parameters:
name - is the full name of the node.
Returns:
Return null if no parent node.

getLeafNames

java.lang.String[] getLeafNames(java.lang.String parentName)
Returns all leaf node names under the branch node which is specified by the parentName.

Parameters:
parentName - is the full name of the branch node.
Returns:
Return null if no leaf node in the specified branch node.

getLeafCount

int getLeafCount(java.lang.String parentName)
Returns the number of the leaves of the specified branch node.

Parameters:
parentName - is the full name of the branch node.

getBranchNames

java.lang.String[] getBranchNames(java.lang.String parentName)
Returns all branch names for the specified parent node.

Parameters:
parentName - is the full name of the node.
Returns:
If there are not branch nodes in this parent node, then return null.

getLeafType

int getLeafType(java.lang.String parentName,
                java.lang.String leafName)
Returns the data type of the leaf. Leaf type should be java.sql.Types. public static final int ARRAY 2003 public static final int BIGINT -5 public static final int BINARY -2 public static final int BIT -7 public static final int BLOB 2004 public static final int BOOLEAN 16 public static final int CHAR 1 public static final int CLOB 2005 public static final int DATALINK 70 public static final int DATE 91 public static final int DECIMAL 3 public static final int DISTINCT 2001 public static final int DOUBLE 8 public static final int FLOAT 6 public static final int INTEGER 4 public static final int JAVA_OBJECT 2000 public static final int LONGVARBINARY -4 public static final int LONGVARCHAR -1 public static final int NULL 0 public static final int NUMERIC 2 public static final int OTHER 1111 public static final int REAL 7 public static final int REF 2006 public static final int SMALLINT 5 public static final int STRUCT 2002 public static final int TIME 92 public static final int TIMESTAMP 93 public static final int TINYINT -6 public static final int VARBINARY -3 public static final int VARCHAR 12

Parameters:
parentName - is the full name of the node.
leafName - is the real name of the node.

getPrecision

int getPrecision(java.lang.String parentName,
                 java.lang.String leafName)
Returns the precision of the leaf.

Parameters:
parentName - is the full name of the node.
leafName - is the real name of the node.

getScale

int getScale(java.lang.String parentName,
             java.lang.String leafName)
Returns the scale of the leaf.

Parameters:
parentName - is the full name of the node.
leafName - is the real name of the node.

isNullable

int isNullable(java.lang.String parentName,
               java.lang.String leafName)
Returns the nullable state of the leaf.

Parameters:
parentName - is the full name of the node.
leafName - is the real name of the node.

isCurrency

boolean isCurrency(java.lang.String parentName,
                   java.lang.String leafName)
Returns the currency state of the leaf.

Parameters:
parentName - is the full name of the node.
leafName - is the real name of the node.

isArray

boolean isArray(java.lang.String parentName,
                java.lang.String leafName)
If the leaf is multiple values, then return true. Otherwise, returns false.

Parameters:
parentName - is the full name of the node.
leafName - is the real name of the node.