T - the underlying data type of the attributepublic class AttributeDefinitionImpl<T> extends SchemaComponentImpl implements AttributeDefinition<T>
AttributeDefinition.| Constructor and Description |
|---|
AttributeDefinitionImpl(int seriesNr,
int number,
Property<T> property,
T value)
Construct an attribute definition.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(AttributeDefinition<T> o) |
SchemaComponent |
copy()
Return a copy.
|
void |
edit(SchemaComponent component)
Edit the component, taking the parameter as a template.
|
boolean |
equals(Object obj) |
Attribute<T> |
getAttribute()
Return the attribute.
|
String |
getName()
Return the name of the component.
|
int |
getNumber()
Return the number of the component.
|
Property<T> |
getProperty()
Return the attribute's property.
|
T |
getValue()
Return the attribute's default value.
|
int |
hashCode() |
boolean |
isComplete()
Return true if the component is complete and can be used.
|
boolean |
isErasing()
Return true if the definition removes an inherited definition.
|
void |
setErasing(boolean erasing)
Set the erasing mode of the definition.
|
void |
setProperty(Property<T> property)
Set the property.
|
void |
setValue(Object value)
Set the default value.
|
String |
toString() |
<S> AttributeDefinition<S> |
typeCheck(Class<S> type)
Cast the attribute definition to the type specified.
|
checkEdit, consolidate, edit, nameChanged, setContainerclone, finalize, getClass, notify, notifyAll, wait, wait, waitconsolidate, editpublic AttributeDefinitionImpl(int seriesNr,
int number,
Property<T> property,
T value)
throws T2DBException
seriesNr - the series number or zero if a chronicle attributenumber - the attribute numberproperty - a propertyvalue - a default value or nullT2DBExceptionpublic 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 Property<T> getProperty()
AttributeDefinitiongetProperty in interface AttributeDefinition<T>public String getName()
SchemaComponentgetName in interface SchemaComponentpublic T getValue()
AttributeDefinitiongetValue in interface AttributeDefinition<T>public Attribute<T> getAttribute()
AttributeDefinitionisComplete() returns false throws an IllegalStateExceptiongetAttribute in interface AttributeDefinition<T>public int compareTo(AttributeDefinition<T> o)
compareTo in interface Comparable<AttributeDefinition<T>>public void setErasing(boolean erasing)
erasing - if true the definition removes an inherited definitionpublic void setProperty(Property<T> property) throws T2DBException
property - a property or nullT2DBExceptionpublic void setValue(Object value) throws T2DBException
value - a value or nullT2DBExceptionpublic void edit(SchemaComponent component)
SchemaComponentedit in interface SchemaComponentcomponent - a component serving as templatepublic SchemaComponent copy()
SchemaComponentcopy in interface SchemaComponentpublic <S> AttributeDefinition<S> typeCheck(Class<S> type) throws T2DBException
AttributeDefinitiontypeCheck in interface AttributeDefinition<T>type - the underlying type requiredT2DBExceptionCopyright © 2017. All rights reserved.