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,HierarchicalTableImpl
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
ConstructorsModifierConstructorDescriptionprotectedBaseGridAttributes(@Nullable Map<String, Object> initialAttributes) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidcheckAvailableColumns(@NotNull Collection<String> columns) Check this grid to ensure that allcolumnsare present.final IFACE_TYPEClear all sorting restrictions that were applied to the grid.final IFACE_TYPErestrictSortTo(@NotNull String... allowedSortingColumns) Disallow sorting on all but the specified columns.protected voidsetColumnDescriptions(@NotNull Map<String, String> descriptions) final IFACE_TYPEsetLayoutHints(@NotNull String hints) Set layout hints for this grid.protected voidsetSortableColumns(@NotNull Collection<String> allowedSortingColumns) final IFACE_TYPEwithColumnDescription(@NotNull String column, @NotNull String description) Add a description for a specific column.final IFACE_TYPEwithColumnDescriptions(@NotNull Map<String, String> descriptions) Add a set of column descriptions to the grid.final IFACE_TYPEwithDescription(@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, withoutAttributesMethods inherited from class io.deephaven.engine.liveness.LivenessArtifact
manageWithCurrentScopeMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessNode
getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryUnmanage, tryUnmanageMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
destroy, dropReference, tryRetainReferenceMethods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.deephaven.engine.table.AttributeMap
getAttribute, getAttributeKeys, getAttributes, getAttributes, hasAttribute, retainingAttributes, withAttributes, withAttributes, withoutAttributesMethods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage, unmanage, unmanageMethods 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 elsenullto allocate a new one
-
-
Method Details
-
restrictSortTo
@ConcurrentMethod public final IFACE_TYPE restrictSortTo(@NotNull @NotNull String... allowedSortingColumns) Description copied from interface:GridAttributesDisallow sorting on all but the specified columns.- Specified by:
restrictSortToin 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:GridAttributesClear all sorting restrictions that were applied to the grid.- Specified by:
clearSortingRestrictionsin 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:GridAttributesApply a description to this grid.- Specified by:
withDescriptionin 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:GridAttributesAdd a description for a specific column. Users should useGridAttributes.withColumnDescriptions(Map)to set several descriptions at once.- Specified by:
withColumnDescriptionin 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:GridAttributesAdd a set of column descriptions to the grid.- Specified by:
withColumnDescriptionsin 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:GridAttributesSet layout hints for this grid.- Specified by:
setLayoutHintsin 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 allcolumnsare present.- Parameters:
columns- The column names to check- Throws:
NoSuchColumnException- If any columns were missing
-