Class Schema.Field

java.lang.Object
com.streambase.sb.Schema.Field
All Implemented Interfaces:
Serializable
Enclosing class:
Schema

public static class Schema.Field extends Object implements Serializable
Information (name, type, and optionally size) about a field in a Schema.

A field can be looked up within a schema in three ways:

  1. By index: By the zero-based ordinal position of the field within the schema
  2. By simple name: By the name of the field itself (e.g., "myint")
  3. By path name: By a dot-separated list of names that define a path through a set of nested schemas that arise through the use of fields of type Tuple (e.g., "mynestedtuple.myint").

A Field object can be used to obtain the value of a field in a tuple. However, there are rules that must be obeyed in doing so. For example, one must obtain the Field object from a Schema object that describes the schema of the tuple (i.e., as opposed to directly from a Field constructor).

See the "client" StreamBase sample (streambase-install-dir/sample/client) for examples of proper use of Field objects.

Note: Serializations of instances of this class that are created (e.g., by using ObjectOutputStream) in one version of StreamBase in general will not be deserializable in any other version of StreamBase.

See Also: