org.apache.derby.iapi.sql.dictionary
Class StatementTablePermission
- java.lang.Object
-
- org.apache.derby.iapi.sql.dictionary.StatementPermission
-
- org.apache.derby.iapi.sql.dictionary.StatementTablePermission
-
- Direct Known Subclasses:
- StatementColumnPermission
public class StatementTablePermission extends StatementPermission
This class describes a table permission required by a statement.
-
-
Constructor Summary
Constructors Constructor and Description StatementTablePermission(UUID tableUUID, int privType)Constructor for StatementTablePermission.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcheck(LanguageConnectionContext lcc, boolean forGrant, Activation activation)booleanequals(java.lang.Object obj)Routine to check if another instance of access descriptor matches this.PermissionsDescriptorgetPermissionDescriptor(java.lang.String authid, DataDictionary dd)Get the PermissionsDescriptor for the passed authorization id for this object.java.lang.StringgetPrivName()Return privilege needed for this access as stringintgetPrivType()Return privilege access requested for this access descriptorUUIDgetTableUUID()Return table UUID for this access descriptorinthashCode()Return hash code for this instancejava.lang.StringtoString()-
Methods inherited from class org.apache.derby.iapi.sql.dictionary.StatementPermission
genericCheck, getObjectType, getPrivilegedObject, isCorrectPermission
-
-
-
-
Constructor Detail
-
StatementTablePermission
public StatementTablePermission(UUID tableUUID, int privType)
Constructor for StatementTablePermission. Creates an instance of table permission requested for the given access.- Parameters:
tableUUID- UUID of the tableprivType- Access privilege requested
-
-
Method Detail
-
getPrivType
public int getPrivType()
Return privilege access requested for this access descriptor- Returns:
- Privilege access
-
getTableUUID
public UUID getTableUUID()
Return table UUID for this access descriptor- Returns:
- Table UUID
-
equals
public boolean equals(java.lang.Object obj)
Routine to check if another instance of access descriptor matches this. Used to ensure only one access descriptor for a table of given privilege is created. Otherwise, every column reference from a table may create a descriptor for that table.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- Another instance of StatementPermission- Returns:
- true if match
-
hashCode
public int hashCode()
Return hash code for this instance- Overrides:
hashCodein classjava.lang.Object- Returns:
- Hashcode
-
check
public void check(LanguageConnectionContext lcc, boolean forGrant, Activation activation) throws StandardException
- Specified by:
checkin classStatementPermission- Parameters:
lcc- LanguageConnectionContextactivation- activation for statement needing check- Throws:
StandardException- if the permission has not been granted- See Also:
StatementPermission.check(org.apache.derby.iapi.sql.conn.LanguageConnectionContext, boolean, org.apache.derby.iapi.sql.Activation)
-
getPermissionDescriptor
public PermissionsDescriptor getPermissionDescriptor(java.lang.String authid, DataDictionary dd) throws StandardException
Description copied from class:StatementPermissionGet 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.- Specified by:
getPermissionDescriptorin classStatementPermission- Parameters:
authid- AuthorizationIddd- DataDictionary- Returns:
- PermissionsDescriptor The PermissionsDescriptor for the passed authorization id on this object
- Throws:
StandardException- See Also:
StatementPermission.getPermissionDescriptor(java.lang.String, org.apache.derby.iapi.sql.dictionary.DataDictionary)
-
getPrivName
public java.lang.String getPrivName()
Return privilege needed for this access as string- Returns:
- privilege string
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG