Class SYSTABLEPERMSRowFactory
java.lang.Object
org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory
org.apache.derby.impl.sql.catalog.SYSTABLEPERMSRowFactory
Factory for creating a SYSTABLEPERMS row.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private static final int
static final int
static final int
private static final int
private static final int[][]
private static final boolean[]
private static final int
private static final int
private static final int
private static final int
static final int
(package private) static final String
private static final int
static final int
private static final int
private static final int
private static final String[]
Fields inherited from class org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
dvf, heapUUID, indexNames, indexUUID, tableUUID
-
Constructor Summary
ConstructorsConstructorDescriptionSYSTABLEPERMSRowFactory
(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf) -
Method Summary
Modifier and TypeMethodDescriptionbuilds a column list for the catalogbuildDescriptor
(ExecRow row, TupleDescriptor parentTuple, DataDictionary dataDictionary) builds a tuple descriptor from a rowbuildIndexKeyRow
(int indexNumber, PermissionsDescriptor perm) builds a key row given for a given index number.int
Get the index number for the primary key index on this catalog.makeRow
(TupleDescriptor td, TupleDescriptor parent) most subclasses should provide this method.private int
orOnePermission
(ExecRow row, boolean[] colsChanged, int column, String permission) int
orPermissions
(ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged) Or a set of permissions in with a row from this catalog tableprivate boolean
removeOnePermission
(ExecRow row, boolean[] colsChanged, int column, String permission) int
removePermissions
(ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged) Remove a set of permissions from a row from this catalog tablevoid
Set the uuid of the passed permission descriptor to the uuid of the row from the system table.Methods inherited from class org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory
getAuthorizationID, getAuthorizationID, getNullAuthorizationID
Methods inherited from class org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
generateIndexName, getCanonicalHeapName, getCanonicalHeapUUID, getCanonicalIndexUUID, getCanonicalTableUUID, getCatalogName, getCreateHeapProperties, getCreateIndexProperties, getDataValueFactory, getExecutionFactory, getHeapColumnCount, getIndexColumnCount, getIndexColumnPositions, getIndexName, getNumIndexes, getUUIDFactory, initInfo, isIndexUnique, makeEmptyRow, makeEmptyRowForCurrentVersion
-
Field Details
-
TABLENAME_STRING
- See Also:
-
TABLEPERMSID_COL_NUM
private static final int TABLEPERMSID_COL_NUM- See Also:
-
GRANTEE_COL_NUM
private static final int GRANTEE_COL_NUM- See Also:
-
GRANTOR_COL_NUM
private static final int GRANTOR_COL_NUM- See Also:
-
TABLEID_COL_NUM
private static final int TABLEID_COL_NUM- See Also:
-
SELECTPRIV_COL_NUM
private static final int SELECTPRIV_COL_NUM- See Also:
-
DELETEPRIV_COL_NUM
private static final int DELETEPRIV_COL_NUM- See Also:
-
INSERTPRIV_COL_NUM
private static final int INSERTPRIV_COL_NUM- See Also:
-
UPDATEPRIV_COL_NUM
private static final int UPDATEPRIV_COL_NUM- See Also:
-
REFERENCESPRIV_COL_NUM
private static final int REFERENCESPRIV_COL_NUM- See Also:
-
TRIGGERPRIV_COL_NUM
private static final int TRIGGERPRIV_COL_NUM- See Also:
-
COLUMN_COUNT
private static final int COLUMN_COUNT- See Also:
-
GRANTEE_TABLE_GRANTOR_INDEX_NUM
public static final int GRANTEE_TABLE_GRANTOR_INDEX_NUM- See Also:
-
TABLEPERMSID_INDEX_NUM
public static final int TABLEPERMSID_INDEX_NUM- See Also:
-
TABLEID_INDEX_NUM
public static final int TABLEID_INDEX_NUM- See Also:
-
indexColumnPositions
private static final int[][] indexColumnPositions -
GRANTEE_COL_NUM_IN_GRANTEE_TABLE_GRANTOR_INDEX
public static final int GRANTEE_COL_NUM_IN_GRANTEE_TABLE_GRANTOR_INDEX- See Also:
-
indexUniqueness
private static final boolean[] indexUniqueness -
uuids
-
-
Constructor Details
-
SYSTABLEPERMSRowFactory
SYSTABLEPERMSRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf)
-
-
Method Details
-
makeRow
Description copied from class:CatalogRowFactory
most subclasses should provide this method. One or two oddball cases in Replication and SysSTATEMENTSRowFactory don't. For those we call makeRow with the additional arguments.- Overrides:
makeRow
in classCatalogRowFactory
- Throws:
StandardException
-
buildDescriptor
public TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTuple, DataDictionary dataDictionary) throws StandardException builds a tuple descriptor from a row- Specified by:
buildDescriptor
in classCatalogRowFactory
- Throws:
StandardException
-
buildColumnList
builds a column list for the catalog- Specified by:
buildColumnList
in classCatalogRowFactory
- Throws:
StandardException
-
buildIndexKeyRow
public ExecIndexRow buildIndexKeyRow(int indexNumber, PermissionsDescriptor perm) throws StandardException builds a key row given for a given index number.- Specified by:
buildIndexKeyRow
in classPermissionsCatalogRowFactory
- Parameters:
indexNumber
-perm
- a permission descriptor of the appropriate class for this PermissionsCatalogRowFactory class.- Throws:
StandardException
- standard error policy
-
getPrimaryKeyIndexNumber
public int getPrimaryKeyIndexNumber()Description copied from class:CatalogRowFactory
Get the index number for the primary key index on this catalog.- Overrides:
getPrimaryKeyIndexNumber
in classCatalogRowFactory
- Returns:
- a 0-based number
-
orPermissions
public int orPermissions(ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged) throws StandardException Or a set of permissions in with a row from this catalog table- Specified by:
orPermissions
in classPermissionsCatalogRowFactory
- Parameters:
row
- an existing rowperm
- a permission descriptor of the appropriate class for this PermissionsCatalogRowFactory class.colsChanged
- An array with one element for each column in row. It is updated to indicate which columns in row were changed- Returns:
- The number of columns that were changed.
- Throws:
StandardException
- standard error policy
-
orOnePermission
private int orOnePermission(ExecRow row, boolean[] colsChanged, int column, String permission) throws StandardException - Throws:
StandardException
-
removePermissions
public int removePermissions(ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged) throws StandardException Remove a set of permissions from a row from this catalog table- Specified by:
removePermissions
in classPermissionsCatalogRowFactory
- Parameters:
row
- an existing rowperm
- a permission descriptor of the appropriate class for this PermissionsCatalogRowFactory class.colsChanged
- An array with one element for each column in row. It is updated to indicate which columns in row were changed- Returns:
- -1 if there are no permissions left in the row, otherwise the number of columns that were changed.
- Throws:
StandardException
- standard error policy
-
removeOnePermission
private boolean removeOnePermission(ExecRow row, boolean[] colsChanged, int column, String permission) throws StandardException - Throws:
StandardException
-
setUUIDOfThePassedDescriptor
public void setUUIDOfThePassedDescriptor(ExecRow row, PermissionsDescriptor perm) throws StandardException Description copied from class:PermissionsCatalogRowFactory
Set the uuid of the passed permission descriptor to the uuid of the row from the system table. DataDictionary will make this call before calling the dependency manager to send invalidation messages to the objects dependent on the permission descriptor's uuid.- Specified by:
setUUIDOfThePassedDescriptor
in classPermissionsCatalogRowFactory
- Parameters:
row
- The row from the system table for the passed permission descriptorperm
- Permission descriptor- Throws:
StandardException
- See Also:
-