Package io.deephaven.engine.table.impl
Class BaseGridAttributes<IFACE_TYPE extends GridAttributes<IFACE_TYPE>,IMPL_TYPE extends BaseGridAttributes<IFACE_TYPE,IMPL_TYPE>>
java.lang.Object
io.deephaven.util.referencecounting.ReferenceCounted
io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
io.deephaven.engine.liveness.ReferenceCountedLivenessNode
io.deephaven.engine.liveness.LivenessArtifact
io.deephaven.engine.table.impl.LiveAttributeMap<IFACE_TYPE,IMPL_TYPE>
io.deephaven.engine.table.impl.BaseGridAttributes<IFACE_TYPE,IMPL_TYPE>
- All Implemented Interfaces:
LogOutputAppendable
,LivenessManager
,LivenessNode
,LivenessReferent
,AttributeMap<IFACE_TYPE>
,GridAttributes<IFACE_TYPE>
,Serializable
- Direct Known Subclasses:
BaseTable
,RollupTableImpl
,TreeTableImpl
public abstract class BaseGridAttributes<IFACE_TYPE extends GridAttributes<IFACE_TYPE>,IMPL_TYPE extends BaseGridAttributes<IFACE_TYPE,IMPL_TYPE>>
extends LiveAttributeMap<IFACE_TYPE,IMPL_TYPE>
implements GridAttributes<IFACE_TYPE>
Default implementation for
GridAttributes
.- See Also:
-
Field Summary
Fields inherited from interface io.deephaven.engine.table.GridAttributes
COLUMN_DESCRIPTIONS_ATTRIBUTE, DESCRIPTION_ATTRIBUTE, LAYOUT_HINTS_ATTRIBUTE, SORTABLE_COLUMNS_ATTRIBUTE
-
Constructor Summary
ModifierConstructorDescriptionprotected
BaseGridAttributes
(@Nullable Map<String, Object> initialAttributes) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
checkAvailableColumns
(@NotNull Collection<String> columns) Check this grid to ensure that allcolumns
are present.final IFACE_TYPE
Clear all sorting restrictions that were applied to the grid.final IFACE_TYPE
restrictSortTo
(@NotNull String... allowedSortingColumns) Disallow sorting on all but the specified columns.protected void
setColumnDescriptions
(@NotNull Map<String, String> descriptions) final IFACE_TYPE
setLayoutHints
(@NotNull String hints) Set layout hints for this grid.protected void
setSortableColumns
(@NotNull Collection<String> allowedSortingColumns) final IFACE_TYPE
withColumnDescription
(@NotNull String column, @NotNull String description) Add a description for a specific column.final IFACE_TYPE
withColumnDescriptions
(@NotNull Map<String, String> descriptions) Add a set of column descriptions to the grid.final IFACE_TYPE
withDescription
(@NotNull String description) Apply a description to this grid.Methods inherited from class io.deephaven.engine.table.impl.LiveAttributeMap
copy, copyAttributes, getAttribute, getAttributeKeys, getAttributes, getAttributes, hasAttribute, prepareReturnCopy, prepareReturnThis, published, retainingAttributes, setAttribute, setAttribute, withAttributes, withAttributes, withoutAttributes
Methods inherited from class io.deephaven.engine.liveness.LivenessArtifact
manageWithCurrentScope
Methods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessNode
getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryUnmanage, tryUnmanage
Methods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
destroy, dropReference, tryRetainReference
Methods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.deephaven.engine.table.AttributeMap
getAttribute, getAttributeKeys, getAttributes, getAttributes, hasAttribute, retainingAttributes, withAttributes, withAttributes, withoutAttributes
Methods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage, unmanage, unmanage
Methods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, retainReference, tryRetainReference
-
Constructor Details
-
BaseGridAttributes
- Parameters:
initialAttributes
- The attributes map to use until mutated, or elsenull
to allocate a new one
-
-
Method Details
-
restrictSortTo
@ConcurrentMethod public final IFACE_TYPE restrictSortTo(@NotNull @NotNull String... allowedSortingColumns) Description copied from interface:GridAttributes
Disallow sorting on all but the specified columns.- Specified by:
restrictSortTo
in interfaceGridAttributes<IFACE_TYPE extends GridAttributes<IFACE_TYPE>>
- Parameters:
allowedSortingColumns
- The columns for which sorting is to be allowed- Returns:
- A copy of this grid with the sort restrictions applied, or this if no change was needed
-
getSortableColumns
-
setSortableColumns
-
clearSortingRestrictions
Description copied from interface:GridAttributes
Clear all sorting restrictions that were applied to the grid.- Specified by:
clearSortingRestrictions
in interfaceGridAttributes<IFACE_TYPE extends GridAttributes<IFACE_TYPE>>
- Returns:
- A copy of this grid with the sort restrictions removed, or this if no change was needed
-
withDescription
Description copied from interface:GridAttributes
Apply a description to this grid.- Specified by:
withDescription
in interfaceGridAttributes<IFACE_TYPE extends GridAttributes<IFACE_TYPE>>
- Parameters:
description
- The description to apply- Returns:
- A copy of this grid with the description applied, or this if no change was needed
-
withColumnDescription
@ConcurrentMethod public final IFACE_TYPE withColumnDescription(@NotNull @NotNull String column, @NotNull @NotNull String description) Description copied from interface:GridAttributes
Add a description for a specific column. Users should useGridAttributes.withColumnDescriptions(Map)
to set several descriptions at once.- Specified by:
withColumnDescription
in interfaceGridAttributes<IFACE_TYPE extends GridAttributes<IFACE_TYPE>>
- Parameters:
column
- The name of the columndescription
- The column description- Returns:
- A copy of this grid with the description applied, or this if no change was needed
-
withColumnDescriptions
@ConcurrentMethod public final IFACE_TYPE withColumnDescriptions(@NotNull @NotNull Map<String, String> descriptions) Description copied from interface:GridAttributes
Add a set of column descriptions to the grid.- Specified by:
withColumnDescriptions
in interfaceGridAttributes<IFACE_TYPE extends GridAttributes<IFACE_TYPE>>
- Parameters:
descriptions
- A map of column name to column description- Returns:
- A copy of this grid with the descriptions applied, or this if no change was needed
-
setColumnDescriptions
-
setLayoutHints
Description copied from interface:GridAttributes
Set layout hints for this grid.- Specified by:
setLayoutHints
in interfaceGridAttributes<IFACE_TYPE extends GridAttributes<IFACE_TYPE>>
- Parameters:
hints
- A packed string of layout hints- Returns:
- A copy of this grid with the layout hints applied, or this if no change was needed
-
checkAvailableColumns
Check this grid to ensure that allcolumns
are present.- Parameters:
columns
- The column names to check- Throws:
NoSuchColumnException
- If any columns were missing
-