The ResourceBase class is an abstract base class for all the specific resource types
and facilitates the model for the extending resources. Each resource is represented
by its type and a set of attributes, and each instance is identified by a unique long identifier
that is computed with a hash function from the resource type and the attributes.

The ResourceBase class contains the BEA-provided implementations of the
getKeys, getFields, getID, and toString methods.

The ResourceBase class contains an array of values for which the extending classes are
expected to provide a corresponding array of keys.
(See the getkeys methods in each extending class for more information).

toString

Each type of resource is first printed in angled brackets. Then, each key is printed,
in order, along with it's value. The keys are comma-separated. Values that are lists are
comma-separated and delineated by open and close curly braces. Each value is printed
as is, except that commas (,), open braces ({), close braces (}), and back slashes (\) are
each escaped with a backslash.

For more information about the toString formats for specific resource types,
see the descriptions in the extending classes.

Note: Because this method produces a result based on the concatenation of strings, it
may be expensive in terms of performance.

makeParent

Creates a ResourceBase object that represents the parent of the current
resource. If the resource does not have a parent, the value of
null must be returned.

Subclasses should override this method.

Returns:

the Resource object of the parent resource.

getID

public long getID()

Gets a 64-bit hashcode for a resource.

This method is a hash operation that is calculated and cached within the resource itself.
Note: This method is not guaranteed between service packs or future releases.
Therefore, you should not store getID values in your database.

getRepeatingFieldIndex

getRepeatingFieldIndex returns an index into the
array returned by getKeys() that signifies what part
of the Resource's fields repeat as the hierarchy is traversed.
For example, in the URLResource, the
httpMethod is repeated as the hierarchy is walked.
A value of -1 indicates that there are no repeating
fields.

Copyright 1996, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.