Top Description Constructors Methods
org.h2.schema

public abstract Class MetaSchema

extends Schema
Class Inheritance
Known Direct Subclasses
org.h2.mode.PgCatalogSchema, org.h2.schema.InformationSchema
Imports
java.util.ArrayList, .Collection, .Map, org.h2.engine.Database, .SessionLocal, .User, org.h2.table.Table

Meta data schema.

Constructor Summary

AccessConstructor and Description
public
MetaSchema(Database
the database
database
,
int
the object id
id
,
String
the schema name
schemaName
,
User
the owner of the schema
owner
)

Creates a new instance of meta data schema.

Method Summary

Modifier and TypeMethod and Description
public Table
findTableOrView(SessionLocal
the session
session
,
String
the object name
name
)

Overrides org.h2.schema.Schema.findTableOrView.

Try to find a table or view with this name.

public Collection<Table>
getAllTablesAndViews(SessionLocal
the session, null to exclude meta tables
session
)

Overrides org.h2.schema.Schema.getAllTablesAndViews.

Get all tables and views.

protected abstract Map<String, Table>

Returns:

map of tables in this schema
getMap
(SessionLocal
the session
session
)

Returns map of tables in this schema.

public Table
getTableOrView(SessionLocal
the session
session
,
String
the table or view name
name
)

Overrides org.h2.schema.Schema.getTableOrView.

Get the table or view with the given name.

public Table
getTableOrViewByName(SessionLocal
the session
session
,
String
the table name
name
)

Overrides org.h2.schema.Schema.getTableOrViewByName.

Get the table with the given name, if any.

public boolean
isEmpty()

Overrides org.h2.schema.Schema.isEmpty.

Return whether is this schema is empty (does not contain any objects).

Inherited from org.h2.schema.Schema:
addcanDropcreateSynonymcreateTablecreateTableLinkfindAggregatefindConstantfindConstraintfindDomainfindFunctionfindFunctionOrAggregatefindIndexfindSequencefindTriggerfreeUniqueNamegetAllgetAllgetAllConstantsgetAllConstraintsgetAllDomainsgetAllFunctionsAndAggregatesgetAllIndexesgetAllSequencesgetAllSynonymsgetAllTriggersgetChildrengetConstantgetConstraintgetCreateSQLgetDomaingetIndexgetOwnergetSequencegetSynonymgetTableEngineParamsgetTypegetUniqueConstraintNamegetUniqueDomainConstraintNamegetUniqueIndexNameremoveremoveChildrenAndResourcesrenamereserveUniqueNameresolveTableOrViewresolveTableOrViewsetTableEngineParams

Constructor Detail

MetaSchemaback to summary
public MetaSchema(Database database, int id, String schemaName, User owner)

Creates a new instance of meta data schema.

Parameters
database:Database

the database

id:int

the object id

schemaName:String

the schema name

owner:User

the owner of the schema

Method Detail

findTableOrViewback to summary
public Table findTableOrView(SessionLocal session, String name)

Overrides org.h2.schema.Schema.findTableOrView.

Doc from org.h2.schema.Schema.findTableOrView.

Try to find a table or view with this name. This method returns null if no object with this name exists. Local temporary tables are also returned. Synonyms are not returned or resolved.

Parameters
session:SessionLocal

the session

name:String

the object name

Returns:Table

the object or null

Annotations
@Override
getAllTablesAndViewsback to summary
public Collection<Table> getAllTablesAndViews(SessionLocal session)

Overrides org.h2.schema.Schema.getAllTablesAndViews.

Doc from org.h2.schema.Schema.getAllTablesAndViews.

Get all tables and views.

Parameters
session:SessionLocal

the session, null to exclude meta tables

Returns:Collection<Table>

a (possible empty) list of all objects

Annotations
@Override
getMapback to summary
protected abstract Map<String, Table> getMap(SessionLocal session)

Returns map of tables in this schema.

Parameters
session:SessionLocal

the session

Returns:Map<String, Table>

map of tables in this schema

getTableOrViewback to summary
public Table getTableOrView(SessionLocal session, String name)

Overrides org.h2.schema.Schema.getTableOrView.

Doc from org.h2.schema.Schema.getTableOrView.

Get the table or view with the given name. Local temporary tables are also returned.

Parameters
session:SessionLocal

the session

name:String

the table or view name

Returns:Table

the table or view

Annotations
@Override
getTableOrViewByNameback to summary
public Table getTableOrViewByName(SessionLocal session, String name)

Overrides org.h2.schema.Schema.getTableOrViewByName.

Doc from org.h2.schema.Schema.getTableOrViewByName.

Get the table with the given name, if any.

Parameters
session:SessionLocal

the session

name:String

the table name

Returns:Table

the table or null if not found

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Overrides org.h2.schema.Schema.isEmpty.

Doc from org.h2.schema.Schema.isEmpty.

Return whether is this schema is empty (does not contain any objects).

Returns:boolean

true if this schema is empty, false otherwise

Annotations
@Override