ePages 6.11.0 - DE_EPAGES/Object/API/Table/TextAttribute.pm

Package DE_EPAGES::Object::API::Table::TextAttribute

interface for table TextAttribute

@EXPORT_OK
InsertTextAttribute
UpdateTextAttribute
DeleteTextAttribute
GetAllPKeyTextAttributes
GetAllInfoTextAttributes
GetInfoTextAttribute
ExistsTextAttribute
GetPKeyTextAttributesByObjectID
GetInfoTextAttributesByObjectID
GetPKeyTextAttributesByAttributeID
GetInfoTextAttributesByAttributeID

Functions

DeleteTextAttribute
ExistsTextAttribute
GetAllInfoTextAttributes
GetAllPKeyTextAttributes
GetInfoTextAttribute
GetInfoTextAttributesByAttributeID
GetInfoTextAttributesByObjectID
GetPKeyTextAttributesByAttributeID
GetPKeyTextAttributesByObjectID
InsertTextAttribute
OnDeleteAttribute
OnDeleteObject
UpdateTextAttribute

DeleteTextAttribute

Deletes a(n) TextAttribute.

Syntax
DeleteTextAttribute($ObjectID, $AttributeID);
DeleteTextAttribute($hTextAttribute); # if $hTextAttribute includes ObjectID, AttributeID
Input
$ObjectID (int)
object id (part of primary key)
$AttributeID (int)
attribute id (part of primary key)

ExistsTextAttribute

Returns true if the TextAttribute exists.

Syntax
$exists = ExistsTextAttribute($ObjectID, $AttributeID);
Input
$ObjectID (int)
object id
$AttributeID (int)
attribute id
Return
$exists (boolean)
1/0 the TextAttribute exists (yes/no)

GetAllInfoTextAttributes

Returns all objects of TextAttribute.

Syntax
$ahTextAttributes = GetAllInfoTextAttributes();
Return
$ahTextAttributes (reference to array of hashes)
with following keys:
  • ObjectID - object id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int
  • Value - string value >= 256 characters - text

GetAllPKeyTextAttributes

Returns all TextAttribute identifiers.

Syntax
$ahTextAttributeIDs = GetAllPKeyTextAttributes();
Return
$ahTextAttributeIDs (reference to array of hashes)
with following keys:
  • ObjectID - object id - int
  • AttributeID - attribute id - int

GetInfoTextAttribute

Returns the TextAttribute by identifier.

Syntax
$hTextAttribute = GetInfoTextAttribute($ObjectID, $AttributeID);
Input
$ObjectID (int)
object id (part of primary key)
$AttributeID (int)
attribute id (part of primary key)
Return
$hTextAttribute (reference to hash)
with following keys:
  • ObjectID - object id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int
  • Value - string value >= 256 characters - text

GetInfoTextAttributesByAttributeID

Returns objects of TextAttribute by alternate key AttributeID.

Syntax
$ahTextAttributes = GetInfoTextAttributesByAttributeID($AttributeID);
Input
$AttributeID (int)
attribute id
Return
$ahTextAttributes (reference to array of hashes)
with following keys:
  • ObjectID - object id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int
  • Value - string value >= 256 characters - text

GetInfoTextAttributesByObjectID

Returns objects of TextAttribute by primary key element ObjectID.

Syntax
$ahTextAttributes = GetInfoTextAttributesByObjectID($ObjectID);
Input
$ObjectID (int)
object id
Return
$ahTextAttributes (reference to array of hashes)
with following keys:
  • ObjectID - object id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int
  • Value - string value >= 256 characters - text

GetPKeyTextAttributesByAttributeID

Returns primary keys of TextAttribute by alternate key AttributeID.

Syntax
$ahKeys = GetPKeyTextAttributesByAttributeID($AttributeID);
Input
$AttributeID (int)
attribute id
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ObjectID - object id - int
  • AttributeID - attribute id - int

GetPKeyTextAttributesByObjectID

Returns primary keys of TextAttribute by primary key element ObjectID.

Syntax
$ahKeys = GetPKeyTextAttributesByObjectID($ObjectID);
Input
$ObjectID (int)
object id
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ObjectID - object id - int
  • AttributeID - attribute id - int

InsertTextAttribute

Creates an entry of TextAttribute.

Syntax
InsertTextAttribute($hTextAttribute);
Input
$hTextAttribute (reference to hash)
with following keys:
  • ObjectID - object id (part of primary key)- int
  • AttributeID - attribute id (part of primary key)- int
  • Value - string value >= 256 characters - text

OnDeleteAttribute

Deletes TextAttribute of this model when a(n) Attribute is deleted.

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

OnDeleteObject

Deletes TextAttribute of this model when a(n) Object is deleted.

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

UpdateTextAttribute

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

Syntax
UpdateTextAttribute($ObjectID, $AttributeID, $hTextAttribute);
UpdateTextAttribute($hTextAttribute); # if $hTextAttribute includes ObjectID, AttributeID
Input
$ObjectID (int)
object id (part of primary key)
$AttributeID (int)
attribute id (part of primary key)
$hTextAttribute (reference to hash)
with following keys:
  • Value - string value >= 256 characters - text
Return
1 (int)
1