public class SeriesDefinitionImpl extends SchemaComponentImpl implements SeriesDefinition
SeriesDefinition.| Constructor and Description |
|---|
SeriesDefinitionImpl(int number,
String description,
Collection<AttributeDefinition<?>> attributeDefs)
Construct a
SeriesDefinition. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(SeriesDefinition o) |
SchemaComponent |
copy()
Return a copy.
|
void |
edit(SchemaComponent component)
Edit the component, taking the parameter as a template.
|
AttributeDefinition<?> |
getAttributeDefinition(int attrNr,
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 the series' attribute definitions.
|
Collection<AttributeDefinition<?>> |
getCustomAttributeDefinitions()
Return the collection of attribute definitions which are not built-in.
|
String |
getDescription()
Return the description of the series.
|
String |
getName()
Return the name of the component.
|
int |
getNumber()
Return the number of the component.
|
ch.agent.t2.time.TimeDomain |
getTimeDomain()
Return the time domain of the series.
|
ValueType<?> |
getValueType()
Return the value type of the series.
|
boolean |
isComplete()
Return true if the component is complete and can be used.
|
boolean |
isErasing()
Return true if the definition removes an inherited definition.
|
boolean |
isSparse()
Return true to force the series to use sparse time series.
|
void |
setContainer(SchemaComponentContainer container)
Set a container.
|
void |
setDescription(String description)
Set the description.
|
void |
setErasing(boolean erasing)
Set the erasing mode.
|
String |
toString() |
checkEdit, consolidate, edit, nameChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitconsolidate, editpublic SeriesDefinitionImpl(int number,
String description,
Collection<AttributeDefinition<?>> attributeDefs)
throws T2DBException
SeriesDefinition.number - a positive numberdescription - a stringattributeDefs - a collection of attribute definitionsT2DBExceptionpublic void setContainer(SchemaComponentContainer container)
ContainablesetContainer in interface ContainablesetContainer in class SchemaComponentImplcontainer - a container or nullpublic boolean isComplete()
SchemaComponentSchema defining an actual Chronicle must
be complete. If the component is an AttributeDefinition, it is
complete when the property of the attribute is defined and the default
value is valid. If the component is a SeriesDefinition, it is
complete when the name, the type, and the time domain of the series are
defined, and all the series attributes are complete.isComplete in interface SchemaComponentpublic boolean isErasing()
SchemaComponentUpdatableSchema.resolve().isErasing in interface SchemaComponentpublic int getNumber()
SchemaComponentgetNumber in interface SchemaComponentpublic Collection<AttributeDefinition<?>> getAttributeDefinitions()
IncompleteSchemagetAttributeDefinitions in interface IncompleteSchemapublic Collection<AttributeDefinition<?>> getCustomAttributeDefinitions()
SeriesDefinitiongetCustomAttributeDefinitions in interface SeriesDefinitionpublic 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 attrNr, boolean mustExist) throws T2DBException
IncompleteSchemamustExist parameter determines behavior when nothing is
found: exception or null result.getAttributeDefinition in interface IncompleteSchemaattrNr - the number of the attributemustExist - if true throw an exception instead of returning nullT2DBExceptionpublic String getDescription()
SeriesDefinitiongetDescription in interface SeriesDefinitionpublic String getName()
SchemaComponentgetName in interface IncompleteSchemagetName in interface SchemaComponentpublic ch.agent.t2.time.TimeDomain getTimeDomain()
SeriesDefinitiongetTimeDomain in interface SeriesDefinitionpublic ValueType<?> getValueType()
SeriesDefinitiongetValueType in interface SeriesDefinitionpublic boolean isSparse()
SeriesDefinitionisSparse in interface SeriesDefinitionpublic void setErasing(boolean erasing)
erasing - true if the definition should erase an inherited definitionpublic void setDescription(String description)
description - a stringprotected SchemaComponents<AttributeDefinition<?>> getAttributeDefinitionsObject()
public void edit(SchemaComponent component) throws T2DBException
SchemaComponentedit in interface SchemaComponentcomponent - a component serving as templateT2DBExceptionpublic SchemaComponent copy()
SchemaComponentcopy in interface SchemaComponentpublic int compareTo(SeriesDefinition o)
compareTo in interface Comparable<SeriesDefinition>Copyright © 2017. All rights reserved.