Class VirtualizedItem<PROPCNR extends PropCnr>


  • public class VirtualizedItem<PROPCNR extends PropCnr>
    extends java.lang.Object
    Data container for a virtualized property container.
    Author:
    Christopher Mindus
    • Constructor Summary

      Constructors 
      Constructor Description
      VirtualizedItem​(java.lang.String reference, PROPCNR virtualizedProperty, PROPCNR originalProperty, long sequenceNumber)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <GP extends IGProp<?>>
      GP
      getOriginalChild​(GP virtualizedChild)
      Gets the original child property from a property located in the virtualized property container.
      <GP extends GProp<?>>
      GP
      getVirtualChild​(GP originalChild)
      Gets the virtualized child property from a property located in the original property container.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • reference

        public final java.lang.String reference
        The reference property name, same as originalProperty.getReferencePropName().
      • fullPathName

        public final java.lang.String fullPathName
        The full path name of the property.
      • virtualizedProperty

        public final PROPCNR extends PropCnr virtualizedProperty
        The virtualized property. The Atom name of this property should not be used as it reflects the unique name in the flat structure of the virtuals container.
      • originalProperty

        public final PROPCNR extends PropCnr originalProperty
        The original property.
      • sequenceNumber

        public final long sequenceNumber
        The sequence number.
    • Constructor Detail

      • VirtualizedItem

        public VirtualizedItem​(java.lang.String reference,
                               PROPCNR virtualizedProperty,
                               PROPCNR originalProperty,
                               long sequenceNumber)
        Constructor.
        Parameters:
        reference - The reference property name.
        virtualizedProperty - The virtualized property.
        originalProperty - The original property.
        sequenceNumber - The sequence number.
    • Method Detail

      • getVirtualChild

        public <GP extends GProp<?>> GP getVirtualChild​(GP originalChild)
        Gets the virtualized child property from a property located in the original property container.

        If the originalChild is not a child of originalProperty a warning is logged.

        Parameters:
        originalChild - The original child, child of originalProperty.
        Returns:
        The virtualized child that corresponds, null for no match. This can happen when the virtual property tree has been modified. If a property with the same path is found, but not with the same property class, null is returned.
      • getOriginalChild

        public <GP extends IGProp<?>> GP getOriginalChild​(GP virtualizedChild)
        Gets the original child property from a property located in the virtualized property container.

        If the virtualizedChild is not a child of virtualizedProperty a warning is logged.

        Parameters:
        virtualizedChild - The virtualized child, child of virtualizedProperty.
        Returns:
        The original child that corresponds, null for no match. This can happen when the virtual property tree has been modified. If a property with the same path is found, but not with the same property class, null is returned.