Asset Type FMECA Task
Table
| Database |
Table |
Entity |
On Key 5 Conversions |
On Key 5 Tables |
Other Entities stored in same Table |
Transaction |
ampc.asset_type_fmeca_task |
Asset Type FMECA Task |
|
|
|
Columns
| Property |
Db Table |
Db Column |
Db DataType |
Nullable |
Primary Key |
Joins |
DevelopmentStatus |
ampc.asset_type_fmeca_task |
development_status |
ampc.asset_type_development_status |
False |
|
|
Id |
ampc.asset_type_fmeca_task |
asset_type_fmeca_task_id |
bigint |
False |
True |
|
IsActive |
ampc.asset_type_fmeca_task |
is_active |
boolean |
False |
|
|
IsBackup |
ampc.asset_type_fmeca_task |
is_backup |
boolean |
False |
|
|
IsInherited |
ampc.asset_type_fmeca_task |
is_inherited |
boolean |
False |
|
|
LastConfirmedOn |
ampc.asset_type_fmeca_task |
last_confirmed_on |
timestamp without time zone |
True |
|
|
PreviousDevelopmentStatus |
ampc.asset_type_fmeca_task |
previous_development_status |
ampc.asset_type_development_status |
True |
|
|
SequenceNumber |
ampc.asset_type_fmeca_task |
sequence_number |
integer |
True |
|
|
CreatedByUserId |
ampc.asset_type_fmeca_task |
created_by_user_id |
bigint |
False |
|
|
CreatedByUserCode |
uam.user |
code |
character varying(50) |
False |
|
ampc.asset_type_fmeca_task.created_by_user_id = uam.user.user_id |
CreatedByUserFullName |
uam.user |
full_name |
character varying(200) |
False |
|
ampc.asset_type_fmeca_task.created_by_user_id = uam.user.user_id |
CreatedOn |
ampc.asset_type_fmeca_task |
created_on |
timestamp without time zone |
False |
|
|
ModifiedByUserId |
ampc.asset_type_fmeca_task |
modified_by_user_id |
bigint |
False |
|
|
ModifiedByUserCode |
uam.user |
code |
character varying(50) |
False |
|
ampc.asset_type_fmeca_task.modified_by_user_id = uam.user.user_id |
ModifiedByUserFullName |
uam.user |
full_name |
character varying(200) |
False |
|
ampc.asset_type_fmeca_task.modified_by_user_id = uam.user.user_id |
ModifiedOn |
ampc.asset_type_fmeca_task |
modified_on |
timestamp without time zone |
False |
|
|
Version |
ampc.asset_type_fmeca_task |
version |
integer |
False |
|
|
PermissionTreeId |
ampc.asset_type_fmeca_task |
permission_tree_id |
bigint |
False |
|
|
PermissionTreeCode |
uam.permission_tree |
code |
text |
False |
|
ampc.asset_type_fmeca_task.permission_tree_id = uam.permission_tree.permission_tree_id |
PermissionTreeDescription |
uam.permission_tree |
description |
text |
True |
|
ampc.asset_type_fmeca_task.permission_tree_id = uam.permission_tree.permission_tree_id |
AssetTypeFmecaId |
ampc.asset_type_fmeca_task |
asset_type_fmeca_id |
bigint |
False |
|
|
AssetTypeFmecaAssetTypeId |
ampc.asset_type |
asset_type_id |
bigint |
False |
True |
ampc.asset_type_fmeca_task.asset_type_fmeca_id = ampc.asset_type_fmeca.asset_type_fmeca_id Then
ampc.asset_type_fmeca.asset_type_id = ampc.asset_type.asset_type_id |
AssetTypeFmecaAssetTypeCode |
ampc.asset_type |
code |
character varying(50) |
False |
|
ampc.asset_type_fmeca_task.asset_type_fmeca_id = ampc.asset_type_fmeca.asset_type_fmeca_id Then
ampc.asset_type_fmeca.asset_type_id = ampc.asset_type.asset_type_id |
AssetTypeFmecaAssetTypeDescription |
ampc.asset_type |
description |
character varying(100) |
False |
|
ampc.asset_type_fmeca_task.asset_type_fmeca_id = ampc.asset_type_fmeca.asset_type_fmeca_id Then
ampc.asset_type_fmeca.asset_type_id = ampc.asset_type.asset_type_id |
InheritedFromId |
ampc.asset_type_fmeca_task |
inherited_from_id |
bigint |
True |
|
|
Notes |
ampc.asset_type_fmeca_task |
notes |
text |
True |
|
|
RegularAssetTypeTaskId |
ampc.asset_type_fmeca_task |
asset_type_task_id |
bigint |
False |
|
|
RegularAssetTypeTaskCode |
ampc.asset_type_task |
code |
character varying(50) |
False |
|
ampc.asset_type_fmeca_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_fmeca_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id |
RegularAssetTypeTaskAssetTypeId |
ampc.asset_type |
asset_type_id |
bigint |
False |
True |
ampc.asset_type_fmeca_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id Then
ampc.asset_type_task.asset_type_id = ampc.asset_type.asset_type_id |
RegularAssetTypeTaskAssetTypeCode |
ampc.asset_type |
code |
character varying(50) |
False |
|
ampc.asset_type_fmeca_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id Then
ampc.asset_type_task.asset_type_id = ampc.asset_type.asset_type_id |
RegularAssetTypeTaskAssetTypeDescription |
ampc.asset_type |
description |
character varying(100) |
False |
|
ampc.asset_type_fmeca_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id Then
ampc.asset_type_task.asset_type_id = ampc.asset_type.asset_type_id |
RegularAssetTypeTaskComponentId |
ampc.asset_type_component |
asset_type_component_id |
bigint |
False |
True |
ampc.asset_type_fmeca_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id Then
ampc.asset_type_task.asset_type_component_id = ampc.asset_type_component.asset_type_component_id |
RegularAssetTypeTaskComponentCode |
ampc.asset_type_component |
code |
character varying(50) |
False |
|
ampc.asset_type_fmeca_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id Then
ampc.asset_type_task.asset_type_component_id = ampc.asset_type_component.asset_type_component_id |
RegularAssetTypeTaskComponentDescription |
ampc.asset_type_component |
description |
character varying(100) |
False |
|
ampc.asset_type_fmeca_task.asset_type_task_id = ampc.asset_type_task.asset_type_task_id Then
ampc.asset_type_task.asset_type_component_id = ampc.asset_type_component.asset_type_component_id |
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 Asset Type FMECA Task queries can be interpreted using the following legend:
| Legend |
Description |
| Primary Table Alias |
The alias for the ampc.asset_type_fmeca_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 |
_atft |
False |
False |
SELECT
_atft.development_status AS "DevelopmentStatus",
_atft.asset_type_fmeca_task_id AS "Id",
_atft.is_active AS "IsActive",
_atft.is_backup AS "IsBackup",
_atft.is_inherited AS "IsInherited",
_atft.last_confirmed_on AS "LastConfirmedOn",
_atft.previous_development_status AS "PreviousDevelopmentStatus",
_atft.sequence_number AS "SequenceNumber",
_atft.created_by_user_id AS "CreatedByUserId",
_atft.created_on AS "CreatedOn",
_atft.modified_by_user_id AS "ModifiedByUserId",
_atft.modified_on AS "ModifiedOn",
_atft.version AS "Version",
_atft.permission_tree_id AS "PermissionTreeId",
_atft.asset_type_fmeca_id AS "AssetTypeFmecaId",
_atft.inherited_from_id AS "InheritedFromId",
_atft.notes AS "Notes",
_atft.asset_type_task_id AS "RegularAssetTypeTaskId"
FROM
ampc.asset_type_fmeca_task _atft
Query 2
| Primary Table Alias |
Include References |
Include Permissions |
_atft |
True |
False |
SELECT
_atft.development_status AS "DevelopmentStatus",
_atft.asset_type_fmeca_task_id AS "Id",
_atft.is_active AS "IsActive",
_atft.is_backup AS "IsBackup",
_atft.is_inherited AS "IsInherited",
_atft.last_confirmed_on AS "LastConfirmedOn",
_atft.previous_development_status AS "PreviousDevelopmentStatus",
_atft.sequence_number AS "SequenceNumber",
_u.user_id AS "CreatedByUserId",
_u.code AS "CreatedByUserCode",
_u.full_name AS "CreatedByUserFullName",
_atft.created_on AS "CreatedOn",
_u1.user_id AS "ModifiedByUserId",
_u1.code AS "ModifiedByUserCode",
_u1.full_name AS "ModifiedByUserFullName",
_atft.modified_on AS "ModifiedOn",
_atft.version AS "Version",
_pt.permission_tree_id AS "PermissionTreeId",
_pt.code AS "PermissionTreeCode",
_pt.description AS "PermissionTreeDescription",
_atf.asset_type_fmeca_id AS "AssetTypeFmecaId",
_atf.asset_type_id AS "AssetTypeFmecaAssetType",
_at.asset_type_id AS "AssetTypeFmecaAssetTypeId",
_at.code AS "AssetTypeFmecaAssetTypeCode",
_at.description AS "AssetTypeFmecaAssetTypeDescription",
_atft1.asset_type_fmeca_task_id AS "InheritedFromId",
_atft.notes AS "Notes",
_att.asset_type_task_id AS "RegularAssetTypeTaskId",
_att.code AS "RegularAssetTypeTaskCode",
_att.description AS "RegularAssetTypeTaskDescription",
_att.asset_type_id AS "RegularAssetTypeTaskAssetType",
_at1.asset_type_id AS "RegularAssetTypeTaskAssetTypeId",
_at1.code AS "RegularAssetTypeTaskAssetTypeCode",
_at1.description AS "RegularAssetTypeTaskAssetTypeDescription",
_att.asset_type_component_id AS "RegularAssetTypeTaskComponent",
_atc.asset_type_component_id AS "RegularAssetTypeTaskComponentId",
_atc.code AS "RegularAssetTypeTaskComponentCode",
_atc.description AS "RegularAssetTypeTaskComponentDescription"
FROM
ampc.asset_type_fmeca_task _atft
JOIN uam.user _u ON _atft.created_by_user_id = _u.user_id
JOIN uam.user _u1 ON _atft.modified_by_user_id = _u1.user_id
JOIN uam.permission_tree _pt ON _atft.permission_tree_id = _pt.permission_tree_id
JOIN ampc.asset_type_fmeca _atf ON _atft.asset_type_fmeca_id = _atf.asset_type_fmeca_id
JOIN ampc.asset_type _at ON _atf.asset_type_id = _at.asset_type_id
LEFT JOIN ampc.asset_type_fmeca_task _atft1 ON _atft.inherited_from_id = _atft1.asset_type_fmeca_task_id
JOIN ampc.asset_type_task _att ON _atft.asset_type_task_id = _att.asset_type_task_id
LEFT JOIN ampc.asset_type _at1 ON _att.asset_type_id = _at1.asset_type_id
LEFT JOIN ampc.asset_type_component _atc ON _att.asset_type_component_id = _atc.asset_type_component_id
Query 3
| Primary Table Alias |
Include References |
Include Permissions |
_atft |
False |
True |
| Parameter Name |
Data Type |
Value |
@permission_user_id |
Bigint |
500000000000 |
@permission_id |
Bigint |
110716000 |
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
_atft.development_status AS "DevelopmentStatus",
_atft.asset_type_fmeca_task_id AS "Id",
_atft.is_active AS "IsActive",
_atft.is_backup AS "IsBackup",
_atft.is_inherited AS "IsInherited",
_atft.last_confirmed_on AS "LastConfirmedOn",
_atft.previous_development_status AS "PreviousDevelopmentStatus",
_atft.sequence_number AS "SequenceNumber",
_atft.created_by_user_id AS "CreatedByUserId",
_atft.created_on AS "CreatedOn",
_atft.modified_by_user_id AS "ModifiedByUserId",
_atft.modified_on AS "ModifiedOn",
_atft.version AS "Version",
_atft.permission_tree_id AS "PermissionTreeId",
_atft.asset_type_fmeca_id AS "AssetTypeFmecaId",
_atft.inherited_from_id AS "InheritedFromId",
_atft.notes AS "Notes",
_atft.asset_type_task_id AS "RegularAssetTypeTaskId",
_atft.permission_tree_id AS "_atft_permission_tree_id"
FROM
ampc.asset_type_fmeca_task _atft
JOIN permission_tree_ids permission_join ON _atft.permission_tree_id = permission_join.permission_tree_id
Query 4
| Primary Table Alias |
Include References |
Include Permissions |
_atft |
True |
True |
| Parameter Name |
Data Type |
Value |
@permission_user_id |
Bigint |
500000000000 |
@permission_id |
Bigint |
110716000 |
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
_atft.development_status AS "DevelopmentStatus",
_atft.asset_type_fmeca_task_id AS "Id",
_atft.is_active AS "IsActive",
_atft.is_backup AS "IsBackup",
_atft.is_inherited AS "IsInherited",
_atft.last_confirmed_on AS "LastConfirmedOn",
_atft.previous_development_status AS "PreviousDevelopmentStatus",
_atft.sequence_number AS "SequenceNumber",
_u.user_id AS "CreatedByUserId",
_u.code AS "CreatedByUserCode",
_u.full_name AS "CreatedByUserFullName",
_atft.created_on AS "CreatedOn",
_u1.user_id AS "ModifiedByUserId",
_u1.code AS "ModifiedByUserCode",
_u1.full_name AS "ModifiedByUserFullName",
_atft.modified_on AS "ModifiedOn",
_atft.version AS "Version",
_pt.permission_tree_id AS "PermissionTreeId",
_pt.code AS "PermissionTreeCode",
_pt.description AS "PermissionTreeDescription",
_atf.asset_type_fmeca_id AS "AssetTypeFmecaId",
_atf.asset_type_id AS "AssetTypeFmecaAssetType",
_at.asset_type_id AS "AssetTypeFmecaAssetTypeId",
_at.code AS "AssetTypeFmecaAssetTypeCode",
_at.description AS "AssetTypeFmecaAssetTypeDescription",
_atft1.asset_type_fmeca_task_id AS "InheritedFromId",
_atft.notes AS "Notes",
_att.asset_type_task_id AS "RegularAssetTypeTaskId",
_att.code AS "RegularAssetTypeTaskCode",
_att.description AS "RegularAssetTypeTaskDescription",
_att.asset_type_id AS "RegularAssetTypeTaskAssetType",
_at1.asset_type_id AS "RegularAssetTypeTaskAssetTypeId",
_at1.code AS "RegularAssetTypeTaskAssetTypeCode",
_at1.description AS "RegularAssetTypeTaskAssetTypeDescription",
_att.asset_type_component_id AS "RegularAssetTypeTaskComponent",
_atc.asset_type_component_id AS "RegularAssetTypeTaskComponentId",
_atc.code AS "RegularAssetTypeTaskComponentCode",
_atc.description AS "RegularAssetTypeTaskComponentDescription",
_atft.permission_tree_id AS "_atft_permission_tree_id",
_u.permission_tree_id AS "_u_permission_tree_id",
_u1.permission_tree_id AS "_u1_permission_tree_id",
_atf.permission_tree_id AS "_atf_permission_tree_id",
_at.permission_tree_id AS "_at_permission_tree_id",
_atft1.permission_tree_id AS "_atft1_permission_tree_id",
_att.permission_tree_id AS "_att_permission_tree_id",
_at1.permission_tree_id AS "_at1_permission_tree_id",
_atc.permission_tree_id AS "_atc_permission_tree_id"
FROM
ampc.asset_type_fmeca_task _atft
JOIN permission_tree_ids permission_join ON _atft.permission_tree_id = permission_join.permission_tree_id
JOIN uam.user _u ON _atft.created_by_user_id = _u.user_id
JOIN uam.user _u1 ON _atft.modified_by_user_id = _u1.user_id
JOIN uam.permission_tree _pt ON _atft.permission_tree_id = _pt.permission_tree_id
JOIN ampc.asset_type_fmeca _atf ON _atft.asset_type_fmeca_id = _atf.asset_type_fmeca_id
JOIN ampc.asset_type _at ON _atf.asset_type_id = _at.asset_type_id
LEFT JOIN ampc.asset_type_fmeca_task _atft1 ON _atft.inherited_from_id = _atft1.asset_type_fmeca_task_id
JOIN ampc.asset_type_task _att ON _atft.asset_type_task_id = _att.asset_type_task_id
LEFT JOIN ampc.asset_type _at1 ON _att.asset_type_id = _at1.asset_type_id
LEFT JOIN ampc.asset_type_component _atc ON _att.asset_type_component_id = _atc.asset_type_component_id