Top Description Fields Constructors Methods
org.apache.derby.iapi.sql.dictionary

public final Class StatementGenericPermission

extends StatementPermission
Class Inheritance
Imports
org.apache.derby.shared.common.error.StandardException, org.apache.derby.catalog.UUID, org.apache.derby.iapi.sql.conn.Authorizer, .LanguageConnectionContext, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.iapi.sql.dictionary.PermDescriptor, org.apache.derby.iapi.store.access.TransactionController, org.apache.derby.iapi.sql.Activation, org.apache.derby.iapi.sql.execute.ExecPreparedStatement, org.apache.derby.iapi.sql.depend.DependencyManager, org.apache.derby.iapi.services.context.ContextManager

This class describes a generic permission (such as USAGE) required by a statement.

Field Summary

Modifier and TypeField and Description
private UUID
private String
private String

Constructor Summary

AccessConstructor and Description
public
StatementGenericPermission(UUID objectID, String objectType, String privilege)

Method Summary

Modifier and TypeMethod and Description
public void
check(LanguageConnectionContext
LanguageConnectionContext
lcc
,
boolean forGrant, Activation
activation for statement needing check
activation
)

Implements abstract org.apache.derby.iapi.sql.dictionary.StatementPermission.check.

public UUID
public String
public PermissionsDescriptor
getPermissionDescriptor(String
AuthorizationId
authid
,
DataDictionary
DataDictionary
dd
)

Implements abstract org.apache.derby.iapi.sql.dictionary.StatementPermission.getPermissionDescriptor.

Get the PermissionsDescriptor for the passed authorization id for this object.

public String
public PrivilegedSQLObject
getPrivilegedObject(DataDictionary dd)

Overrides org.apache.derby.iapi.sql.dictionary.StatementPermission.getPrivilegedObject.

Get the privileged object associated with this permission.

public boolean
isCorrectPermission(PermissionsDescriptor raw)

Overrides org.apache.derby.iapi.sql.dictionary.StatementPermission.isCorrectPermission.

Return true if the passed in permission matches the one required by this StatementPermission.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.apache.derby.iapi.sql.dictionary.StatementPermission:
genericCheck

Field Detail

_objectIDback to summary
private UUID _objectID
_objectTypeback to summary
private String _objectType
_privilegeback to summary
private String _privilege

Constructor Detail

StatementGenericPermissionback to summary
public StatementGenericPermission(UUID objectID, String objectType, String privilege)

Method Detail

checkback to summary
public void check(LanguageConnectionContext lcc, boolean forGrant, Activation activation) throws StandardException

Implements abstract org.apache.derby.iapi.sql.dictionary.StatementPermission.check.

Parameters
lcc:LanguageConnectionContext

Doc from org.apache.derby.iapi.sql.dictionary.StatementPermission.check.

LanguageConnectionContext

activation:Activation

Doc from org.apache.derby.iapi.sql.dictionary.StatementPermission.check.

activation for statement needing check

Exceptions
StandardException:

Doc from org.apache.derby.iapi.sql.dictionary.StatementPermission.check.

if the permission has not been granted

See Also
StatementPermission#check
getObjectIDback to summary
public UUID getObjectID()
getObjectTypeback to summary
public String getObjectType()

Overrides org.apache.derby.iapi.sql.dictionary.StatementPermission.getObjectType.

Doc from org.apache.derby.iapi.sql.dictionary.StatementPermission.getObjectType.

Get the type of the privileged object.

See Also
StatementPermission#getObjectType
getPermissionDescriptorback to summary
public PermissionsDescriptor getPermissionDescriptor(String authid, DataDictionary dd) throws StandardException

Implements abstract org.apache.derby.iapi.sql.dictionary.StatementPermission.getPermissionDescriptor.

Doc from org.apache.derby.iapi.sql.dictionary.StatementPermission.getPermissionDescriptor.

Get the PermissionsDescriptor for the passed authorization id for this object. This method gets called during the execution phase of create view/constraint/trigger. The return value of this method is saved in dependency system to keep track of views/constraints/triggers dependencies on required permissions. This happens in execution phase after it has been established that passed authorization id has all the permissions it needs to create that view/constraint/trigger. Which means that we can only get to writing into dependency system once all the required privileges are confirmed.

Parameters
authid:String

AuthorizationId

dd:DataDictionary

DataDictionary

Returns:PermissionsDescriptor

PermissionsDescriptor The PermissionsDescriptor for the passed authorization id on this object

See Also
StatementPermission#getPermissionDescriptor
getPrivilegeback to summary
public String getPrivilege()
getPrivilegedObjectback to summary
public PrivilegedSQLObject getPrivilegedObject(DataDictionary dd) throws StandardException

Overrides org.apache.derby.iapi.sql.dictionary.StatementPermission.getPrivilegedObject.

Doc from org.apache.derby.iapi.sql.dictionary.StatementPermission.getPrivilegedObject.

Get the privileged object associated with this permission.

See Also
StatementPermission#getPrivilegedObject
isCorrectPermissionback to summary
public boolean isCorrectPermission(PermissionsDescriptor raw)

Overrides org.apache.derby.iapi.sql.dictionary.StatementPermission.isCorrectPermission.

Doc from org.apache.derby.iapi.sql.dictionary.StatementPermission.isCorrectPermission.

Return true if the passed in permission matches the one required by this StatementPermission.

See Also
StatementPermission#isCorrectPermission
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object