ePages 6.11.0 - DE_EPAGES/Shop/API/Table/ShopCountry.pm

Package DE_EPAGES::Shop::API::Table::ShopCountry

interface for table ShopCountry

@EXPORT_OK
InsertShopCountry
UpdateShopCountry
DeleteShopCountry
GetAllPKeyShopCountries
GetAllInfoShopCountries
GetInfoShopCountry
ExistsShopCountry
GetPKeyShopCountriesByShopID
GetInfoShopCountriesByShopID
GetPKeyShopCountriesByCountryID
GetInfoShopCountriesByCountryID

Functions

DeleteShopCountry
ExistsShopCountry
GetAllInfoShopCountries
GetAllPKeyShopCountries
GetInfoShopCountriesByCountryID
GetInfoShopCountriesByShopID
GetInfoShopCountry
GetPKeyShopCountriesByCountryID
GetPKeyShopCountriesByShopID
InsertShopCountry
OnDeleteCountry
UpdateShopCountry

DeleteShopCountry

Deletes a(n) ShopCountry.

Syntax
DeleteShopCountry($ShopID, $CountryID);
DeleteShopCountry($hShopCountry); # if $hShopCountry includes ShopID, CountryID
Input
$ShopID (int)
shop id (part of primary key)
$CountryID (int)
country identifier - iso num c (part of primary key)

ExistsShopCountry

Returns true if the ShopCountry exists.

Syntax
$exists = ExistsShopCountry($ShopID, $CountryID);
Input
$ShopID (int)
shop id
$CountryID (int)
country identifier - iso num c
Return
$exists (boolean)
1/0 the ShopCountry exists (yes/no)

GetAllInfoShopCountries

Returns all objects of ShopCountry.

Syntax
$ahShopCountrys = GetAllInfoShopCountries();
Return
$ahShopCountrys (reference to array of hashes)
with following keys:
  • ShopID - shop id (part of primary key)- int
  • CountryID - country identifier - iso num c (part of primary key)- int
  • Position - position (optional)- int
  • IsDefault - default country for shop - bit

GetAllPKeyShopCountries

Returns all ShopCountry identifiers.

Syntax
$ahShopCountryIDs = GetAllPKeyShopCountries();
Return
$ahShopCountryIDs (reference to array of hashes)
with following keys:
  • ShopID - shop id - int
  • CountryID - country identifier - iso num c - int

GetInfoShopCountriesByCountryID

Returns objects of ShopCountry by alternate key CountryID.

Syntax
$ahShopCountries = GetInfoShopCountriesByCountryID($CountryID);
Input
$CountryID (int)
country identifier - iso num c
Return
$ahShopCountries (reference to array of hashes)
with following keys:
  • ShopID - shop id (part of primary key)- int
  • CountryID - country identifier - iso num c (part of primary key)- int
  • Position - position (optional)- int
  • IsDefault - default country for shop - bit

GetInfoShopCountriesByShopID

Returns objects of ShopCountry by primary key element ShopID.

Syntax
$ahShopCountries = GetInfoShopCountriesByShopID($ShopID);
Input
$ShopID (int)
shop id
Return
$ahShopCountries (reference to array of hashes)
with following keys:
  • ShopID - shop id (part of primary key)- int
  • CountryID - country identifier - iso num c (part of primary key)- int
  • Position - position (optional)- int
  • IsDefault - default country for shop - bit

GetInfoShopCountry

Returns the ShopCountry by identifier.

Syntax
$hShopCountry = GetInfoShopCountry($ShopID, $CountryID);
Input
$ShopID (int)
shop id (part of primary key)
$CountryID (int)
country identifier - iso num c (part of primary key)
Return
$hShopCountry (reference to hash)
with following keys:
  • ShopID - shop id (part of primary key)- int
  • CountryID - country identifier - iso num c (part of primary key)- int
  • Position - position (optional)- int
  • IsDefault - default country for shop - bit

GetPKeyShopCountriesByCountryID

Returns primary keys of ShopCountry by alternate key CountryID.

Syntax
$ahKeys = GetPKeyShopCountriesByCountryID($CountryID);
Input
$CountryID (int)
country identifier - iso num c
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ShopID - shop id - int
  • CountryID - country identifier - iso num c - int

GetPKeyShopCountriesByShopID

Returns primary keys of ShopCountry by primary key element ShopID.

Syntax
$ahKeys = GetPKeyShopCountriesByShopID($ShopID);
Input
$ShopID (int)
shop id
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ShopID - shop id - int
  • CountryID - country identifier - iso num c - int

InsertShopCountry

Creates an entry of ShopCountry.

Syntax
InsertShopCountry($hShopCountry);
Input
$hShopCountry (reference to hash)
with following keys:
  • ShopID - shop id (part of primary key)- int
  • CountryID - country identifier - iso num c (part of primary key)- int
  • Position - position (optional)- int
  • IsDefault - default country for shop - bit

OnDeleteCountry

Deletes ShopCountry of this model when a(n) Country is deleted.

Syntax
OnDeleteCountry($hParams);
Input
$hParams (ref.hash.*)
primary key of object Country, key is
  • CountryID

UpdateShopCountry

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

Syntax
UpdateShopCountry($ShopID, $CountryID, $hShopCountry);
UpdateShopCountry($hShopCountry); # if $hShopCountry includes ShopID, CountryID
Input
$ShopID (int)
shop id (part of primary key)
$CountryID (int)
country identifier - iso num c (part of primary key)
$hShopCountry (reference to hash)
with following keys:
  • Position - position (optional)- int
  • IsDefault - default country for shop - bit