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

public class DataObject extends Object implements DataNode
A PDO object.
Such as
Message blah = [1256668/1]
  • Constructor Details

    • DataObject

      public DataObject(org.tentackle.pdo.PersistentDomainObject<?> pdo, String name, String comment, List<DataNode> nodes, Entity entity, Relation relation, NonCompositeRelation nmRelation, boolean hidden, SqlCondition sqlCondition)
      Creates a DataObject.
      Parameters:
      pdo - the PDO
      name - the object name, null if root entity or list member
      comment - the optional comment
      nodes - the items of the object, null if reference is null
      entity - the entity of this object
      relation - the composite object 1:1 relation
      nmRelation - optional N:M relation
      hidden - true if object is hidden (no public method available)
      sqlCondition - the SQL where condition
  • Method Details

    • getPdo

      public org.tentackle.pdo.PersistentDomainObject<?> getPdo()
      Gets the PDO.
      Returns:
      the PDO
    • getType

      public String getType()
      Gets the object type basename.
      Specified by:
      getType in interface DataNode
      Returns:
      the object type basename
    • getName

      public String getName()
      Gets the object name, null if root entity.
      Specified by:
      getName in interface DataNode
      Returns:
      the object name, null if root entity
    • 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)
    • 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
    • getId

      public long getId()
      Gets the object ID.
      Returns:
      the object ID
    • getSerial

      public long getSerial()
      Gets the object serial.
      Returns:
      the object serial
    • getNodes

      public List<DataNode> getNodes()
      Gets the items of the object, null if reference is null.
      Specified by:
      getNodes in interface DataNode
      Returns:
      the items of the object, null if reference is null
    • getEntity

      public Entity getEntity()
      Gets the entity of this object.
      Specified by:
      getEntity in interface DataNode
      Returns:
      the entity
    • getRelation

      public Relation getRelation()
      Gets the 1:1 composite object relation.
      Returns:
      the relation
    • getNmRelation

      public NonCompositeRelation getNmRelation()
      Gets the optional N:M relation.
      Returns:
      the relation, null if none
    • 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
    • setDataList

      public void setDataList(DataList dataList, int listIndex)
      Sets the parent datalist and the index if this is a list element.
      Parameters:
      dataList - the data list
      listIndex - the list index
    • toString

      public String toString()
      Overrides:
      toString in class Object