Class Schema

java.lang.Object
com.streambase.sb.Schema
All Implemented Interfaces:
Serializable, Iterable<Schema.Field>

public class Schema extends Object implements Serializable, Iterable<Schema.Field>
Represents a StreamBase schema as a list of Schema.Fields, and should be used to create Tuple objects. Schemas are immutable: once constructed they may not be changed.

API warning: all constructors that take a String name are to be provided only with a null name when used by clients, custom operators and adapters. Use of non-null schema names in these contexts may yield unpredictable behavior during Studio authoring and typechecking when a Named Schema exists with the same name.

Future versions of StreamBase may deprecate the name argument.

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.

Since:
7.1 Schemas are allowed to have no fields. Schemas are Iterable to access its (top-level only) fields., 7.2 Schemas within the server can be derived from other schemas. Schemas are considered equal if their fields, in order, are equal and their names are equal.
See Also: