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

public class DataItem extends Object implements DataNode
A simple java attribute or property of a PDO.
Such as
String blah = "some text"
  • Constructor Details

    • DataItem

      public DataItem(String type, String name, Object value, String comment, Attribute attribute, boolean idOfCompositeRelation, NonCompositeRelation nonCompositeRelation)
      Creates a DataItem.
      Parameters:
      type - the type basename
      name - the property name
      value - the property value, may be null
      comment - the optional comment
      attribute - the model attribute, null if not in model
      idOfCompositeRelation - true if this an ID of a composite object relation
      nonCompositeRelation - the non-composite relation, may be null
  • Method Details

    • getType

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

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

      public String getValue()
      Gets the property value, may be null.
      Specified by:
      getValue in interface DataNode
      Returns:
      the property value, may be null
    • getOrgValue

      public Object getOrgValue()
      Gets the original object of the displayed value.
      Returns:
      the value, may be null
    • getComment

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

      public List<DataNode> getNodes()
      Description copied from interface: DataNode
      Gets the optional subnodes of this node.
      Specified by:
      getNodes in interface DataNode
      Returns:
      the nodes, null if this node has no subnodes
    • getAttribute

      public Attribute getAttribute()
      Gets the associated attribute in the model.
      Notice that some items have no model equivalent, such as classId.
      Returns:
      the attribute, null if not in model
    • isIdOfCompositeRelation

      public boolean isIdOfCompositeRelation()
      Returns whether this the ID of a composite object relation.
      Returns:
      true if skip in code generation
    • getNonCompositeRelation

      public NonCompositeRelation getNonCompositeRelation()
      Gets the optional object relation.
      Returns:
      the non-composite 1:1 relation, null if none
    • 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