Class DFDataTrees


  • public final class DFDataTrees
    extends java.lang.Object
    Common utilities related to DFDataTree.
    Author:
    Petr Hamernik
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static DFDataTree createDataTree​(DFEntity rootEntity, java.lang.String dataTreeName, com.im.commons.progress.DFEnvironmentRW env)
      Creates a default data tree for the entity as a root.
      static java.util.Map<java.lang.String,​java.lang.Object> getDataForFirstSelectedRow​(DFDataTree dt, java.util.List<? extends DFField> fields)
      Gets value(s) of first selected rows in DFResultSet.VertexStates for given fields.
      • Methods inherited from class java.lang.Object

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

      • createDataTree

        public static DFDataTree createDataTree​(DFEntity rootEntity,
                                                java.lang.String dataTreeName,
                                                com.im.commons.progress.DFEnvironmentRW env)
        Creates a default data tree for the entity as a root.
        Parameters:
        rootEntity - Root entity for this new data tree
        dataTreeName - Name for a new data tree
        env - Environment
        Returns:
        newly created data tree
      • getDataForFirstSelectedRow

        public static java.util.Map<java.lang.String,​java.lang.Object> getDataForFirstSelectedRow​(DFDataTree dt,
                                                                                                        java.util.List<? extends DFField> fields)
        Gets value(s) of first selected rows in DFResultSet.VertexStates for given fields. If there is no selection in a VertexState no values are returned for associated fields.
        Warning: This method is not synchronized against selection change event. If you run this method during, or right after, selection change event, then this method might return inconsistent data. Data for fields from detail entities may contain values from previous selection. To get data from detail fields, driven by selection change event, use selection change listeners bound to vertex states, where given field(s) belongs to!
        Parameters:
        dt - DFDataTree which has to contain all entities for all given fields
        fields - fields for which data shall be fetched
        Returns:
        map of fields' IDs and values. May be empty for example when all selections are empty. Note that values of a map can be null.