ePages 6.17.39 - DE_EPAGES/Permission/API/Table/AttributePermission.pm

Package DE_EPAGES::Permission::API::Table::AttributePermission

interface for table AttributePermission

@EXPORT_OK
InsertAttributePermission
UpdateAttributePermission
DeleteAttributePermission
GetAllPKeyAttributePermissions
GetAllInfoAttributePermissions
GetInfoAttributePermission
ExistsAttributePermission
GetPKeyAttributePermissionsByTrusteeID
GetInfoAttributePermissionsByTrusteeID
GetPKeyAttributePermissionsByAttributeID
GetInfoAttributePermissionsByAttributeID
GetInfoAttributePermissionsByClassID

Functions

DeleteAttributePermission
ExistsAttributePermission
GetAllInfoAttributePermissions
GetAllPKeyAttributePermissions
GetInfoAttributePermission
GetInfoAttributePermissionsByAttributeID
GetInfoAttributePermissionsByClassID
GetInfoAttributePermissionsByTrusteeID
GetPKeyAttributePermissionsByAttributeID
GetPKeyAttributePermissionsByTrusteeID
InsertAttributePermission
OnDeleteAttribute
OnDeleteTrustee
UpdateAttributePermission

DeleteAttributePermission

Deletes a(n) AttributePermission.

Syntax
DeleteAttributePermission($TrusteeID, $AttributeID);
DeleteAttributePermission($hAttributePermission); # if $hAttributePermission includes TrusteeID, AttributeID
Input
$TrusteeID (int)
trustee id (part of primary key)
$AttributeID (int)
attribute id (part of primary key)

ExistsAttributePermission

Returns true if the AttributePermission exists.

Syntax
$exists = ExistsAttributePermission($TrusteeID, $AttributeID);
Input
$TrusteeID (int)
trustee id (part of primary key)
$AttributeID (int)
attribute id (part of primary key)
Return
$exists (boolean)
1/0 the AttributePermission exists (yes/no)

GetAllInfoAttributePermissions

Returns all objects of AttributePermission.

Syntax
$ahAttributePermissions = GetAllInfoAttributePermissions();
Return
$ahAttributePermissions (reference to array of hashes)
with following keys:
  • TrusteeID - trustee id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int
  • Permission - readable=2, writable=4 - tinyint

GetAllPKeyAttributePermissions

Returns all AttributePermission identifiers.

Syntax
$ahAttributePermissionIDs = GetAllPKeyAttributePermissions();
Return
$ahAttributePermissionIDs (reference to array of hashes)
with following keys:
  • TrusteeID - trustee id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int

GetInfoAttributePermission

Returns the AttributePermission by identifier.

Syntax
$hAttributePermission = GetInfoAttributePermission($TrusteeID, $AttributeID);
Input
$TrusteeID (int)
trustee id (part of primary key)
$AttributeID (int)
attribute id (part of primary key)
Return
$hAttributePermission (reference to hash)
with following keys:
  • TrusteeID - trustee id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int
  • Permission - readable=2, writable=4 - tinyint

GetInfoAttributePermissionsByAttributeID

Returns objects of AttributePermission by alternate key AttributeID.

Syntax
$ahAttributePermissions = GetInfoAttributePermissionsByAttributeID($AttributeID);
Input
$AttributeID (int)
attribute id
Return
$ahAttributePermissions (reference to array of hashes)
with following keys:
  • TrusteeID - trustee id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int
  • Permission - readable=2, writable=4 - tinyint

GetInfoAttributePermissionsByClassID

Returns all attributes and their corresponding permissions based on a given class id and trustee id.

Syntax
$ahAttributePermissions = GetInfoAttributePermissionsByClassID($ClassID, $TrusteeID);
Input
$ClassID (int)
class id
$TrusteeID (int)
attribute id
Return
$ahAttributePermissions (reference to array of hashes)
with following keys:
  • TrusteeID - trustee id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int
  • Permission - readable=2, writable=4 - tinyint

GetInfoAttributePermissionsByTrusteeID

Returns objects of AttributePermission by primary key element TrusteeID.

Syntax
$ahAttributePermissions = GetInfoAttributePermissionsByTrusteeID($TrusteeID);
Input
$TrusteeID (int)
trustee id
Return
$ahAttributePermissions (reference to array of hashes)
with following keys:
  • TrusteeID - trustee id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int
  • Permission - readable=2, writable=4 - tinyint

GetPKeyAttributePermissionsByAttributeID

Returns primary keys of AttributePermission by alternate key AttributeID.

Syntax
$ahKeys = GetPKeyAttributePermissionsByAttributeID($AttributeID);
Input
$AttributeID (int)
attribute id
Return
$ahKeys (reference to array of hashes)
with following keys:
  • TrusteeID - trustee id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int

GetPKeyAttributePermissionsByTrusteeID

Returns primary keys of AttributePermission by primary key element TrusteeID.

Syntax
$ahKeys = GetPKeyAttributePermissionsByTrusteeID($TrusteeID);
Input
$TrusteeID (int)
trustee id
Return
$ahKeys (reference to array of hashes)
with following keys:
  • TrusteeID - trustee id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int

InsertAttributePermission

Creates an entry of AttributePermission.

Syntax
InsertAttributePermission($hAttributePermission);
Input
$hAttributePermission (reference to hash)
with following keys:
  • TrusteeID - trustee id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int
  • Permission - readable=2, writable=4 - tinyint

OnDeleteAttribute

Deletes Permission of this model when an Attribute is deleted.

Syntax
OnDeleteAttribute($hParams);
Input
$hParams (ref.hash.*)
primary key of object Object, key is
  • AttributeID

OnDeleteTrustee

Deletes Permission of this model when a Trustee is deleted.

Syntax
OnDeleteTrustee($hParams);
Input
$hParams (ref.hash.*)
primary key of object Object, key is
  • TrusteeID

UpdateAttributePermission

Updates a(n) AttributePermission if any element was changed.

Syntax
UpdateAttributePermission($TrusteeID, $AttributeID, $hAttributePermission);
UpdateAttributePermission($hAttributePermission); # if $hAttributePermission includes TrusteeID, AttributeID
Input
$TrusteeID (int)
trustee id (part of primary key)
$AttributeID (int)
attribute id (part of primary key)
$hAttributePermission (reference to hash)
with following keys:
  • Permission - readable=2, writable=4 - tinyint