org.apache.derby.impl.sql.catalog
Class SYSPERMSRowFactory
- java.lang.Object
-
- org.apache.derby.iapi.sql.dictionary.CatalogRowFactory
-
- org.apache.derby.impl.sql.catalog.SYSPERMSRowFactory
-
public class SYSPERMSRowFactory extends CatalogRowFactory
Factory for creating a SYSPERMS row.
-
-
Field Summary
Fields Modifier and Type Field and Description static intGRANTEE_OBJECTID_GRANTOR_INDEX_NUMstatic intPERMS_OBJECTID_IDX_NUMstatic intPERMS_UUID_IDX_NUM
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description SystemColumn[]buildColumnList()Builds a list of columns suitable for creating this Catalog.TupleDescriptorbuildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd)Make an Tuple Descriptor out of a SYSPERMS rowExecIndexRowbuildIndexKeyRow(int indexNumber, PermissionsDescriptor perm)builds an index key row given for a given index number.intgetPrimaryKeyIndexNumber()Get the index number for the primary key index on this catalog.ExecRowmakeRow(TupleDescriptor td, TupleDescriptor parent)Make a SYSPERMS rowintorPermissions(ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged)Or a set of permissions in with a row from this catalog tableintremovePermissions(ExecRow row, PermissionsDescriptor perm, boolean[] colsChanged)Remove a set of permissions from a row from this catalog table-
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 Detail
-
PERMS_UUID_IDX_NUM
public static final int PERMS_UUID_IDX_NUM
- See Also:
- Constant Field Values
-
PERMS_OBJECTID_IDX_NUM
public static final int PERMS_OBJECTID_IDX_NUM
- See Also:
- Constant Field Values
-
GRANTEE_OBJECTID_GRANTOR_INDEX_NUM
public static final int GRANTEE_OBJECTID_GRANTOR_INDEX_NUM
- See Also:
- Constant Field Values
-
-
Method Detail
-
buildIndexKeyRow
public ExecIndexRow buildIndexKeyRow(int indexNumber, PermissionsDescriptor perm) throws StandardException
builds an index key row given for a given index number.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:CatalogRowFactoryGet the index number for the primary key index on this catalog.- Overrides:
getPrimaryKeyIndexNumberin 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- 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- 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
-
makeRow
public ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent) throws StandardException
Make a SYSPERMS row- Overrides:
makeRowin 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:
buildDescriptorin classCatalogRowFactory- Parameters:
row- a SYSPERMS rowparentTupleDescriptor- unuseddd- dataDictionary- Returns:
- a descriptor equivalent to a SYSPERMS row
- Throws:
StandardException- thrown on failure
-
buildColumnList
public SystemColumn[] buildColumnList() throws StandardException
Builds a list of columns suitable for creating this Catalog.- Specified by:
buildColumnListin classCatalogRowFactory- Returns:
- array of SystemColumn suitable for making this catalog.
- Throws:
StandardException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG