public class ChronicleImpl extends DBObjectImpl implements Chronicle
Chronicle
.Modifier and Type | Class and Description |
---|---|
static class |
ChronicleImpl.RawData
RawData encapsulates the low level members of a chronicle.
|
Modifier | Constructor and Description |
---|---|
|
ChronicleImpl(ChronicleImpl.RawData rawData)
Construct a
Chronicle . |
protected |
ChronicleImpl(String name,
String description,
Chronicle parent,
Schema schema,
Surrogate surrogate)
Construct a
Chronicle . |
|
ChronicleImpl(Surrogate surrogate)
Construct a
Chronicle . |
Modifier and Type | Method and Description |
---|---|
UpdatableChronicle |
edit()
Return an
UpdatableChronicle corresponding to this chronicle. |
Chronicle |
findChronicle(String fullName,
boolean mustExist)
Find the chronicle with the the given full name.
|
Attribute<?> |
getAttribute(String attrName,
boolean mustExist)
Return the attribute with the given name.
|
Collection<Attribute<?>> |
getAttributes()
Return all the chronicle's attributes.
|
Chronicle |
getChronicle(String simpleName,
boolean mustExist)
Return the direct child of this chronicle with the given simple name.
|
Chronicle |
getCollection()
Return the chronicle to which this chronicle belongs.
|
String |
getDescription(boolean full)
Return the description of the chronicle.
|
List<String> |
getDescriptions()
Return the list of all descriptions along the chronicle chain.
|
Collection<Chronicle> |
getMembers()
Return the direct members of this chronicle seen as a collection.
|
String |
getName(boolean full)
Return the name of the chronicle.
|
List<String> |
getNames()
Return the list of all names along the chronicle chain.
|
Schema |
getSchema(boolean effective)
Return the chronicle's schema.
|
Collection<Series<?>> |
getSeries()
Return all existing series in this chronicle.
|
<T> Series<T> |
getSeries(String name)
Return the series with the given simple name.
|
<T> Series<T>[] |
getSeries(String[] names,
Class<T> type,
boolean mustBeDefined)
Return an array of series corresponding to the names requested.
|
boolean |
isMemberOf(Chronicle collection)
Return true if this chronicle is member of the collection.
|
boolean |
isTopChronicle()
Return true if this is the top chronicle.
|
String |
toString() |
protected void |
update()
Force refresh of state on next access.
|
equals, getDatabase, getId, getSurrogate, hashCode, inConstruction, isValid
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDatabase, getId, getSurrogate, inConstruction, isValid
public ChronicleImpl(Surrogate surrogate)
Chronicle
.surrogate
- a chronicle surrogateprotected ChronicleImpl(String name, String description, Chronicle parent, Schema schema, Surrogate surrogate)
Chronicle
.name
- a stringdescription
- a stringparent
- a chronicle or nullschema
- a schema or nullsurrogate
- a surrogatepublic ChronicleImpl(ChronicleImpl.RawData rawData) throws T2DBException
Chronicle
.rawData
- a raw data objectT2DBException
public Chronicle getChronicle(String simpleName, boolean mustExist) throws T2DBException
Chronicle
mustExist
parameter determines behavior when nothing is
found: exception or null result.getChronicle
in interface Chronicle
simpleName
- a simple namemustExist
- if true throw an exception instead of returning nullT2DBException
public Chronicle findChronicle(String fullName, boolean mustExist) throws T2DBException
Chronicle
mustExist
is false, a non-existing chronicle is tolerated when it is at the end of
the chain of simple names.findChronicle
in interface Chronicle
fullName
- the full name of the chroniclemustExist
- if true throw an exception instead of returning nullT2DBException
public boolean isTopChronicle()
Chronicle
isTopChronicle
in interface Chronicle
public UpdatableChronicle edit()
Chronicle
UpdatableChronicle
corresponding to this chronicle.
Successfully getting an Updatable
object does not imply
that updates can be successfully applied.protected void update()
public Chronicle getCollection() throws T2DBException
Chronicle
getCollection
in interface Chronicle
T2DBException
public Collection<Chronicle> getMembers() throws T2DBException
Chronicle
getMembers
in interface Chronicle
T2DBException
public Schema getSchema(boolean effective) throws T2DBException
Chronicle
effective
parameter is true, the schema
returned is the first non-null schema encountered along the chronicle chain.
Also in this case the result can be null.getSchema
in interface Chronicle
effective
- if true return the first non-null schema along the chronicle chainT2DBException
public String getName(boolean full) throws T2DBException
Chronicle
getName
in interface Chronicle
full
- if true return the full name, else the simple nameT2DBException
public List<String> getNames() throws T2DBException
Chronicle
getNames
in interface Chronicle
T2DBException
public String getDescription(boolean full) throws T2DBException
Chronicle
getDescription
in interface Chronicle
full
- if true return the full description, else the simple
descriptionT2DBException
public List<String> getDescriptions() throws T2DBException
Chronicle
getDescriptions
in interface Chronicle
T2DBException
public Attribute<?> getAttribute(String attrName, boolean mustExist) throws T2DBException
Chronicle
getAttribute
in interface Chronicle
attrName
- a stringmustExist
- if true throw an exception instead of returning nullT2DBException
public <T> Series<T> getSeries(String name) throws T2DBException
Chronicle
getSeries
in interface Chronicle
T
- the data type of the underlying time seriesname
- the simple name if the seriesT2DBException
public <T> Series<T>[] getSeries(String[] names, Class<T> type, boolean mustBeDefined) throws T2DBException
Chronicle
mustBeDefined
is false
(in which case the
series is treated like a missing series). If the value type does not
correspond to the type requested an exception is thrown. If a series is
missing (there are no values), a null is returned in its place.getSeries
in interface Chronicle
T
- the data type of the underlying time seriesnames
- the names of the series requestedtype
- the expected type or null to bypass enforcing a typemustBeDefined
- if true throw an exception when a name is undefinedT2DBException
public Collection<Attribute<?>> getAttributes() throws T2DBException
Chronicle
getAttributes
in interface Chronicle
T2DBException
public Collection<Series<?>> getSeries() throws T2DBException
Chronicle
getSeries
in interface Chronicle
T2DBException
public boolean isMemberOf(Chronicle collection) throws T2DBException
Chronicle
isMemberOf
in interface Chronicle
collection
- a chronicleT2DBException
Copyright © 2017. All rights reserved.