Class AnyToAnyDataLoader

    • Constructor Detail

      • AnyToAnyDataLoader

        public AnyToAnyDataLoader​(String linkName,
                                  Item linkType,
                                  Metadata.PropertyPath<BasicItem,​?> propertyPath)
        Load links with the specified name and target type. If not link type or property path is given, only the ID of the target item is returned.
        Parameters:
        linkName - Name of the any-to-any link (required)
        linkType - Target item type of the link (optional)
        propertyPath - Property of the target item to load (optional)
    • Method Detail

      • create

        public static AnyToAnyDataLoader create​(String linkName,
                                                Item linkType,
                                                String linkProperty)
        Create a new data loader that load a value from an any-to-any link.
        Parameters:
        linkName - Name of the any-to-any link (required)
        linkType - Target item type of the link (optional)
        linkProperty - Property of the target item to load (optional)
      • getLinkedItem

        public BasicItem getLinkedItem​(DbControl dc,
                                       BasicItem item)
        Get the item that is linked to by this any-to-any link definition.
        Returns:
        The linked item or null if no item exists or if the item is not of the correct target type