Modifier and Type | Method and Description |
---|---|
UpdatableChronicle |
createChronicle(String name,
boolean tweakName,
String description,
Collection<Attribute<?>> attributes,
Schema schema)
Return a new chronicle to be created in this chronicle.
|
<T> UpdatableSeries<T> |
createSeries(String name)
Create an empty series with the given name.
|
void |
destroy()
Destroy the chronicle.
|
void |
setAttribute(Attribute<?> value)
Set an attribute.
|
void |
setCollection(Chronicle collection)
Set the collection of the chronicle.
|
void |
setDescription(String description)
Set the description of the chronicle.
|
void |
setName(String name)
Set the name of the chronicle.
|
void |
setSchema(Schema schema)
Set the schema of the chronicle.
|
<T> UpdatableSeries<T> |
updateSeries(String name)
Return the updatable series with the given name if it exists.
|
edit, findChronicle, getAttribute, getAttributes, getChronicle, getCollection, getDescription, getDescriptions, getMembers, getName, getNames, getSchema, getSeries, getSeries, getSeries, isMemberOf, isTopChronicle
getDatabase, getId, getSurrogate, inConstruction, isValid
applyUpdates
void setName(String name) throws T2DBException
name
- a stringT2DBException
void setDescription(String description) throws T2DBException
description
- a stringT2DBException
void setAttribute(Attribute<?> value) throws T2DBException
value
- an attributeT2DBException
void setCollection(Chronicle collection) throws T2DBException
collection
- a chronicleT2DBException
void setSchema(Schema schema) throws T2DBException
schema
- a schemaT2DBException
void destroy() throws T2DBException
DBObject.isValid()
will return false.T2DBException
<T> UpdatableSeries<T> createSeries(String name) throws T2DBException
name
- a series name defined in the schemaT2DBException
<T> UpdatableSeries<T> updateSeries(String name) throws T2DBException
name
- a series name defined in the schemaT2DBException
UpdatableChronicle createChronicle(String name, boolean tweakName, String description, Collection<Attribute<?>> attributes, Schema schema) throws T2DBException
Database.getTopChronicle()
.
The name of the chronicle must not be in use within this chronicle. It
may optionally be tweaked to satisfy this requirement (and to obey rules
of the prevailing name syntax). The attributes must be defined in the
schema. If no schema is specified, the schema of this chronicle will
apply. If this chronicle has no schema, then the first schema along the
chronicle chain will apply. On the other hand, if a schema is specified,
it completely overrides any current schema. The schema may not be an
UpdatableSchema
.
The client must execute Updatable.applyUpdates()
on the result.
name
- a nametweakName
- if true, the name can be tweaked if requireddescription
- a descriptionattributes
- a collection of attributesschema
- a schema or nullT2DBException
Copyright © 2017. All rights reserved.