Placeholder Asset Attribute
Table
Columns
| Property |
Db Table |
Db Column |
Db DataType |
Nullable |
Primary Key |
Joins |
InheritedFromId |
ampc.placeholder_asset_attribute |
inherited_from_id |
bigint |
True |
|
|
PlaceholderAssetId |
ampc.placeholder_asset_attribute |
asset_id |
bigint |
False |
|
|
PlaceholderAssetCode |
ampc.asset |
code |
character varying(50) |
False |
|
ampc.placeholder_asset_attribute.asset_id = ampc.asset.asset_id |
PlaceholderAssetDescription |
ampc.asset |
description |
character varying(100) |
False |
|
ampc.placeholder_asset_attribute.asset_id = ampc.asset.asset_id |
DevelopmentStatus |
ampc.placeholder_asset_attribute |
development_status |
ampc.asset_development_status |
False |
|
|
IsProposed |
ampc.placeholder_asset_attribute |
is_proposed |
boolean |
False |
|
|
LastConfirmedChangeLogId |
ampc.placeholder_asset_attribute |
last_confirmed_change_log_id |
bigint |
True |
|
|
LastConfirmedOn |
ampc.placeholder_asset_attribute |
last_confirmed_on |
timestamp without time zone |
True |
|
|
SynchronisedWithTypeObjectUpTo |
ampc.placeholder_asset_attribute |
synchronised_with_type_object_up_to |
timestamp without time zone |
True |
|
|
IsHistorical |
ampc.placeholder_asset_attribute |
is_historical |
boolean |
False |
|
|
Unsynchronised |
ampc.placeholder_asset_attribute |
unsynchronised |
boolean |
False |
|
|
IsInherited |
ampc.placeholder_asset_attribute |
is_inherited |
boolean |
False |
|
|
CreatedByUserId |
ampc.placeholder_asset_attribute |
created_by_user_id |
bigint |
False |
|
|
CreatedByUserCode |
uam.user |
code |
character varying(50) |
False |
|
ampc.placeholder_asset_attribute.created_by_user_id = uam.user.user_id |
CreatedByUserFullName |
uam.user |
full_name |
character varying(200) |
False |
|
ampc.placeholder_asset_attribute.created_by_user_id = uam.user.user_id |
CreatedOn |
ampc.placeholder_asset_attribute |
created_on |
timestamp without time zone |
False |
|
|
IsActive |
ampc.placeholder_asset_attribute |
is_active |
boolean |
False |
|
|
ModifiedByUserId |
ampc.placeholder_asset_attribute |
modified_by_user_id |
bigint |
False |
|
|
ModifiedByUserCode |
uam.user |
code |
character varying(50) |
False |
|
ampc.placeholder_asset_attribute.modified_by_user_id = uam.user.user_id |
ModifiedByUserFullName |
uam.user |
full_name |
character varying(200) |
False |
|
ampc.placeholder_asset_attribute.modified_by_user_id = uam.user.user_id |
ModifiedOn |
ampc.placeholder_asset_attribute |
modified_on |
timestamp without time zone |
False |
|
|
PermissionTreeId |
ampc.placeholder_asset_attribute |
permission_tree_id |
bigint |
False |
|
|
PermissionTreeCode |
uam.permission_tree |
code |
text |
False |
|
ampc.placeholder_asset_attribute.permission_tree_id = uam.permission_tree.permission_tree_id |
PermissionTreeDescription |
uam.permission_tree |
description |
text |
True |
|
ampc.placeholder_asset_attribute.permission_tree_id = uam.permission_tree.permission_tree_id |
Version |
ampc.placeholder_asset_attribute |
version |
integer |
False |
|
|
Id |
ampc.placeholder_asset_attribute |
placeholder_asset_attribute_id |
bigint |
False |
True |
|
AttributeId |
ampc.placeholder_asset_attribute |
attribute_id |
bigint |
False |
|
|
AttributeCode |
gen.attribute |
code |
character varying(50) |
False |
|
ampc.placeholder_asset_attribute.attribute_id = gen.attribute.attribute_id |
AttributeDescription |
gen.attribute |
description |
character varying(100) |
False |
|
ampc.placeholder_asset_attribute.attribute_id = gen.attribute.attribute_id |
AttributeAllowAnyValue |
gen.attribute |
allow_any_value |
boolean |
False |
|
ampc.placeholder_asset_attribute.attribute_id = gen.attribute.attribute_id |
AttributeDataType |
gen.attribute |
data_type |
system.dynamic_value_data_type |
False |
|
ampc.placeholder_asset_attribute.attribute_id = gen.attribute.attribute_id |
AttributeDefaultValue |
gen.attribute |
default_value |
system.dynamic_value |
True |
|
ampc.placeholder_asset_attribute.attribute_id = gen.attribute.attribute_id |
AttributeDefaultAllowedValueId |
gen.attribute_allowed_value |
attribute_allowed_value_id |
bigint |
False |
True |
ampc.placeholder_asset_attribute.attribute_id = gen.attribute.attribute_id Then
gen.attribute.default_allowed_value_id = gen.attribute_allowed_value.attribute_allowed_value_id |
AttributeDefaultAllowedValueDescription |
gen.attribute_allowed_value |
description |
text |
True |
|
ampc.placeholder_asset_attribute.attribute_id = gen.attribute.attribute_id Then
gen.attribute.default_allowed_value_id = gen.attribute_allowed_value.attribute_allowed_value_id |
AttributeDefaultAllowedValueValue |
gen.attribute_allowed_value |
value |
system.dynamic_value |
False |
|
ampc.placeholder_asset_attribute.attribute_id = gen.attribute.attribute_id Then
gen.attribute.default_allowed_value_id = gen.attribute_allowed_value.attribute_allowed_value_id |
Notes |
ampc.placeholder_asset_attribute |
notes |
text |
True |
|
|
PredefinedValueId |
ampc.placeholder_asset_attribute |
attribute_value_id |
bigint |
True |
|
|
PredefinedValueDescription |
gen.attribute_allowed_value |
description |
text |
True |
|
ampc.placeholder_asset_attribute.attribute_value_id = gen.attribute_allowed_value.attribute_allowed_value_id |
PredefinedValueValue |
gen.attribute_allowed_value |
value |
system.dynamic_value |
False |
|
ampc.placeholder_asset_attribute.attribute_value_id = gen.attribute_allowed_value.attribute_allowed_value_id |
SequenceNumber |
ampc.placeholder_asset_attribute |
sequence_number |
integer |
True |
|
|
Value |
ampc.placeholder_asset_attribute |
attribute_value |
system.dynamic_value |
True |
|
|
Enumerations
Mapping 1
| Property |
Property Type |
Db Column |
Db Column Type |
Db Column Values |
| DevelopmentStatus |
AssetDevelopmentStatus |
development_status |
ampc.asset_development_status |
NewAwaitingConfirmation
ModifiedAwaitingConfirmation
DeletedAwaitingConfirmation
DeletedConfirmed
Confirmed
NewUnderDevelopment
ModifiedUnderDevelopment
|
Mapping 2
| Property |
Property Type |
Db Column |
Db Column Type |
Db Column Values |
| AttributeDataType |
DynamicValueType |
data_type |
system.dynamic_value_data_type |
String
Email
Integer
Long
Float
Currency
DateTime
Date
Time
Duration
Boolean
|
Composites
Mapping 1
| Property |
Property Type |
Db Column |
Db Column Type |
| AttributeDefaultValue |
DbDynamicValue |
default_value |
system.dynamic_value |
| Composite Property |
Db Composite Column |
Property Type |
Type |
type |
String
Email
Integer
Long
Float
Currency
DateTime
Date
Time
Duration
Boolean
|
Value |
value |
String |
Mapping 2
| Property |
Property Type |
Db Column |
Db Column Type |
| AttributeDefaultAllowedValueValue |
DbDynamicValue |
value |
system.dynamic_value |
| Composite Property |
Db Composite Column |
Property Type |
Type |
type |
String
Email
Integer
Long
Float
Currency
DateTime
Date
Time
Duration
Boolean
|
Value |
value |
String |
Mapping 3
| Property |
Property Type |
Db Column |
Db Column Type |
| PredefinedValueValue |
DbDynamicValue |
value |
system.dynamic_value |
| Composite Property |
Db Composite Column |
Property Type |
Type |
type |
String
Email
Integer
Long
Float
Currency
DateTime
Date
Time
Duration
Boolean
|
Value |
value |
String |
Mapping 4
| Property |
Property Type |
Db Column |
Db Column Type |
| Value |
DbDynamicValue |
attribute_value |
system.dynamic_value |
| Composite Property |
Db Composite Column |
Property Type |
Type |
type |
String
Email
Integer
Long
Float
Currency
DateTime
Date
Time
Duration
Boolean
|
Value |
value |
String |
Queries
The list of example Placeholder Asset Attribute queries can be interpreted using the following legend:
| Legend |
Description |
| Primary Table Alias |
The alias for the ampc.placeholder_asset_attribute 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 |
_paa |
False |
False |
SELECT
_paa.inherited_from_id AS "InheritedFromId",
_paa.asset_id AS "PlaceholderAssetId",
_paa.development_status AS "DevelopmentStatus",
_paa.is_proposed AS "IsProposed",
_paa.last_confirmed_change_log_id AS "LastConfirmedChangeLogId",
_paa.last_confirmed_on AS "LastConfirmedOn",
_paa.synchronised_with_type_object_up_to AS "SynchronisedWithTypeObjectUpTo",
_paa.is_historical AS "IsHistorical",
_paa.unsynchronised AS "Unsynchronised",
_paa.is_inherited AS "IsInherited",
_paa.created_by_user_id AS "CreatedByUserId",
_paa.created_on AS "CreatedOn",
_paa.is_active AS "IsActive",
_paa.modified_by_user_id AS "ModifiedByUserId",
_paa.modified_on AS "ModifiedOn",
_paa.permission_tree_id AS "PermissionTreeId",
_paa.version AS "Version",
_paa.placeholder_asset_attribute_id AS "Id",
_paa.attribute_id AS "AttributeId",
_paa.notes AS "Notes",
_paa.attribute_value_id AS "PredefinedValueId",
_paa.sequence_number AS "SequenceNumber",
_paa.attribute_value AS "Value"
FROM
ampc.placeholder_asset_attribute _paa
Query 2
| Primary Table Alias |
Include References |
Include Permissions |
_paa |
True |
False |
SELECT
_pata.placeholder_asset_type_attribute_id AS "InheritedFromId",
_a.asset_id AS "PlaceholderAssetId",
_a.code AS "PlaceholderAssetCode",
_a.description AS "PlaceholderAssetDescription",
_paa.development_status AS "DevelopmentStatus",
_paa.is_proposed AS "IsProposed",
_paa.last_confirmed_change_log_id AS "LastConfirmedChangeLogId",
_paa.last_confirmed_on AS "LastConfirmedOn",
_paa.synchronised_with_type_object_up_to AS "SynchronisedWithTypeObjectUpTo",
_paa.is_historical AS "IsHistorical",
_paa.unsynchronised AS "Unsynchronised",
_paa.is_inherited AS "IsInherited",
_u.user_id AS "CreatedByUserId",
_u.code AS "CreatedByUserCode",
_u.full_name AS "CreatedByUserFullName",
_paa.created_on AS "CreatedOn",
_paa.is_active AS "IsActive",
_u1.user_id AS "ModifiedByUserId",
_u1.code AS "ModifiedByUserCode",
_u1.full_name AS "ModifiedByUserFullName",
_paa.modified_on AS "ModifiedOn",
_pt.permission_tree_id AS "PermissionTreeId",
_pt.code AS "PermissionTreeCode",
_pt.description AS "PermissionTreeDescription",
_paa.version AS "Version",
_paa.placeholder_asset_attribute_id AS "Id",
_a1.attribute_id AS "AttributeId",
_a1.code AS "AttributeCode",
_a1.description AS "AttributeDescription",
_a1.allow_any_value AS "AttributeAllowAnyValue",
_a1.data_type AS "AttributeDataType",
_a1.default_value AS "AttributeDefaultValue",
_a1.default_allowed_value_id AS "AttributeDefaultAllowedValue",
_aav.attribute_allowed_value_id AS "AttributeDefaultAllowedValueId",
_aav.description AS "AttributeDefaultAllowedValueDescription",
_aav.value AS "AttributeDefaultAllowedValueValue",
_paa.notes AS "Notes",
_aav1.attribute_allowed_value_id AS "PredefinedValueId",
_aav1.description AS "PredefinedValueDescription",
_aav1.value AS "PredefinedValueValue",
_paa.sequence_number AS "SequenceNumber",
_paa.attribute_value AS "Value"
FROM
ampc.placeholder_asset_attribute _paa
LEFT JOIN ampc.placeholder_asset_type_attribute _pata ON _paa.inherited_from_id = _pata.placeholder_asset_type_attribute_id
JOIN ampc.asset _a ON _paa.asset_id = _a.asset_id
JOIN uam.user _u ON _paa.created_by_user_id = _u.user_id
JOIN uam.user _u1 ON _paa.modified_by_user_id = _u1.user_id
JOIN uam.permission_tree _pt ON _paa.permission_tree_id = _pt.permission_tree_id
JOIN gen.attribute _a1 ON _paa.attribute_id = _a1.attribute_id
LEFT JOIN gen.attribute_allowed_value _aav ON _a1.default_allowed_value_id = _aav.attribute_allowed_value_id
LEFT JOIN gen.attribute_allowed_value _aav1 ON _paa.attribute_value_id = _aav1.attribute_allowed_value_id
Query 3
| Primary Table Alias |
Include References |
Include Permissions |
_paa |
False |
True |
| Parameter Name |
Data Type |
Value |
@permission_user_id |
Bigint |
500000000000 |
@permission_id |
Bigint |
10012200 |
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
_paa.inherited_from_id AS "InheritedFromId",
_paa.asset_id AS "PlaceholderAssetId",
_paa.development_status AS "DevelopmentStatus",
_paa.is_proposed AS "IsProposed",
_paa.last_confirmed_change_log_id AS "LastConfirmedChangeLogId",
_paa.last_confirmed_on AS "LastConfirmedOn",
_paa.synchronised_with_type_object_up_to AS "SynchronisedWithTypeObjectUpTo",
_paa.is_historical AS "IsHistorical",
_paa.unsynchronised AS "Unsynchronised",
_paa.is_inherited AS "IsInherited",
_paa.created_by_user_id AS "CreatedByUserId",
_paa.created_on AS "CreatedOn",
_paa.is_active AS "IsActive",
_paa.modified_by_user_id AS "ModifiedByUserId",
_paa.modified_on AS "ModifiedOn",
_paa.permission_tree_id AS "PermissionTreeId",
_paa.version AS "Version",
_paa.placeholder_asset_attribute_id AS "Id",
_paa.attribute_id AS "AttributeId",
_paa.notes AS "Notes",
_paa.attribute_value_id AS "PredefinedValueId",
_paa.sequence_number AS "SequenceNumber",
_paa.attribute_value AS "Value",
_paa.permission_tree_id AS "_paa_permission_tree_id"
FROM
ampc.placeholder_asset_attribute _paa
JOIN permission_tree_ids permission_join ON _paa.permission_tree_id = permission_join.permission_tree_id
Query 4
| Primary Table Alias |
Include References |
Include Permissions |
_paa |
True |
True |
| Parameter Name |
Data Type |
Value |
@permission_user_id |
Bigint |
500000000000 |
@permission_id |
Bigint |
10012200 |
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
_pata.placeholder_asset_type_attribute_id AS "InheritedFromId",
_a.asset_id AS "PlaceholderAssetId",
_a.code AS "PlaceholderAssetCode",
_a.description AS "PlaceholderAssetDescription",
_paa.development_status AS "DevelopmentStatus",
_paa.is_proposed AS "IsProposed",
_paa.last_confirmed_change_log_id AS "LastConfirmedChangeLogId",
_paa.last_confirmed_on AS "LastConfirmedOn",
_paa.synchronised_with_type_object_up_to AS "SynchronisedWithTypeObjectUpTo",
_paa.is_historical AS "IsHistorical",
_paa.unsynchronised AS "Unsynchronised",
_paa.is_inherited AS "IsInherited",
_u.user_id AS "CreatedByUserId",
_u.code AS "CreatedByUserCode",
_u.full_name AS "CreatedByUserFullName",
_paa.created_on AS "CreatedOn",
_paa.is_active AS "IsActive",
_u1.user_id AS "ModifiedByUserId",
_u1.code AS "ModifiedByUserCode",
_u1.full_name AS "ModifiedByUserFullName",
_paa.modified_on AS "ModifiedOn",
_pt.permission_tree_id AS "PermissionTreeId",
_pt.code AS "PermissionTreeCode",
_pt.description AS "PermissionTreeDescription",
_paa.version AS "Version",
_paa.placeholder_asset_attribute_id AS "Id",
_a1.attribute_id AS "AttributeId",
_a1.code AS "AttributeCode",
_a1.description AS "AttributeDescription",
_a1.allow_any_value AS "AttributeAllowAnyValue",
_a1.data_type AS "AttributeDataType",
_a1.default_value AS "AttributeDefaultValue",
_a1.default_allowed_value_id AS "AttributeDefaultAllowedValue",
_aav.attribute_allowed_value_id AS "AttributeDefaultAllowedValueId",
_aav.description AS "AttributeDefaultAllowedValueDescription",
_aav.value AS "AttributeDefaultAllowedValueValue",
_paa.notes AS "Notes",
_aav1.attribute_allowed_value_id AS "PredefinedValueId",
_aav1.description AS "PredefinedValueDescription",
_aav1.value AS "PredefinedValueValue",
_paa.sequence_number AS "SequenceNumber",
_paa.attribute_value AS "Value",
_paa.permission_tree_id AS "_paa_permission_tree_id",
_pata.permission_tree_id AS "_pata_permission_tree_id",
_a.permission_tree_id AS "_a_permission_tree_id",
_u.permission_tree_id AS "_u_permission_tree_id",
_u1.permission_tree_id AS "_u1_permission_tree_id",
_a1.permission_tree_id AS "_a1_permission_tree_id",
_aav.permission_tree_id AS "_aav_permission_tree_id",
_aav1.permission_tree_id AS "_aav1_permission_tree_id"
FROM
ampc.placeholder_asset_attribute _paa
JOIN permission_tree_ids permission_join ON _paa.permission_tree_id = permission_join.permission_tree_id
LEFT JOIN ampc.placeholder_asset_type_attribute _pata ON _paa.inherited_from_id = _pata.placeholder_asset_type_attribute_id
JOIN ampc.asset _a ON _paa.asset_id = _a.asset_id
JOIN uam.user _u ON _paa.created_by_user_id = _u.user_id
JOIN uam.user _u1 ON _paa.modified_by_user_id = _u1.user_id
JOIN uam.permission_tree _pt ON _paa.permission_tree_id = _pt.permission_tree_id
JOIN gen.attribute _a1 ON _paa.attribute_id = _a1.attribute_id
LEFT JOIN gen.attribute_allowed_value _aav ON _a1.default_allowed_value_id = _aav.attribute_allowed_value_id
LEFT JOIN gen.attribute_allowed_value _aav1 ON _paa.attribute_value_id = _aav1.attribute_allowed_value_id