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, isValid
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDatabase, getId, getSurrogate, inConstruction, isValid
public 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
T2DBException
public boolean isComplete()
Schema
SchemaComponent.isComplete()
.isComplete
in interface Schema
public UpdatableSchema edit()
Schema
UpdatableSchema
corresponding to this schema.
Successfully getting an Updatable
object does not imply
that any update can be successfully applied.public String getName()
IncompleteSchema
getName
in interface IncompleteSchema
public Collection<SeriesDefinition> getSeriesDefinitions()
Schema
getSeriesDefinitions
in interface Schema
public SeriesDefinition getSeriesDefinition(String name, boolean mustExist) throws T2DBException
Schema
mustExist
parameter.getSeriesDefinition
in interface Schema
name
- the series definedmustExist
- if true throw an exception instead of returning nullT2DBException
public SeriesDefinition getSeriesDefinition(int number, boolean mustExist) throws T2DBException
Schema
mustExist
parameter.getSeriesDefinition
in interface Schema
number
- the series definedmustExist
- if true throw an exception instead of returning nullT2DBException
public Collection<AttributeDefinition<?>> getAttributeDefinitions()
IncompleteSchema
getAttributeDefinitions
in interface IncompleteSchema
public AttributeDefinition<?> getAttributeDefinition(String name, boolean mustExist) throws T2DBException
IncompleteSchema
mustExist
parameter determines behavior when nothing is
found: exception or null result.getAttributeDefinition
in interface IncompleteSchema
name
- the name of the attributemustExist
- if true throw an exception instead of returning nullT2DBException
public AttributeDefinition<?> getAttributeDefinition(int number, boolean mustExist) throws T2DBException
IncompleteSchema
mustExist
parameter determines behavior when nothing is
found: exception or null result.getAttributeDefinition
in interface IncompleteSchema
number
- the number of the attributemustExist
- if true throw an exception instead of returning nullT2DBException
protected SchemaComponents<AttributeDefinition<?>> getAttributeDefinitionsObject()
protected SchemaComponents<SeriesDefinition> getSeriesDefinitionsObject()
public List<Surrogate> getDependencyList()
public boolean dependsOnSchema(Schema schema)
Schema
dependsOnSchema
in interface Schema
schema
- a schemaCopyright © 2017. All rights reserved.