Package org.h2.schema
Class SchemaObject
- java.lang.Object
-
- org.h2.engine.DbObject
-
- org.h2.schema.SchemaObject
-
- All Implemented Interfaces:
HasSQL
- Direct Known Subclasses:
Constant,Constraint,Domain,Index,Sequence,Table,TableSynonym,TriggerObject,UserDefinedFunction
public abstract class SchemaObject extends DbObject
Any database object that is stored in a schema.
-
-
Field Summary
Fields Modifier and Type Field Description private Schemaschema-
Fields inherited from class org.h2.engine.DbObject
AGGREGATE, comment, COMMENT, CONSTANT, CONSTRAINT, database, DOMAIN, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, trace, TRIGGER, USER
-
Fields inherited from interface org.h2.util.HasSQL
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSchemaObject(Schema newSchema, int id, java.lang.String name, int traceModuleId)Initialize some attributes of this object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemagetSchema()Get the schema in which this object is definedjava.lang.StringgetSQL(int sqlFlags)Get the SQL statement of this expression.java.lang.StringBuildergetSQL(java.lang.StringBuilder builder, int sqlFlags)Appends the SQL statement of this object to the specified builder.booleanisHidden()Check whether this is a hidden object that doesn't appear in the meta data and in the script, and is not dropped on DROP ALL OBJECTS.-
Methods inherited from class org.h2.engine.DbObject
checkRename, getChildren, getComment, getCreateSQL, getCreateSQLForCopy, getCreateSQLForMeta, getDatabase, getDropSQL, getId, getModificationId, getName, getType, invalidate, isTemporary, isValid, removeChildrenAndResources, rename, setComment, setModified, setObjectName, setTemporary, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.h2.util.HasSQL
getTraceSQL
-
-
-
-
Field Detail
-
schema
private final Schema schema
-
-
Constructor Detail
-
SchemaObject
protected SchemaObject(Schema newSchema, int id, java.lang.String name, int traceModuleId)
Initialize some attributes of this object.- Parameters:
newSchema- the schemaid- the object idname- the nametraceModuleId- the trace module id
-
-
Method Detail
-
getSchema
public final Schema getSchema()
Get the schema in which this object is defined- Returns:
- the schema
-
getSQL
public java.lang.String getSQL(int sqlFlags)
Description copied from interface:HasSQLGet the SQL statement of this expression. This may not always be the original SQL statement, specially after optimization.
-
getSQL
public java.lang.StringBuilder getSQL(java.lang.StringBuilder builder, int sqlFlags)Description copied from interface:HasSQLAppends the SQL statement of this object to the specified builder.
-
isHidden
public boolean isHidden()
Check whether this is a hidden object that doesn't appear in the meta data and in the script, and is not dropped on DROP ALL OBJECTS.- Returns:
- true if it is hidden
-
-