java.lang.Object
org.tentackle.maven.plugin.wizard.pdodata.DataList
All Implemented Interfaces:
DataNode

public class DataList extends Object implements DataNode
A list of PDOs.
Such as
List<Message> messages = [12]
  • Constructor Details

    • DataList

      public DataList(String genericType, String name, String comment, List<DataObject> nodes, Relation relation, SqlCondition sqlCondition)
      Creates a DataList.
      Parameters:
      genericType - the inner generic type
      name - the name of the list property
      comment - the optional comment
      nodes - the items of the list
      relation - the composite list relation
      sqlCondition - the SQL where condition
  • Method Details

    • getGenericType

      public String getGenericType()
      Gets the inner generic type.
      Returns:
      the inner generic type
    • getName

      public String getName()
      Gets the name of the list property.
      Specified by:
      getName in interface DataNode
      Returns:
      the name of the list property
    • getComment

      public String getComment()
      Description copied from interface: DataNode
      The optional comment.
      Specified by:
      getComment in interface DataNode
      Returns:
      the comment, null if none
    • isHidden

      public boolean isHidden()
      Description copied from interface: DataNode
      Gets the hidden flag.
      Specified by:
      isHidden in interface DataNode
      Returns:
      true if object is hidden (no public method available)
    • getNodes

      public List<DataObject> getNodes()
      Gets the items of the list.
      For 1:N relations, the elements come in the same order as returned by the PDO's select method. For N:M relations, the elements are sorted by the toString-representation, since the N:M-link itself is just a technical detail.
      Specified by:
      getNodes in interface DataNode
      Returns:
      the items of the list
    • getSqlCondition

      public SqlCondition getSqlCondition()
      Description copied from interface: DataNode
      Returns the SQL select configuration for the where clause.
      Specified by:
      getSqlCondition in interface DataNode
      Returns:
      the sql config
    • getRelation

      public Relation getRelation()
      Gets the composite list relation.
      Returns:
      the relation
    • getEntity

      public Entity getEntity()
      Description copied from interface: DataNode
      Gets the entity this node belongs to.
      Specified by:
      getEntity in interface DataNode
      Returns:
      the entity
    • getType

      public String getType()
      Description copied from interface: DataNode
      Returns the type of the node.
      Can be any Java type, classname (w/o package) including optional generics.
      Example:
      List<Message>
      Specified by:
      getType in interface DataNode
      Returns:
      the type, never null and never empty
    • getValue

      public String getValue()
      Description copied from interface: DataNode
      Returns the value of the node.
      This is usually the toString value. For collections, it's the size.
      Specified by:
      getValue in interface DataNode
      Returns:
      the value, null if it's java value is null
    • setConfigurationPath

      public void setConfigurationPath(String configurationPath)
      Description copied from interface: DataNode
      Sets the optional configuration path.
      Specified by:
      setConfigurationPath in interface DataNode
      Parameters:
      configurationPath - the path
    • getConfigurationPath

      public String getConfigurationPath()
      Description copied from interface: DataNode
      Gets the optional configuration path.
      Specified by:
      getConfigurationPath in interface DataNode
      Returns:
      the path, null if none
    • toString

      public String toString()
      Overrides:
      toString in class Object