Top Description Fields Constructors Methods
org.apache.derby.impl.sql.catalog

public Class SYSPERMSRowFactory

extends PermissionsCatalogRowFactory
Class Inheritance
Imports
org.apache.derby.catalog.UUID, org.apache.derby.iapi.types.SQLChar, .SQLVarchar, .DataValueDescriptor, .DataValueFactory, org.apache.derby.iapi.sql.execute.ExecutionFactory, .ExecRow, .ExecIndexRow, org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor, .TupleDescriptor, .PermDescriptor, .DataDictionary, .DataDescriptorGenerator, .SystemColumn, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.services.uuid.UUIDFactory, org.apache.derby.shared.common.sanity.SanityManager, java.sql.Types

Factory for creating a SYSPERMS row.

Field Summary

Modifier and TypeField and Description
public static final int
private static final int[][]
public static final int
public 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[]

Constructor Summary

AccessConstructor and Description
pack-priv
SYSPERMSRowFactory(UUIDFactory
UUIDFactory
uuidf
,
ExecutionFactory
ExecutionFactory
ef
,
DataValueFactory
DataValueFactory
dvf
)

Constructor

Method Summary

Modifier and TypeMethod and Description
public SystemColumn[]

Returns:

array of SystemColumn suitable for making this catalog.
buildColumnList
()

Implements abstract org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.buildColumnList.

Builds a list of columns suitable for creating this Catalog.

public TupleDescriptor

Returns:

a descriptor equivalent to a SYSPERMS row
buildDescriptor
(ExecRow
a SYSPERMS row
row
,
TupleDescriptor
unused
parentTupleDescriptor
,
DataDictionary
dataDictionary
dd
)

Implements abstract org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.buildDescriptor.

Make an Tuple Descriptor out of a SYSPERMS row

public ExecIndexRow
buildIndexKeyRow(int indexNumber, PermissionsDescriptor
a permission descriptor of the appropriate class for this PermissionsCatalogRowFactory class.
perm
)

Implements abstract org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory.buildIndexKeyRow.

builds an index key row given for a given index number.

public int
getPrimaryKeyIndexNumber()

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.getPrimaryKeyIndexNumber.

Get the index number for the primary key index on this catalog.

public ExecRow

Returns:

Row suitable for inserting into SYSPERMS.
makeRow
(TupleDescriptor
a permission descriptor
td
,
TupleDescriptor
unused
parent
)

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.makeRow.

Make a SYSPERMS row

public int

Returns:

The number of columns that were changed.
orPermissions
(ExecRow
an existing row
row
,
PermissionsDescriptor
a permission descriptor of the appropriate class for this PermissionsCatalogRowFactory class.
perm
,
boolean[]
An array with one element for each column in row. It is updated to indicate which columns in row were changed
colsChanged
)

Implements abstract org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory.orPermissions.

Or a set of permissions in with a row from this catalog table

public int

Returns:

-1 if there are no permissions left in the row, otherwise the number of columns that were changed.
removePermissions
(ExecRow
an existing row
row
,
PermissionsDescriptor
a permission descriptor of the appropriate class for this PermissionsCatalogRowFactory class.
perm
,
boolean[]
An array with one element for each column in row. It is updated to indicate which columns in row were changed
colsChanged
)

Implements abstract org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory.removePermissions.

Remove a set of permissions from a row from this catalog table

pack-priv void
setUUIDOfThePassedDescriptor(ExecRow
The row from the system table for the passed permission descriptor
row
,
PermissionsDescriptor
Permission descriptor
perm
)

Implements abstract org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory.setUUIDOfThePassedDescriptor.

Set the uuid of the passed permission descriptor to the uuid of the row from the system table.

Inherited from org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory:
getAuthorizationIDgetAuthorizationIDgetNullAuthorizationID

Field Detail

GRANTEE_OBJECTID_GRANTOR_INDEX_NUMback to summary
public static final int GRANTEE_OBJECTID_GRANTOR_INDEX_NUM
indexColumnPositionsback to summary
private static final int[][] indexColumnPositions

Hides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.indexColumnPositions.

PERMS_OBJECTID_IDX_NUMback to summary
public static final int PERMS_OBJECTID_IDX_NUM
PERMS_UUID_IDX_NUMback to summary
public static final int PERMS_UUID_IDX_NUM
SYSPERMS_COLUMN_COUNTback to summary
private static final int SYSPERMS_COLUMN_COUNT
SYSPERMS_GRANTEEback to summary
private static final int SYSPERMS_GRANTEE
SYSPERMS_GRANTORback to summary
private static final int SYSPERMS_GRANTOR
SYSPERMS_IS_GRANTABLEback to summary
private static final int SYSPERMS_IS_GRANTABLE
SYSPERMS_OBJECTIDback to summary
private static final int SYSPERMS_OBJECTID
SYSPERMS_OBJECTTYPEback to summary
private static final int SYSPERMS_OBJECTTYPE
SYSPERMS_PERMISSIONback to summary
private static final int SYSPERMS_PERMISSION
SYSPERMS_PERMISSIONIDback to summary
private static final int SYSPERMS_PERMISSIONID
TABLENAME_STRINGback to summary
private static final String TABLENAME_STRING
uniquenessback to summary
private static final boolean[] uniqueness
uuidsback to summary
private static final String[] uuids

Constructor Detail

SYSPERMSRowFactoryback to summary
pack-priv SYSPERMSRowFactory(UUIDFactory uuidf, ExecutionFactory ef, DataValueFactory dvf)

Constructor

Parameters
uuidf:UUIDFactory

UUIDFactory

ef:ExecutionFactory

ExecutionFactory

dvf:DataValueFactory

DataValueFactory

Method Detail

buildColumnListback to summary
public SystemColumn[] buildColumnList() throws StandardException

Implements abstract org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.buildColumnList.

Builds a list of columns suitable for creating this Catalog.

Returns:SystemColumn[]

array of SystemColumn suitable for making this catalog.

buildDescriptorback to summary
public TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd) throws StandardException

Implements abstract org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.buildDescriptor.

Make an Tuple Descriptor out of a SYSPERMS row

Parameters
row:ExecRow

a SYSPERMS row

parentTupleDescriptor:TupleDescriptor

unused

dd:DataDictionary

dataDictionary

Returns:TupleDescriptor

a descriptor equivalent to a SYSPERMS row

Exceptions
StandardException:
thrown on failure
buildIndexKeyRowback to summary
public ExecIndexRow buildIndexKeyRow(int indexNumber, PermissionsDescriptor perm) throws StandardException

Implements abstract org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory.buildIndexKeyRow.

builds an index key row given for a given index number.

Parameters
perm:PermissionsDescriptor

Doc from org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory.buildIndexKeyRow.

a permission descriptor of the appropriate class for this PermissionsCatalogRowFactory class.

Exceptions
StandardException:

Doc from org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory.buildIndexKeyRow.

standard error policy

getPrimaryKeyIndexNumberback to summary
public int getPrimaryKeyIndexNumber()

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.getPrimaryKeyIndexNumber.

Doc from org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.getPrimaryKeyIndexNumber.

Get the index number for the primary key index on this catalog.

Returns:int

a 0-based number

makeRowback to summary
public ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent) throws StandardException

Overrides org.apache.derby.iapi.sql.dictionary.CatalogRowFactory.makeRow.

Make a SYSPERMS row

Parameters
td:TupleDescriptor

a permission descriptor

parent:TupleDescriptor

unused

Returns:ExecRow

Row suitable for inserting into SYSPERMS.

Exceptions
StandardException:
thrown on failure
orPermissionsback to summary
public int orPermissions(ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged) throws StandardException

Implements abstract org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory.orPermissions.

Or a set of permissions in with a row from this catalog table

Parameters
row:ExecRow

an existing row

perm:PermissionsDescriptor

a permission descriptor of the appropriate class for this PermissionsCatalogRowFactory class.

colsChanged:boolean[]

An array with one element for each column in row. It is updated to indicate which columns in row were changed

Returns:int

The number of columns that were changed.

Exceptions
StandardException:
standard error policy
removePermissionsback to summary
public int removePermissions(ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged) throws StandardException

Implements abstract org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory.removePermissions.

Remove a set of permissions from a row from this catalog table

Parameters
row:ExecRow

an existing row

perm:PermissionsDescriptor

a permission descriptor of the appropriate class for this PermissionsCatalogRowFactory class.

colsChanged:boolean[]

An array with one element for each column in row. It is updated to indicate which columns in row were changed

Returns:int

-1 if there are no permissions left in the row, otherwise the number of columns that were changed.

Exceptions
StandardException:
standard error policy
setUUIDOfThePassedDescriptorback to summary
pack-priv void setUUIDOfThePassedDescriptor(ExecRow row, PermissionsDescriptor perm) throws StandardException

Implements abstract org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory.setUUIDOfThePassedDescriptor.

Doc from org.apache.derby.impl.sql.catalog.PermissionsCatalogRowFactory.setUUIDOfThePassedDescriptor.

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.

Parameters
row:ExecRow

The row from the system table for the passed permission descriptor

perm:PermissionsDescriptor

Permission descriptor

See Also
PermissionsCatalogRowFactory#setUUIDOfThePassedDescriptor