Top Description Fields Constructors Methods
org.h2.engine

public final Class Comment

extends DbObject
Class Inheritance
Imports
org.h2.message.DbException, .Trace, org.h2.util.StringUtils

Represents a database object comment.

Field Summary

Modifier and TypeField and Description
private String
private final int
private final String
Inherited from org.h2.engine.DbObject:
AGGREGATECOMMENTcommentCONSTANTCONSTRAINTdatabaseDOMAINFUNCTION_ALIASINDEXRIGHTROLESCHEMASEQUENCESETTINGSYNONYMTABLE_OR_VIEWtraceTRIGGERUSER

Constructor Summary

AccessConstructor and Description
public
Comment(Database database, int id, DbObject obj)

Method Summary

Modifier and TypeMethod and Description
public void
checkRename()

Overrides org.h2.engine.DbObject.checkRename.

Check if renaming is allowed.

public String
getCreateSQL()

Implements abstract org.h2.engine.DbObject.getCreateSQL.

Construct the CREATE ...

pack-priv static String

Returns:

the key name
getKey
(DbObject
the object
obj
)

Get the comment key name for the given database object.

public int
getType()

Implements abstract org.h2.engine.DbObject.getType.

Get the object type.

private static String
getTypeName(int type)

public void
removeChildrenAndResources(SessionLocal
the session
session
)

Implements abstract org.h2.engine.DbObject.removeChildrenAndResources.

Delete all dependent children objects and resources of this object.

public void
setCommentText(String
the text
comment
)

Set the comment text.

Inherited from org.h2.engine.DbObject:
getChildrengetCommentgetCreateSQLForCopygetCreateSQLForMetagetDatabasegetDropSQLgetIdgetModificationIdgetNamegetSQLgetSQLinvalidateisTemporaryisValidrenamesetCommentsetModifiedsetObjectNamesetTemporarytoString

Field Detail

commentTextback to summary
private String commentText
objectTypeback to summary
private final int objectType
quotedObjectNameback to summary
private final String quotedObjectName

Constructor Detail

Commentback to summary
public Comment(Database database, int id, DbObject obj)

Method Detail

checkRenameback to summary
public void checkRename()

Overrides org.h2.engine.DbObject.checkRename.

Doc from org.h2.engine.DbObject.checkRename.

Check if renaming is allowed. Does nothing when allowed.

Annotations
@Override
getCreateSQLback to summary
public String getCreateSQL()

Implements abstract org.h2.engine.DbObject.getCreateSQL.

Doc from org.h2.engine.DbObject.getCreateSQL.

Construct the CREATE ... SQL statement for this object.

Returns:String

the SQL statement

Annotations
@Override
getKeyback to summary
pack-priv static String getKey(DbObject obj)

Get the comment key name for the given database object. This key name is used internally to associate the comment to the object.

Parameters
obj:DbObject

the object

Returns:String

the key name

getTypeback to summary
public int getType()

Implements abstract org.h2.engine.DbObject.getType.

Doc from org.h2.engine.DbObject.getType.

Get the object type.

Returns:int

the object type

Annotations
@Override
getTypeNameback to summary
private static String getTypeName(int type)
removeChildrenAndResourcesback to summary
public void removeChildrenAndResources(SessionLocal session)

Implements abstract org.h2.engine.DbObject.removeChildrenAndResources.

Doc from org.h2.engine.DbObject.removeChildrenAndResources.

Delete all dependent children objects and resources of this object.

Parameters
session:SessionLocal

the session

Annotations
@Override
setCommentTextback to summary
public void setCommentText(String comment)

Set the comment text.

Parameters
comment:String

the text