Class SYSPERMSRowFactory
java.lang.Object
org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory
org.apache.derby.impl.sql.catalog.SYSPERMSRowFactory
Factory for creating a SYSPERMS row.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
private static final int[][]
static final int
static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final String
private static final boolean[]
private static final String[]
Fields inherited from class org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
dvf, heapUUID, indexNames, indexUniqueness, indexUUID, tableUUID
-
Constructor Summary
ConstructorsConstructorDescriptionSYSPERMSRowFactory
(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf) Constructor -
Method Summary
Modifier and TypeMethodDescriptionBuilds a list of columns suitable for creating this Catalog.buildDescriptor
(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd) Make an Tuple Descriptor out of a SYSPERMS rowbuildIndexKeyRow
(int indexNumber, PermissionsDescriptor perm) builds an index 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) Make a SYSPERMS rowint
orPermissions
(ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged) Or a set of permissions in with a row from this catalog tableint
removePermissions
(ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged) Remove a set of permissions from a row from this catalog table(package private) void
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:
-
SYSPERMS_COLUMN_COUNT
private static final int SYSPERMS_COLUMN_COUNT- See Also:
-
SYSPERMS_PERMISSIONID
private static final int SYSPERMS_PERMISSIONID- See Also:
-
SYSPERMS_OBJECTTYPE
private static final int SYSPERMS_OBJECTTYPE- See Also:
-
SYSPERMS_OBJECTID
private static final int SYSPERMS_OBJECTID- See Also:
-
SYSPERMS_PERMISSION
private static final int SYSPERMS_PERMISSION- See Also:
-
SYSPERMS_GRANTOR
private static final int SYSPERMS_GRANTOR- See Also:
-
SYSPERMS_GRANTEE
private static final int SYSPERMS_GRANTEE- See Also:
-
SYSPERMS_IS_GRANTABLE
private static final int SYSPERMS_IS_GRANTABLE- See Also:
-
indexColumnPositions
private static final int[][] indexColumnPositions -
PERMS_UUID_IDX_NUM
public static final int PERMS_UUID_IDX_NUM- See Also:
-
PERMS_OBJECTID_IDX_NUM
public static final int PERMS_OBJECTID_IDX_NUM- See Also:
-
GRANTEE_OBJECTID_GRANTOR_INDEX_NUM
public static final int GRANTEE_OBJECTID_GRANTOR_INDEX_NUM- See Also:
-
uniqueness
private static final boolean[] uniqueness -
uuids
-
-
Constructor Details
-
SYSPERMSRowFactory
SYSPERMSRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf) Constructor- Parameters:
uuidf
- UUIDFactoryef
- ExecutionFactorydvf
- DataValueFactory
-
-
Method Details
-
buildIndexKeyRow
public ExecIndexRow buildIndexKeyRow(int indexNumber, PermissionsDescriptor perm) throws StandardException builds an index 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
-
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
-
setUUIDOfThePassedDescriptor
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:
-
makeRow
Make a SYSPERMS row- Overrides:
makeRow
in classCatalogRowFactory
- Parameters:
td
- a permission descriptorparent
- unused- Returns:
- Row suitable for inserting into SYSPERMS.
- Throws:
StandardException
- thrown on failure
-
buildDescriptor
public TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd) throws StandardException Make an Tuple Descriptor out of a SYSPERMS row- Specified by:
buildDescriptor
in classCatalogRowFactory
- Parameters:
row
- a SYSPERMS rowparentTupleDescriptor
- unuseddd
- dataDictionary- Returns:
- a descriptor equivalent to a SYSPERMS row
- Throws:
StandardException
- thrown on failure
-
buildColumnList
Builds a list of columns suitable for creating this Catalog.- Specified by:
buildColumnList
in classCatalogRowFactory
- Returns:
- array of SystemColumn suitable for making this catalog.
- Throws:
StandardException
-