Package org.openhab.core.persistence
Record Class PersistenceItemConfiguration
java.lang.Object
java.lang.Record
org.openhab.core.persistence.PersistenceItemConfiguration
@NonNullByDefault
public record PersistenceItemConfiguration(List<PersistenceConfig> items, @Nullable String alias, List<PersistenceStrategy> strategies, List<PersistenceFilter> filters)
extends Record
This class holds the configuration of a persistence strategy for specific items.
- Author:
- Markus Rathgeb - Initial contribution
-
Constructor Summary
ConstructorDescriptionPersistenceItemConfiguration
(List<PersistenceConfig> items, @Nullable String alias, @Nullable List<PersistenceStrategy> strategies, @Nullable List<PersistenceFilter> filters) Creates an instance of aPersistenceItemConfiguration
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable String
alias()
Returns the value of thealias
record component.final boolean
Indicates whether some other object is "equal to" this one.filters()
Returns the value of thefilters
record component.final int
hashCode()
Returns a hash code value for this object.items()
Returns the value of theitems
record component.Returns the value of thestrategies
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PersistenceItemConfiguration
public PersistenceItemConfiguration(List<PersistenceConfig> items, @Nullable String alias, @Nullable List<PersistenceStrategy> strategies, @Nullable List<PersistenceFilter> filters) Creates an instance of aPersistenceItemConfiguration
record class.- Parameters:
items
- the value for theitems
record componentalias
- the value for thealias
record componentstrategies
- the value for thestrategies
record componentfilters
- the value for thefilters
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
items
Returns the value of theitems
record component.- Returns:
- the value of the
items
record component
-
alias
Returns the value of thealias
record component.- Returns:
- the value of the
alias
record component
-
strategies
Returns the value of thestrategies
record component.- Returns:
- the value of the
strategies
record component
-
filters
Returns the value of thefilters
record component.- Returns:
- the value of the
filters
record component
-