public class SchemaImpl extends DBObjectImpl implements Schema
Schema.| Modifier | Constructor and Description |
|---|---|
protected |
SchemaImpl(boolean updatable,
String name,
Collection<AttributeDefinition<?>> attributeDefs,
Collection<SeriesDefinition> seriesDefinitions,
Surrogate surrogate,
List<Surrogate> dependencyList)
Construct a
Schema. |
|
SchemaImpl(String name,
Collection<AttributeDefinition<?>> attributeDefs,
Collection<SeriesDefinition> seriesDefinitions,
Surrogate surrogate,
List<Surrogate> dependencyList)
Construct a
Schema. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
dependsOnSchema(Schema schema)
Return true if the schema depends on the schema specified.
|
UpdatableSchema |
edit()
Return an
UpdatableSchema corresponding to this schema. |
AttributeDefinition<?> |
getAttributeDefinition(int number,
boolean mustExist)
Return the attribute definition with the given attribute number.
|
AttributeDefinition<?> |
getAttributeDefinition(String name,
boolean mustExist)
Return the attribute definition with the given attribute name.
|
Collection<AttributeDefinition<?>> |
getAttributeDefinitions()
Return the collection of all attribute definitions.
|
protected SchemaComponents<AttributeDefinition<?>> |
getAttributeDefinitionsObject()
Return the object managing attribute definitions.
|
List<Surrogate> |
getDependencyList()
Return the list of schema surrogates which this schema extends.
|
String |
getName()
Return the name of the schema or series definition.
|
SeriesDefinition |
getSeriesDefinition(int number,
boolean mustExist)
Return the series definition with the given series number.
|
SeriesDefinition |
getSeriesDefinition(String name,
boolean mustExist)
Return the series definition with the given series name.
|
Collection<SeriesDefinition> |
getSeriesDefinitions()
Return all series definitions of this schema.
|
protected SchemaComponents<SeriesDefinition> |
getSeriesDefinitionsObject()
Return the object managing series definitions.
|
boolean |
isComplete()
Return true if the schema is complete.
|
String |
toString() |
protected void |
update()
Refresh state.
|
equals, getDatabase, getId, getSurrogate, hashCode, inConstruction, isValidclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDatabase, getId, getSurrogate, inConstruction, isValidpublic SchemaImpl(String name, Collection<AttributeDefinition<?>> attributeDefs, Collection<SeriesDefinition> seriesDefinitions, Surrogate surrogate, List<Surrogate> dependencyList) throws T2DBException
Schema.name - a stringattributeDefs - a collection of attribute definitionsseriesDefinitions - a collection of series definitionssurrogate - a surrogatedependencyList - a list of surrogatesT2DBException - if there is a duplicate attribute or series nameprotected SchemaImpl(boolean updatable,
String name,
Collection<AttributeDefinition<?>> attributeDefs,
Collection<SeriesDefinition> seriesDefinitions,
Surrogate surrogate,
List<Surrogate> dependencyList)
throws T2DBException
Schema.updatable - set to true when invoked by an UpdatableSchemaImpl constructor, set to
false when invoked by a SchemaImpl constructorname - a stringattributeDefs - a collection of attribute definitionsseriesDefinitions - a collection of series definitionssurrogate - a surrogatedependencyList - a list of surrogatesT2DBException - if there is a duplicate attribute or series nameprotected void update()
throws T2DBException
T2DBExceptionpublic boolean isComplete()
SchemaSchemaComponent.isComplete().isComplete in interface Schemapublic UpdatableSchema edit()
SchemaUpdatableSchema corresponding to this schema.
Successfully getting an Updatable object does not imply
that any update can be successfully applied.public String getName()
IncompleteSchemagetName in interface IncompleteSchemapublic Collection<SeriesDefinition> getSeriesDefinitions()
SchemagetSeriesDefinitions in interface Schemapublic SeriesDefinition getSeriesDefinition(String name, boolean mustExist) throws T2DBException
SchemamustExist parameter.getSeriesDefinition in interface Schemaname - the series definedmustExist - if true throw an exception instead of returning nullT2DBExceptionpublic SeriesDefinition getSeriesDefinition(int number, boolean mustExist) throws T2DBException
SchemamustExist parameter.getSeriesDefinition in interface Schemanumber - the series definedmustExist - if true throw an exception instead of returning nullT2DBExceptionpublic Collection<AttributeDefinition<?>> getAttributeDefinitions()
IncompleteSchemagetAttributeDefinitions in interface IncompleteSchemapublic AttributeDefinition<?> getAttributeDefinition(String name, boolean mustExist) throws T2DBException
IncompleteSchemamustExist parameter determines behavior when nothing is
found: exception or null result.getAttributeDefinition in interface IncompleteSchemaname - the name of the attributemustExist - if true throw an exception instead of returning nullT2DBExceptionpublic AttributeDefinition<?> getAttributeDefinition(int number, boolean mustExist) throws T2DBException
IncompleteSchemamustExist parameter determines behavior when nothing is
found: exception or null result.getAttributeDefinition in interface IncompleteSchemanumber - the number of the attributemustExist - if true throw an exception instead of returning nullT2DBExceptionprotected SchemaComponents<AttributeDefinition<?>> getAttributeDefinitionsObject()
protected SchemaComponents<SeriesDefinition> getSeriesDefinitionsObject()
public List<Surrogate> getDependencyList()
public boolean dependsOnSchema(Schema schema)
SchemadependsOnSchema in interface Schemaschema - a schemaCopyright © 2017. All rights reserved.