Top Description Fields Constructors Methods
org.h2.engine

public final Class Role

extends RightOwner
Class Inheritance
Imports
java.util.ArrayList, org.h2.message.Trace, org.h2.schema.Schema

Represents a role. Roles can be granted to users, and to other roles.

Field Summary

Modifier and TypeField and Description
private final boolean

Constructor Summary

AccessConstructor and Description
public
Role(Database database, int id, String roleName, boolean system)

Method Summary

Modifier and TypeMethod and Description
public ArrayList<DbObject>
getChildren()

Overrides org.h2.engine.DbObject.getChildren.

Get the list of dependent children (for tables, this includes indexes and so on).

public String

Returns:

the SQL statement
getCreateSQL
(boolean
true if IF NOT EXISTS should be used
ifNotExists
)

Get the CREATE SQL statement for this object.

public String
getCreateSQL()

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

Construct the CREATE ...

public int
getType()

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

Get the object 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.

Inherited from org.h2.engine.RightOwner:
checkOwnsNoSchemasgetRightForObjectgetRightForRolegrantRightgrantRoleisRoleGrantedisSchemaRightGrantedRecursiveisTableRightGrantedRecursiverenamerevokeRightrevokeRolerevokeTemporaryRightsOnRoles

Field Detail

systemback to summary
private final boolean system

Constructor Detail

Roleback to summary
public Role(Database database, int id, String roleName, boolean system)

Method Detail

getChildrenback to summary
public ArrayList<DbObject> getChildren()

Overrides org.h2.engine.DbObject.getChildren.

Doc from org.h2.engine.DbObject.getChildren.

Get the list of dependent children (for tables, this includes indexes and so on).

Returns:ArrayList<DbObject>

the list of children, or null

Annotations
@Override
getCreateSQLback to summary
public String getCreateSQL(boolean ifNotExists)

Get the CREATE SQL statement for this object.

Parameters
ifNotExists:boolean

true if IF NOT EXISTS should be used

Returns:String

the SQL statement

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
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
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