Package org.apache.cassandra.schema
Class Views
- java.lang.Object
-
- org.apache.cassandra.schema.Views
-
- All Implemented Interfaces:
java.lang.Iterable<ViewMetadata>
public final class Views extends java.lang.Object implements java.lang.Iterable<ViewMetadata>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classViews.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Views.Builderbuilder()booleanequals(java.lang.Object o)java.lang.Iterable<ViewMetadata>forTable(TableId tableId)java.util.Optional<ViewMetadata>get(java.lang.String name)Get the materialized view with the specified nameViewMetadatagetNullable(java.lang.String name)Get the view with the specified nameinthashCode()booleanisEmpty()java.util.Iterator<ViewMetadata>iterator()static Viewsnone()intsize()java.util.stream.Stream<ViewMetadata>stream()java.util.stream.Stream<ViewMetadata>stream(TableId tableId)java.lang.StringtoString()Views.Builderunbuild()Viewswith(ViewMetadata view)Create a MaterializedViews instance with the provided materialized view addedViewswithout(java.lang.String name)Creates a MaterializedViews instance with the materializedView with the provided name removedViewswithSwapped(ViewMetadata view)
-
-
-
Method Detail
-
builder
public static Views.Builder builder()
-
unbuild
public Views.Builder unbuild()
-
none
public static Views none()
-
iterator
public java.util.Iterator<ViewMetadata> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<ViewMetadata>
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
forTable
public java.lang.Iterable<ViewMetadata> forTable(TableId tableId)
-
stream
public java.util.stream.Stream<ViewMetadata> stream()
-
stream
public java.util.stream.Stream<ViewMetadata> stream(TableId tableId)
-
get
public java.util.Optional<ViewMetadata> get(java.lang.String name)
Get the materialized view with the specified name- Parameters:
name- a non-qualified materialized view name- Returns:
- an empty
Optionalif the materialized view name is not found; a non-empty optional ofViewMetadataotherwise
-
getNullable
@Nullable public ViewMetadata getNullable(java.lang.String name)
Get the view with the specified name- Parameters:
name- a non-qualified view name- Returns:
- null if the view name is not found; the found
ViewMetadataotherwise
-
with
public Views with(ViewMetadata view)
Create a MaterializedViews instance with the provided materialized view added
-
withSwapped
public Views withSwapped(ViewMetadata view)
-
without
public Views without(java.lang.String name)
Creates a MaterializedViews instance with the materializedView with the provided name removed
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-