ePages 6.11.0 - DE_EPAGES/TrustedRating/API/Table/TrustedRating.pm

Package DE_EPAGES::TrustedRating::API::Table::TrustedRating

interface for table TrustedRating

@EXPORT_OK
InsertTrustedRating
UpdateTrustedRating
DeleteTrustedRating
GetAllPKeyTrustedRatings
GetAllInfoTrustedRatings
GetInfoTrustedRating
ExistsTrustedRating
GetPKeyTrustedRatingsByShopID
GetInfoTrustedRatingsByShopID
GetPKeyTrustedRatingsByUserID
GetInfoTrustedRatingsByUserID

Functions

DeleteTrustedRating
ExistsTrustedRating
GetAllInfoTrustedRatings
GetAllPKeyTrustedRatings
GetInfoTrustedRating
GetInfoTrustedRatingsByShopID
GetInfoTrustedRatingsByUserID
GetPKeyTrustedRatingsByShopID
GetPKeyTrustedRatingsByUserID
InsertTrustedRating
OnDeleteCustomerOrder
OnDeleteShop
OnDeleteUser
UpdateTrustedRating

DeleteTrustedRating

Deletes a(n) TrustedRating.

Syntax
DeleteTrustedRating($OrderID);
DeleteTrustedRating($hTrustedRating); # if $hTrustedRating includes OrderID
Input
$OrderID (int)
object identifier (primary key)

ExistsTrustedRating

Returns true if the TrustedRating exists.

Syntax
$exists = ExistsTrustedRating($OrderID);
Input
$OrderID (int)
object identifier
Return
$exists (boolean)
1/0 the TrustedRating exists (yes/no)

GetAllInfoTrustedRatings

Returns all objects of TrustedRating.

Syntax
$ahTrustedRatings = GetAllInfoTrustedRatings();
Return
$ahTrustedRatings (reference to array of hashes)
with following keys:
  • OrderID - object identifier (primary key)- int
  • ShopID - shop id - int
  • UserID - user id (optional)- int
  • Date - dispatched or shipped date - datetime

GetAllPKeyTrustedRatings

Returns all TrustedRating identifiers.

Syntax
$aTrustedRatingIDs = GetAllPKeyTrustedRatings();
Return
$aTrustedRatingIDs (reference to array of int)
object identifier

GetInfoTrustedRating

Returns the TrustedRating by identifier.

Syntax
$hTrustedRating = GetInfoTrustedRating($OrderID);
Input
$OrderID (int)
object identifier (primary key)
Return
$hTrustedRating (reference to hash)
with following keys:
  • OrderID - object identifier (primary key)- int
  • ShopID - shop id - int
  • UserID - user id (optional)- int
  • Date - dispatched or shipped date - datetime

GetInfoTrustedRatingsByShopID

Returns objects of TrustedRating by alternate keys ShopID and Date.

Syntax
$ahTrustedRatings = GetInfoTrustedRatingsByShopID($ShopID, $Date);
Input
$ShopID (int)
shop id
$Date (datetime)
dispatched or shipped date (optional)
Return
$ahTrustedRatings (reference to array of hashes)
with following keys:
  • OrderID - object identifier (primary key)- int
  • ShopID - shop id - int
  • UserID - user id (optional)- int
  • Date - dispatched or shipped date - datetime

GetInfoTrustedRatingsByUserID

Returns objects of TrustedRating by alternate key UserID.

Syntax
$ahTrustedRatings = GetInfoTrustedRatingsByUserID($UserID);
Input
$UserID (int)
user id
Return
$ahTrustedRatings (reference to array of hashes)
with following keys:
  • OrderID - object identifier (primary key)- int
  • ShopID - shop id - int
  • UserID - user id (optional)- int
  • Date - dispatched or shipped date - datetime

GetPKeyTrustedRatingsByShopID

Returns primary keys of TrustedRating by alternate keys ShopID and Date.

Syntax
$aKeys = GetPKeyTrustedRatingsByShopID($ShopID, $Date);
Input
$ShopID (int)
shop id
$Date (datetime)
dispatched or shipped date (optional)
Return
$aKeys (reference to array of int)
object identifier (primary key)

GetPKeyTrustedRatingsByUserID

Returns primary keys of TrustedRating by alternate key UserID.

Syntax
$aKeys = GetPKeyTrustedRatingsByUserID($UserID);
Input
$UserID (int)
user id
Return
$aKeys (reference to array of int)
object identifier (primary key)

InsertTrustedRating

Creates an entry of TrustedRating.

Syntax
InsertTrustedRating($hTrustedRating);
Input
$hTrustedRating (reference to hash)
with following keys:
  • OrderID - object identifier (primary key)- int
  • ShopID - shop id - int
  • UserID - user id (optional)- int
  • Date - dispatched or shipped date - datetime

OnDeleteCustomerOrder

Deletes TrustedRating of this model when a(n) CustomerOrder is deleted.

Syntax
OnDeleteCustomerOrder($hParams);
Input
$hParams (ref.hash.*)
primary key of object CustomerOrder, key is
  • OrderID

OnDeleteShop

Deletes TrustedRating of this model when a(n) Shop is deleted.

Syntax
OnDeleteShop($hParams);
Input
$hParams (ref.hash.*)
primary key of object Shop, key is
  • ShopID

OnDeleteUser

Deletes TrustedRating of this model when a(n) User is deleted.

Syntax
OnDeleteUser($hParams);
Input
$hParams (ref.hash.*)
primary key of object User, key is
  • UserID

UpdateTrustedRating

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

Syntax
UpdateTrustedRating($OrderID, $hTrustedRating);
UpdateTrustedRating($hTrustedRating); # if $hTrustedRating includes OrderID
Input
$OrderID (int)
object identifier (primary key)
$hTrustedRating (reference to hash)
with following keys:
  • ShopID - shop id - int
  • UserID - user id (optional)- int
  • Date - dispatched or shipped date - datetime
Return
1 (integer)
static