public class TableMetadata extends Object
Doubles as a "holder" of partial collections of table metadata internally. For example, in the "edit" operation, the id and a partial spec will be available, the other fields are implicitly unset. The set of provided fields is implicit in the code that uses the object. (Providing partial information avoids the need to query the DB for information that won't actually be used.)
ResolvedTable} for the semantic representation.| Modifier and Type | Class and Description |
|---|---|
static class |
TableMetadata.TableState
State of the metadata table entry (not necessarily of the underlying
datasource.) A table entry will be Active normally.
|
| Constructor and Description |
|---|
TableMetadata(TableId tableId,
long creationTime,
long updateTime,
TableMetadata.TableState state,
TableSpec spec) |
| Modifier and Type | Method and Description |
|---|---|
TableMetadata |
asUpdate(long updateTime) |
long |
creationTime() |
static TableMetadata |
empty(TableId id) |
boolean |
equals(Object o) |
static TableMetadata |
forUpdate(TableId id,
long updateTime,
TableSpec spec) |
TableMetadata |
fromInsert(long updateTime) |
int |
hashCode() |
TableId |
id() |
static TableMetadata |
newTable(TableId id,
TableSpec spec) |
static TableMetadata |
of(TableId id,
TableSpec spec) |
TableSpec |
spec() |
String |
sqlName() |
TableMetadata.TableState |
state() |
String |
toString() |
long |
updateTime() |
void |
validate()
Syntactic validation of a table object.
|
TableMetadata |
withColumns(TableMetadata update) |
TableMetadata |
withProperties(Map<String,Object> props) |
TableMetadata |
withProperties(TableMetadata update) |
TableMetadata |
withSpec(TableSpec spec) |
public TableMetadata(TableId tableId, long creationTime, long updateTime, TableMetadata.TableState state, TableSpec spec)
public static TableMetadata newTable(TableId id, TableSpec spec)
public static TableMetadata of(TableId id, TableSpec spec)
public static TableMetadata forUpdate(TableId id, long updateTime, TableSpec spec)
public static TableMetadata empty(TableId id)
public TableMetadata fromInsert(long updateTime)
public TableMetadata asUpdate(long updateTime)
public TableMetadata withSpec(TableSpec spec)
public TableMetadata withColumns(TableMetadata update)
public TableMetadata withProperties(TableMetadata update)
public TableMetadata withProperties(Map<String,Object> props)
public TableId id()
public String sqlName()
public TableMetadata.TableState state()
public long creationTime()
public long updateTime()
public TableSpec spec()
public void validate()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.