ePages 7.17.0 - DE_EPAGES/Object/API/Table/LastUpdate.pm

Package DE_EPAGES::Object::API::Table::LastUpdate

interface for table LastUpdate

@EXPORT_OK
SetLastUpdate
GetLastUpdates
InsertLastUpdate
UpdateLastUpdate
DeleteLastUpdate
GetAllPKeyLastUpdates
GetAllInfoLastUpdates
GetInfoLastUpdate
ExistsLastUpdate
GetPKeyLastUpdatesByObjectID
GetInfoLastUpdatesByObjectID
GetPKeyLastUpdatesBySiteID
GetInfoLastUpdatesBySiteID
GetPKeyLastUpdatesByProfileID
GetInfoLastUpdatesByProfileID

Functions

DeleteLastUpdate
ExistsLastUpdate
GetAllInfoLastUpdates
GetAllPKeyLastUpdates
GetInfoLastUpdate
GetInfoLastUpdatesByObjectID
GetInfoLastUpdatesByProfileID
GetInfoLastUpdatesBySiteID
GetLastUpdates
GetPKeyLastUpdatesByObjectID
GetPKeyLastUpdatesByProfileID
GetPKeyLastUpdatesBySiteID
InsertLastUpdate
OnDeleteObject
OnDeleteSite
SetLastUpdate
UpdateLastUpdate

DeleteLastUpdate

Deletes a(n) LastUpdate.

Syntax
DeleteLastUpdate($ObjectID, $ProfileID);
DeleteLastUpdate($hLastUpdate); # if $hLastUpdate includes ObjectID, ProfileID
Input
$ObjectID (int)
Object ID (part of primary key)
$ProfileID (int)
Profile ID (part of primary key)

ExistsLastUpdate

Returns true if the LastUpdate exists.

Syntax
$exists = ExistsLastUpdate($ObjectID, $ProfileID);
Input
$ObjectID (int)
Object ID (part of primary key)
$ProfileID (int)
Profile ID (part of primary key)
Return
$exists (boolean)
1/0 the LastUpdate exists (yes/no)

GetAllInfoLastUpdates

Returns all objects of LastUpdate.

Syntax
$ahLastUpdates = GetAllInfoLastUpdates();
Return
$ahLastUpdates (reference to array of hashes)
with following keys:
  • ObjectID - Object ID (part of primary key)- int
  • ProfileID - Profile ID (part of primary key)- int
  • SiteID - Site ID - int
  • LastUpdatedOn - Date and time of the last modification of the object according to the profile - datetime

GetAllPKeyLastUpdates

Returns all LastUpdate identifiers.

Syntax
$ahLastUpdateIDs = GetAllPKeyLastUpdates();
Return
$ahLastUpdateIDs (reference to array of hashes)
with following keys:
  • ObjectID - Object ID (part of primary key)- int
  • ProfileID - Profile ID (part of primary key)- int

GetInfoLastUpdate

Returns the LastUpdate by identifier.

Syntax
$hLastUpdate = GetInfoLastUpdate($ObjectID, $ProfileID);
Input
$ObjectID (int)
Object ID (part of primary key)
$ProfileID (int)
Profile ID (part of primary key)
Return
$hLastUpdate (reference to hash)
with following keys:
  • ObjectID - Object ID (part of primary key)- int
  • ProfileID - Profile ID (part of primary key)- int
  • SiteID - Site ID - int
  • LastUpdatedOn - Date and time of the last modification of the object according to the profile - datetime

GetInfoLastUpdatesByObjectID

Returns objects of LastUpdate by primary key element ObjectID.

Syntax
$ahLastUpdates = GetInfoLastUpdatesByObjectID($ObjectID);
Input
$ObjectID (int)
Object ID
Return
$ahLastUpdates (reference to array of hashes)
with following keys:
  • ObjectID - Object ID (part of primary key)- int
  • ProfileID - Profile ID (part of primary key)- int
  • SiteID - Site ID - int
  • LastUpdatedOn - Date and time of the last modification of the object according to the profile - datetime

GetInfoLastUpdatesByProfileID

Returns objects of LastUpdate by alternate key ProfileID.

Syntax
$ahLastUpdates = GetInfoLastUpdatesByProfileID($ProfileID);
Input
$ProfileID (int)
Profile ID
Return
$ahLastUpdates (reference to array of hashes)
with following keys:
  • ObjectID - Object ID (part of primary key)- int
  • ProfileID - Profile ID (part of primary key)- int
  • SiteID - Site ID - int
  • LastUpdatedOn - Date and time of the last modification of the object according to the profile - datetime

GetInfoLastUpdatesBySiteID

Returns objects of LastUpdate by alternate keys SiteID and ProfileID and LastUpdatedOn.

Syntax
$ahLastUpdates = GetInfoLastUpdatesBySiteID($SiteID, $ProfileID, $LastUpdatedOn);
Input
$SiteID (int)
Site ID
$ProfileID (int)
Profile ID (optional)
$LastUpdatedOn (datetime)
Date and time of the last modification of the object according to the profile (optional)
Return
$ahLastUpdates (reference to array of hashes)
with following keys:
  • ObjectID - Object ID (part of primary key)- int
  • ProfileID - Profile ID (part of primary key)- int
  • SiteID - Site ID - int
  • LastUpdatedOn - Date and time of the last modification of the object according to the profile - datetime

GetLastUpdates

Returns updated objects of a given profile from a site.

Syntax
$Iterator = GetLastUpdates($SiteID, $ProfileID, $UpdatedAfter);
Input
$SiteID (int)
Site ID
$ProfileID (int)
Profile ID
$UpdatedAfter (datetime)
Date and time of the last updates
Return
$Iterator (Iterator of hashes)
iterator over hash references with following keys:
  • ObjectID - object id - int
  • LastUpdatedOn - Date and time of the deletion on an object - datetime

GetPKeyLastUpdatesByObjectID

Returns primary keys of LastUpdate by primary key element ObjectID.

Syntax
$ahKeys = GetPKeyLastUpdatesByObjectID($ObjectID);
Input
$ObjectID (int)
Object ID
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ObjectID - Object ID (part of primary key)- int
  • ProfileID - Profile ID (part of primary key)- int

GetPKeyLastUpdatesByProfileID

Returns primary keys of LastUpdate by alternate key ProfileID.

Syntax
$ahKeys = GetPKeyLastUpdatesByProfileID($ProfileID);
Input
$ProfileID (int)
Profile ID
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ObjectID - Object ID (part of primary key)- int
  • ProfileID - Profile ID (part of primary key)- int

GetPKeyLastUpdatesBySiteID

Returns primary keys of LastUpdate by alternate keys SiteID and ProfileID and LastUpdatedOn.

Syntax
$ahKeys = GetPKeyLastUpdatesBySiteID($SiteID, $ProfileID, $LastUpdatedOn);
Input
$SiteID (int)
Site ID
$ProfileID (int)
Profile ID (optional)
$LastUpdatedOn (datetime)
Date and time of the last modification of the object according to the profile (optional)
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ObjectID - Object ID (part of primary key)- int
  • ProfileID - Profile ID (part of primary key)- int

InsertLastUpdate

Creates an entry of LastUpdate.

Syntax
InsertLastUpdate($hLastUpdate);
Input
$hLastUpdate (reference to hash)
with following keys:
  • ObjectID - Object ID (part of primary key)- int
  • ProfileID - Profile ID (part of primary key)- int
  • SiteID - Site ID - int
  • LastUpdatedOn - Date and time of the last modification of the object according to the profile - datetime

OnDeleteObject

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

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

OnDeleteSite

Deletes LastUpdate of this model when a(n) Site is deleted.

Syntax
OnDeleteSite($hParams);
Input
$hParams (ref.hash.*)
primary key of object Site, key is
  • SiteID

SetLastUpdate

Creates/Updates an entry of LastUpdate with current Timestamp.

Syntax
SetLastUpdate($hLastUpdate);
Input
$hLastUpdate (reference to hash)
with following keys:
  • ObjectID - Object ID (part of primary key)- int
  • ProfileID - Profile ID (part of primary key)- int
  • SiteID - Site ID - int

UpdateLastUpdate

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

Syntax
UpdateLastUpdate($ObjectID, $ProfileID, $hLastUpdate);
UpdateLastUpdate($hLastUpdate); # if $hLastUpdate includes ObjectID, ProfileID
Input
$ObjectID (int)
Object ID (part of primary key)
$ProfileID (int)
Profile ID (part of primary key)
$hLastUpdate (reference to hash)
with following keys:
  • SiteID - Site ID - int
  • LastUpdatedOn - Date and time of the last modification of the object according to the profile - datetime