diff --git a/configuration/persistence.md b/configuration/persistence.md index 319a184ca..d7af58603 100644 --- a/configuration/persistence.md +++ b/configuration/persistence.md @@ -148,33 +148,33 @@ You can easily imagine that you can implement very powerful rules using this fea Here is the full list of available persistence extensions: -| Persistence Extension | Description | -|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `.persist` | Persists the current State of the Item | -| `.lastUpdate` | Queries for the last update timestamp of a given Item | -| `.historicState(ZonedDateTime)` | Retrieves the State of an Item at a certain point in time (returns HistoricItem) | -| `.changedSince(ZonedDateTime)` | Checks if the State of the Item has (ever) changed since a certain point in time | -| `.changedBetween(ZonedDateTime, ZonedDateTime)` | Checks if the State of the Item has (ever) changed between certain points in time | -| `.updatedSince(ZonedDateTime)` | Checks if the state of the Item has been updated since a certain point in time | -| `.updatedBetween(ZonedDateTime, ZonedDateTime)` | Checks if the state of the Item has been updated between certain points in time | -| `.maximumSince(ZonedDateTime)` | Gets the maximum value of the State of a persisted Item since a certain point in time (returns HistoricItem) | -| `.maximumBetween(ZonedDateTime ZonedDateTime)` | Gets the maximum value of the State of a persisted Item between certain points in time (returns HistoricItem) | -| `.minimumSince(ZonedDateTime)` | Gets the minimum value of the State of a persisted Item since a certain point in time (returns HistoricItem) | -| `.minimumBetween(ZonedDateTime, ZonedDateTime)` | Gets the minimum value of the State of a persisted Item between certain points in time (returns HistoricItem) | -| `.averageSince(ZonedDateTime)` | Gets the average value of the State of a persisted Item since a certain point in time. This method uses a time-weighted average calculation (see example below) | +| Persistence Extension | Description | +|---------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `.persist` | Persists the current State of the Item | +| `.lastUpdate` | Returns the last timestamp a given Item was persisted | +| `.historicState(ZonedDateTime)` | Retrieves the State of an Item at a certain point in time (returns HistoricItem) | +| `.changedSince(ZonedDateTime)` | Checks if the State of the Item has (ever) changed since a certain point in time | +| `.changedBetween(ZonedDateTime, ZonedDateTime)` | Checks if the State of the Item has (ever) changed between certain points in time | +| `.updatedSince(ZonedDateTime)` | Checks if the state of the Item has been updated since a certain point in time | +| `.updatedBetween(ZonedDateTime, ZonedDateTime)` | Checks if the state of the Item has been updated between certain points in time | +| `.maximumSince(ZonedDateTime)` | Gets the maximum value of the State of a persisted Item since a certain point in time (returns HistoricItem) | +| `.maximumBetween(ZonedDateTime ZonedDateTime)` | Gets the maximum value of the State of a persisted Item between certain points in time (returns HistoricItem) | +| `.minimumSince(ZonedDateTime)` | Gets the minimum value of the State of a persisted Item since a certain point in time (returns HistoricItem) | +| `.minimumBetween(ZonedDateTime, ZonedDateTime)` | Gets the minimum value of the State of a persisted Item between certain points in time (returns HistoricItem) | +| `.averageSince(ZonedDateTime)` | Gets the average value of the State of a persisted Item since a certain point in time. This method uses a time-weighted average calculation (see example below) | | `.averageBetween(ZonedDateTime, ZonedDateTime)` | Gets the average value of the State of a persisted Item betwen certain points in time. This method uses a time-weighted average calculation (see example below) | -| `.deltaSince(ZonedDateTime)` | Gets the difference in value of the State of a given Item since a certain point in time | -| `.deltaBetween(ZonedDateTime, ZonedDateTime)` | Gets the difference in value of the State of a given Item between certain points in time | -| `.evolutionRate(ZonedDateTime)` | Gets the evolution rate of the state of a given Item since a certain point in time (returns DecimalType) | -| `.evolutionRate(ZonedDateTime, ZonedDateTime)` | Gets the evolution rate of the state of a given Item between certain points in time (returns DecimalType) | -| `.deviationSince(ZonedDateTime)` | Gets the standard deviation of the state of the given Item since a certain point in time (returns DecimalType) | -| `.deviationBetween(ZonedDateTime, ZonedDateTime)` | Gets the standard deviation of the state of the given Item between certain points in time (returns DecimalType) | -| `.varianceSince(ZonedDateTime)` | Gets the variance of the state of the given Item since a certain point in time (returns DecimalType) | -| `.varianceBetween(ZonedDateTime, ZonedDateTime)` | Gets the variance of the state of the given Item between certain point sin time (returns DecimalType) | -| `.previousState()` | Gets the previous State of a persisted Item (returns HistoricItem) | -| `.previousState(true)` | Gets the previous State of a persisted Item, skips Items with equal State values and searches the first Item with State not equal the current State (returns HistoricItem) | -| `.sumSince(ZonedDateTime)` | Gets the sum of the previous States of a persisted Item since a certain point in time | -| `.sumBetween(ZonedDateTime, ZonedDateTime)` | Gets the sum of the previous States of a persisted Item between certain points in time | +| `.deltaSince(ZonedDateTime)` | Gets the difference in value of the State of a given Item since a certain point in time | +| `.deltaBetween(ZonedDateTime, ZonedDateTime)` | Gets the difference in value of the State of a given Item between certain points in time | +| `.evolutionRate(ZonedDateTime)` | Gets the evolution rate of the state of a given Item since a certain point in time (returns DecimalType) | +| `.evolutionRate(ZonedDateTime, ZonedDateTime)` | Gets the evolution rate of the state of a given Item between certain points in time (returns DecimalType) | +| `.deviationSince(ZonedDateTime)` | Gets the standard deviation of the state of the given Item since a certain point in time (returns DecimalType) | +| `.deviationBetween(ZonedDateTime, ZonedDateTime)` | Gets the standard deviation of the state of the given Item between certain points in time (returns DecimalType) | +| `.varianceSince(ZonedDateTime)` | Gets the variance of the state of the given Item since a certain point in time (returns DecimalType) | +| `.varianceBetween(ZonedDateTime, ZonedDateTime)` | Gets the variance of the state of the given Item between certain point sin time (returns DecimalType) | +| `.previousState()` | Gets the previous State of a persisted Item (returns HistoricItem) | +| `.previousState(true)` | Gets the previous State of a persisted Item, skips Items with equal State values and searches the first Item with State not equal the current State (returns HistoricItem) | +| `.sumSince(ZonedDateTime)` | Gets the sum of the previous States of a persisted Item since a certain point in time | +| `.sumBetween(ZonedDateTime, ZonedDateTime)` | Gets the sum of the previous States of a persisted Item between certain points in time | These extensions use the [default persistence service](#default-persistence-service). You may specify a different persistence service by appending a String as an optional additional parameter at the end of the extension.