public class ChronicleUpdatePolicyImpl extends Object implements ChronicleUpdatePolicy
ChronicleUpdatePolicy
.Constructor and Description |
---|
ChronicleUpdatePolicyImpl(DatabaseBackend database,
ChronicleUpdatePolicyExtension extension)
Construct a
ChronicleUpdatePolicy . |
Modifier and Type | Method and Description |
---|---|
boolean |
deleteChronicle(UpdatableChronicle entity)
Perform actions required as a consequence of deleting a chronicle.
|
boolean |
deleteSeries(UpdatableSeries<?> series)
Perform actions required as a consequence of deleting a series.
|
boolean |
deleteValue(UpdatableSeries<?> series,
ch.agent.t2.time.TimeIndex index)
Perform actions required as a consequence of deleting a value.
|
boolean |
update(UpdatableSeries<?> series,
ch.agent.t2.time.Range range)
Perform actions required as a consequence of updating the range of a series.
|
void |
willDelete(UpdatableChronicle entity)
Throw an exception if the chronicle cannot be deleted.
|
void |
willDelete(UpdatableSeries<?> series)
Throw an exception if the series cannot be deleted.
|
void |
willDelete(UpdatableSeries<?> series,
ch.agent.t2.time.TimeIndex index)
Throw an exception if the value cannot be deleted.
|
void |
willUpdate(UpdatableChronicle entity)
Throw an exception if the intended update is rejected.
|
void |
willUpdate(UpdatableSeries<?> series,
ch.agent.t2.time.Range range)
Throw an exception if the intended update is rejected.
|
public ChronicleUpdatePolicyImpl(DatabaseBackend database, ChronicleUpdatePolicyExtension extension)
ChronicleUpdatePolicy
.database
- a databaseextension
- a chronicle update policy extensionpublic void willDelete(UpdatableChronicle entity) throws T2DBException
ChronicleUpdatePolicy
willDelete
in interface ChronicleUpdatePolicy
entity
- a chronicleT2DBException
public void willDelete(UpdatableSeries<?> series) throws T2DBException
ChronicleUpdatePolicy
willDelete
in interface ChronicleUpdatePolicy
series
- a seriesT2DBException
public void willUpdate(UpdatableChronicle entity) throws T2DBException
ChronicleUpdatePolicy
willUpdate
in interface ChronicleUpdatePolicy
entity
- a chronicleT2DBException
public void willUpdate(UpdatableSeries<?> series, ch.agent.t2.time.Range range) throws T2DBException
ChronicleUpdatePolicy
willUpdate
in interface ChronicleUpdatePolicy
series
- a seriesrange
- the new rangeT2DBException
public void willDelete(UpdatableSeries<?> series, ch.agent.t2.time.TimeIndex index) throws T2DBException
ChronicleUpdatePolicy
willDelete
in interface ChronicleUpdatePolicy
series
- a seriesindex
- a time indexT2DBException
public boolean deleteChronicle(UpdatableChronicle entity) throws T2DBException
ChronicleUpdatePolicy
The method does not manage relationships or dependencies in the core system. Its responsibility is to call the relevant extension methods.
deleteChronicle
in interface ChronicleUpdatePolicy
entity
- a chronicleT2DBException
public boolean deleteSeries(UpdatableSeries<?> series) throws T2DBException
ChronicleUpdatePolicy
The method does not manage relationships or dependencies in the core system. Its responsibility is to call the relevant extension methods.
deleteSeries
in interface ChronicleUpdatePolicy
series
- a seriesT2DBException
public boolean deleteValue(UpdatableSeries<?> series, ch.agent.t2.time.TimeIndex index) throws T2DBException
ChronicleUpdatePolicy
The method does not manage relationships or dependencies in the core system. Its responsibility is to call the relevant extension methods.
deleteValue
in interface ChronicleUpdatePolicy
series
- a seriesindex
- a time indexT2DBException
public boolean update(UpdatableSeries<?> series, ch.agent.t2.time.Range range) throws T2DBException
ChronicleUpdatePolicy
The method does not manage relationships or dependencies in the core system. Its responsibility is to call the relevant extension methods.
update
in interface ChronicleUpdatePolicy
series
- a seriesrange
- the new rangeT2DBException
Copyright © 2017. All rights reserved.