Regular Asset Type Task Follow Up Task
Table
Columns
| Property |
Db Table |
Db Column |
Db DataType |
Nullable |
Primary Key |
Joins |
CreatedByUserId |
ampc.asset_type_task_follow_up_task |
created_by_user_id |
bigint |
False |
|
|
CreatedByUserCode |
uam.user |
code |
character varying(50) |
False |
|
ampc.asset_type_task_follow_up_task.created_by_user_id = uam.user.user_id |
CreatedByUserFullName |
uam.user |
full_name |
character varying(200) |
False |
|
ampc.asset_type_task_follow_up_task.created_by_user_id = uam.user.user_id |
CreatedOn |
ampc.asset_type_task_follow_up_task |
created_on |
timestamp without time zone |
False |
|
|
ModifiedByUserId |
ampc.asset_type_task_follow_up_task |
modified_by_user_id |
bigint |
False |
|
|
ModifiedByUserCode |
uam.user |
code |
character varying(50) |
False |
|
ampc.asset_type_task_follow_up_task.modified_by_user_id = uam.user.user_id |
ModifiedByUserFullName |
uam.user |
full_name |
character varying(200) |
False |
|
ampc.asset_type_task_follow_up_task.modified_by_user_id = uam.user.user_id |
ModifiedOn |
ampc.asset_type_task_follow_up_task |
modified_on |
timestamp without time zone |
False |
|
|
Version |
ampc.asset_type_task_follow_up_task |
version |
integer |
False |
|
|
PermissionTreeId |
ampc.asset_type_task_follow_up_task |
permission_tree_id |
bigint |
False |
|
|
PermissionTreeCode |
uam.permission_tree |
code |
text |
False |
|
ampc.asset_type_task_follow_up_task.permission_tree_id = uam.permission_tree.permission_tree_id |
PermissionTreeDescription |
uam.permission_tree |
description |
text |
True |
|
ampc.asset_type_task_follow_up_task.permission_tree_id = uam.permission_tree.permission_tree_id |
DevelopmentStatus |
ampc.asset_type_task_follow_up_task |
development_status |
ampc.asset_type_development_status |
False |
|
|
Id |
ampc.asset_type_task_follow_up_task |
asset_type_task_follow_up_task_id |
bigint |
False |
True |
|
IsActive |
ampc.asset_type_task_follow_up_task |
is_active |
boolean |
False |
|
|
IsBackup |
ampc.asset_type_task_follow_up_task |
is_backup |
boolean |
False |
|
|
IsInherited |
ampc.asset_type_task_follow_up_task |
is_inherited |
boolean |
False |
|
|
LastConfirmedOn |
ampc.asset_type_task_follow_up_task |
last_confirmed_on |
timestamp without time zone |
True |
|
|
PreviousDevelopmentStatus |
ampc.asset_type_task_follow_up_task |
previous_development_status |
ampc.asset_type_development_status |
True |
|
|
RegularAssetTypeTaskId |
ampc.asset_type_task_follow_up_task |
asset_type_task_id |
bigint |
False |
|
|
RegularAssetTypeTaskCode |
ampc.asset_type_task |
code |
character varying(50) |
False |
|
ampc.asset_type_task_follow_up_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id |
RegularAssetTypeTaskDescription |
ampc.asset_type_task |
description |
character varying(255) |
False |
|
ampc.asset_type_task_follow_up_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id |
RegularAssetTypeTaskMonitoringPointTypeId |
ahm.monitoring_point_type |
monitoring_point_type_id |
bigint |
False |
True |
ampc.asset_type_task_follow_up_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id Then
ampc.asset_type_task.monitoring_point_type_id = ahm.monitoring_point_type.monitoring_point_type_id |
RegularAssetTypeTaskMonitoringPointTypeHasUpperCriticalBound |
ahm.monitoring_point_type |
has_upper_critical_bound |
boolean |
False |
|
ampc.asset_type_task_follow_up_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id Then
ampc.asset_type_task.monitoring_point_type_id = ahm.monitoring_point_type.monitoring_point_type_id |
RegularAssetTypeTaskMonitoringPointTypeHasUpperWarningBound |
ahm.monitoring_point_type |
has_upper_warning_bound |
boolean |
False |
|
ampc.asset_type_task_follow_up_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id Then
ampc.asset_type_task.monitoring_point_type_id = ahm.monitoring_point_type.monitoring_point_type_id |
RegularAssetTypeTaskMonitoringPointTypeHasLowerCriticalBound |
ahm.monitoring_point_type |
has_lower_critical_bound |
boolean |
False |
|
ampc.asset_type_task_follow_up_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id Then
ampc.asset_type_task.monitoring_point_type_id = ahm.monitoring_point_type.monitoring_point_type_id |
RegularAssetTypeTaskMonitoringPointTypeHasLowerWarningBound |
ahm.monitoring_point_type |
has_lower_warning_bound |
boolean |
False |
|
ampc.asset_type_task_follow_up_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id Then
ampc.asset_type_task.monitoring_point_type_id = ahm.monitoring_point_type.monitoring_point_type_id |
SequenceNumber |
ampc.asset_type_task_follow_up_task |
sequence_number |
integer |
True |
|
|
AddToWorkOrder |
ampc.asset_type_task_follow_up_task |
add_to_work_order |
boolean |
False |
|
|
FollowUpTaskId |
ampc.asset_type_task_follow_up_task |
follow_up_task_id |
bigint |
True |
|
|
FollowUpTaskCode |
ampc.asset_type_task |
code |
character varying(50) |
False |
|
ampc.asset_type_task_follow_up_task.follow_up_task_id = ampc.asset_type_task.asset_type_task_id |
FollowUpTaskDescription |
ampc.asset_type_task |
description |
character varying(255) |
False |
|
ampc.asset_type_task_follow_up_task.follow_up_task_id = ampc.asset_type_task.asset_type_task_id |
InheritedFromId |
ampc.asset_type_task_follow_up_task |
inherited_from_id |
bigint |
True |
|
|
Notes |
ampc.asset_type_task_follow_up_task |
notes |
text |
True |
|
|
TriggerWhenLowerCriticalBound |
ampc.asset_type_task_follow_up_task |
trigger_when_lower_critical_exceeded |
boolean |
False |
|
|
TriggerWhenLowerWarningBound |
ampc.asset_type_task_follow_up_task |
trigger_when_lower_warning_exceeded |
boolean |
False |
|
|
TriggerWhenUpperCriticalBound |
ampc.asset_type_task_follow_up_task |
trigger_when_upper_critical_exceeded |
boolean |
False |
|
|
TriggerWhenUpperWarningBound |
ampc.asset_type_task_follow_up_task |
trigger_when_upper_warning_exceeded |
boolean |
False |
|
|
Enumerations
Mapping 1
| Property |
Property Type |
Db Column |
Db Column Type |
Db Column Values |
| DevelopmentStatus |
AssetTypeDevelopmentStatus |
development_status |
ampc.asset_type_development_status |
NewUnderDevelopment
NewAwaitingConfirmation
ModifiedUnderDevelopment
ModifiedAwaitingConfirmation
DeletedAwaitingConfirmation
DeletedConfirmed
Confirmed
|
Mapping 2
| Property |
Property Type |
Db Column |
Db Column Type |
Db Column Values |
| PreviousDevelopmentStatus |
AssetTypeDevelopmentStatus |
previous_development_status |
ampc.asset_type_development_status |
NewUnderDevelopment
NewAwaitingConfirmation
ModifiedUnderDevelopment
ModifiedAwaitingConfirmation
DeletedAwaitingConfirmation
DeletedConfirmed
Confirmed
|
Queries
The list of example Regular Asset Type Task Follow Up Task queries can be interpreted using the following legend:
| Legend |
Description |
| Primary Table Alias |
The alias for the ampc.asset_type_task_follow_up_task table in the query |
| Include References |
Include (true) or exclude (false) all lookup table joins in the query |
| Include Permissions |
Include (true) or exclude (false) the permission table join in the query to enforce or skip row-level security based on the permissions for the user |
Query 1
| Primary Table Alias |
Include References |
Include Permissions |
_attfut |
False |
False |
| Parameter Name |
Data Type |
Value |
@asset_type_task_follow_up_task_id |
Bigint |
0 |
SELECT
_attfut.created_by_user_id AS "CreatedByUserId",
_attfut.created_on AS "CreatedOn",
_attfut.modified_by_user_id AS "ModifiedByUserId",
_attfut.modified_on AS "ModifiedOn",
_attfut.version AS "Version",
_attfut.permission_tree_id AS "PermissionTreeId",
_attfut.development_status AS "DevelopmentStatus",
_attfut.asset_type_task_follow_up_task_id AS "Id",
_attfut.is_active AS "IsActive",
_attfut.is_backup AS "IsBackup",
_attfut.is_inherited AS "IsInherited",
_attfut.last_confirmed_on AS "LastConfirmedOn",
_attfut.previous_development_status AS "PreviousDevelopmentStatus",
_attfut.asset_type_task_id AS "RegularAssetTypeTaskId",
_attfut.sequence_number AS "SequenceNumber",
_attfut.add_to_work_order AS "AddToWorkOrder",
_attfut.follow_up_task_id AS "FollowUpTaskId",
_attfut.inherited_from_id AS "InheritedFromId",
_attfut.notes AS "Notes",
_attfut.trigger_when_lower_critical_exceeded AS "TriggerWhenLowerCriticalBound",
_attfut.trigger_when_lower_warning_exceeded AS "TriggerWhenLowerWarningBound",
_attfut.trigger_when_upper_critical_exceeded AS "TriggerWhenUpperCriticalBound",
_attfut.trigger_when_upper_warning_exceeded AS "TriggerWhenUpperWarningBound"
FROM
ampc.asset_type_task_follow_up_task _attfut
WHERE
(_attfut.asset_type_task_follow_up_task_id >= @asset_type_task_follow_up_task_id)
Query 2
| Primary Table Alias |
Include References |
Include Permissions |
_attfut |
True |
False |
| Parameter Name |
Data Type |
Value |
@asset_type_task_follow_up_task_id |
Bigint |
0 |
SELECT
_u.user_id AS "CreatedByUserId",
_u.code AS "CreatedByUserCode",
_u.full_name AS "CreatedByUserFullName",
_attfut.created_on AS "CreatedOn",
_u1.user_id AS "ModifiedByUserId",
_u1.code AS "ModifiedByUserCode",
_u1.full_name AS "ModifiedByUserFullName",
_attfut.modified_on AS "ModifiedOn",
_attfut.version AS "Version",
_pt.permission_tree_id AS "PermissionTreeId",
_pt.code AS "PermissionTreeCode",
_pt.description AS "PermissionTreeDescription",
_attfut.development_status AS "DevelopmentStatus",
_attfut.asset_type_task_follow_up_task_id AS "Id",
_attfut.is_active AS "IsActive",
_attfut.is_backup AS "IsBackup",
_attfut.is_inherited AS "IsInherited",
_attfut.last_confirmed_on AS "LastConfirmedOn",
_attfut.previous_development_status AS "PreviousDevelopmentStatus",
_att.asset_type_task_id AS "RegularAssetTypeTaskId",
_att.code AS "RegularAssetTypeTaskCode",
_att.description AS "RegularAssetTypeTaskDescription",
_att.monitoring_point_type_id AS "RegularAssetTypeTaskMonitoringPointType",
_mpt.monitoring_point_type_id AS "RegularAssetTypeTaskMonitoringPointTypeId",
_mpt.has_upper_critical_bound AS "RegularAssetTypeTaskMonitoringPointTypeHasUpperCriticalBound",
_mpt.has_upper_warning_bound AS "RegularAssetTypeTaskMonitoringPointTypeHasUpperWarningBound",
_mpt.has_lower_critical_bound AS "RegularAssetTypeTaskMonitoringPointTypeHasLowerCriticalBound",
_mpt.has_lower_warning_bound AS "RegularAssetTypeTaskMonitoringPointTypeHasLowerWarningBound",
_attfut.sequence_number AS "SequenceNumber",
_attfut.add_to_work_order AS "AddToWorkOrder",
_att1.asset_type_task_id AS "FollowUpTaskId",
_att1.code AS "FollowUpTaskCode",
_att1.description AS "FollowUpTaskDescription",
_attfut1.asset_type_task_follow_up_task_id AS "InheritedFromId",
_attfut.notes AS "Notes",
_attfut.trigger_when_lower_critical_exceeded AS "TriggerWhenLowerCriticalBound",
_attfut.trigger_when_lower_warning_exceeded AS "TriggerWhenLowerWarningBound",
_attfut.trigger_when_upper_critical_exceeded AS "TriggerWhenUpperCriticalBound",
_attfut.trigger_when_upper_warning_exceeded AS "TriggerWhenUpperWarningBound"
FROM
ampc.asset_type_task_follow_up_task _attfut
JOIN uam.user _u ON _attfut.created_by_user_id = _u.user_id
JOIN uam.user _u1 ON _attfut.modified_by_user_id = _u1.user_id
JOIN uam.permission_tree _pt ON _attfut.permission_tree_id = _pt.permission_tree_id
JOIN ampc.asset_type_task _att ON _attfut.asset_type_task_id = _att.asset_type_task_id
LEFT JOIN ahm.monitoring_point_type _mpt ON _att.monitoring_point_type_id = _mpt.monitoring_point_type_id
LEFT JOIN ampc.asset_type_task _att1 ON _attfut.follow_up_task_id = _att1.asset_type_task_id
LEFT JOIN ampc.asset_type_task_follow_up_task _attfut1 ON _attfut.inherited_from_id = _attfut1.asset_type_task_follow_up_task_id
WHERE
(_attfut.asset_type_task_follow_up_task_id >= @asset_type_task_follow_up_task_id)
Query 3
| Primary Table Alias |
Include References |
Include Permissions |
_attfut |
False |
True |
| Parameter Name |
Data Type |
Value |
@asset_type_task_follow_up_task_id |
Bigint |
0 |
@permission_user_id |
Bigint |
500000000000 |
@permission_id |
Bigint |
11000 |
WITH permission_tree_ids AS
(
SELECT DISTINCT unnest(psd.permission_tree_ids) AS permission_tree_id FROM uam.user_permission up JOIN uam.permission_set_data psd ON up.permission_set_id = psd.permission_set_id WHERE up.user_id = @permission_user_id AND up.permission_id = @permission_id
)
SELECT
_attfut.created_by_user_id AS "CreatedByUserId",
_attfut.created_on AS "CreatedOn",
_attfut.modified_by_user_id AS "ModifiedByUserId",
_attfut.modified_on AS "ModifiedOn",
_attfut.version AS "Version",
_attfut.permission_tree_id AS "PermissionTreeId",
_attfut.development_status AS "DevelopmentStatus",
_attfut.asset_type_task_follow_up_task_id AS "Id",
_attfut.is_active AS "IsActive",
_attfut.is_backup AS "IsBackup",
_attfut.is_inherited AS "IsInherited",
_attfut.last_confirmed_on AS "LastConfirmedOn",
_attfut.previous_development_status AS "PreviousDevelopmentStatus",
_attfut.asset_type_task_id AS "RegularAssetTypeTaskId",
_attfut.sequence_number AS "SequenceNumber",
_attfut.add_to_work_order AS "AddToWorkOrder",
_attfut.follow_up_task_id AS "FollowUpTaskId",
_attfut.inherited_from_id AS "InheritedFromId",
_attfut.notes AS "Notes",
_attfut.trigger_when_lower_critical_exceeded AS "TriggerWhenLowerCriticalBound",
_attfut.trigger_when_lower_warning_exceeded AS "TriggerWhenLowerWarningBound",
_attfut.trigger_when_upper_critical_exceeded AS "TriggerWhenUpperCriticalBound",
_attfut.trigger_when_upper_warning_exceeded AS "TriggerWhenUpperWarningBound",
_attfut.permission_tree_id AS "_attfut_permission_tree_id"
FROM
ampc.asset_type_task_follow_up_task _attfut
JOIN permission_tree_ids permission_join ON _attfut.permission_tree_id = permission_join.permission_tree_id
WHERE
(_attfut.asset_type_task_follow_up_task_id >= @asset_type_task_follow_up_task_id)
Query 4
| Primary Table Alias |
Include References |
Include Permissions |
_attfut |
True |
True |
| Parameter Name |
Data Type |
Value |
@asset_type_task_follow_up_task_id |
Bigint |
0 |
@permission_user_id |
Bigint |
500000000000 |
@permission_id |
Bigint |
11000 |
WITH permission_tree_ids AS
(
SELECT DISTINCT unnest(psd.permission_tree_ids) AS permission_tree_id FROM uam.user_permission up JOIN uam.permission_set_data psd ON up.permission_set_id = psd.permission_set_id WHERE up.user_id = @permission_user_id AND up.permission_id = @permission_id
)
SELECT
_u.user_id AS "CreatedByUserId",
_u.code AS "CreatedByUserCode",
_u.full_name AS "CreatedByUserFullName",
_attfut.created_on AS "CreatedOn",
_u1.user_id AS "ModifiedByUserId",
_u1.code AS "ModifiedByUserCode",
_u1.full_name AS "ModifiedByUserFullName",
_attfut.modified_on AS "ModifiedOn",
_attfut.version AS "Version",
_pt.permission_tree_id AS "PermissionTreeId",
_pt.code AS "PermissionTreeCode",
_pt.description AS "PermissionTreeDescription",
_attfut.development_status AS "DevelopmentStatus",
_attfut.asset_type_task_follow_up_task_id AS "Id",
_attfut.is_active AS "IsActive",
_attfut.is_backup AS "IsBackup",
_attfut.is_inherited AS "IsInherited",
_attfut.last_confirmed_on AS "LastConfirmedOn",
_attfut.previous_development_status AS "PreviousDevelopmentStatus",
_att.asset_type_task_id AS "RegularAssetTypeTaskId",
_att.code AS "RegularAssetTypeTaskCode",
_att.description AS "RegularAssetTypeTaskDescription",
_att.monitoring_point_type_id AS "RegularAssetTypeTaskMonitoringPointType",
_mpt.monitoring_point_type_id AS "RegularAssetTypeTaskMonitoringPointTypeId",
_mpt.has_upper_critical_bound AS "RegularAssetTypeTaskMonitoringPointTypeHasUpperCriticalBound",
_mpt.has_upper_warning_bound AS "RegularAssetTypeTaskMonitoringPointTypeHasUpperWarningBound",
_mpt.has_lower_critical_bound AS "RegularAssetTypeTaskMonitoringPointTypeHasLowerCriticalBound",
_mpt.has_lower_warning_bound AS "RegularAssetTypeTaskMonitoringPointTypeHasLowerWarningBound",
_attfut.sequence_number AS "SequenceNumber",
_attfut.add_to_work_order AS "AddToWorkOrder",
_att1.asset_type_task_id AS "FollowUpTaskId",
_att1.code AS "FollowUpTaskCode",
_att1.description AS "FollowUpTaskDescription",
_attfut1.asset_type_task_follow_up_task_id AS "InheritedFromId",
_attfut.notes AS "Notes",
_attfut.trigger_when_lower_critical_exceeded AS "TriggerWhenLowerCriticalBound",
_attfut.trigger_when_lower_warning_exceeded AS "TriggerWhenLowerWarningBound",
_attfut.trigger_when_upper_critical_exceeded AS "TriggerWhenUpperCriticalBound",
_attfut.trigger_when_upper_warning_exceeded AS "TriggerWhenUpperWarningBound",
_attfut.permission_tree_id AS "_attfut_permission_tree_id",
_u.permission_tree_id AS "_u_permission_tree_id",
_u1.permission_tree_id AS "_u1_permission_tree_id",
_att.permission_tree_id AS "_att_permission_tree_id",
_mpt.permission_tree_id AS "_mpt_permission_tree_id",
_att1.permission_tree_id AS "_att1_permission_tree_id",
_attfut1.permission_tree_id AS "_attfut1_permission_tree_id"
FROM
ampc.asset_type_task_follow_up_task _attfut
JOIN permission_tree_ids permission_join ON _attfut.permission_tree_id = permission_join.permission_tree_id
JOIN uam.user _u ON _attfut.created_by_user_id = _u.user_id
JOIN uam.user _u1 ON _attfut.modified_by_user_id = _u1.user_id
JOIN uam.permission_tree _pt ON _attfut.permission_tree_id = _pt.permission_tree_id
JOIN ampc.asset_type_task _att ON _attfut.asset_type_task_id = _att.asset_type_task_id
LEFT JOIN ahm.monitoring_point_type _mpt ON _att.monitoring_point_type_id = _mpt.monitoring_point_type_id
LEFT JOIN ampc.asset_type_task _att1 ON _attfut.follow_up_task_id = _att1.asset_type_task_id
LEFT JOIN ampc.asset_type_task_follow_up_task _attfut1 ON _attfut.inherited_from_id = _attfut1.asset_type_task_follow_up_task_id
WHERE
(_attfut.asset_type_task_follow_up_task_id >= @asset_type_task_follow_up_task_id)