Class DataItem
java.lang.Object
org.tentackle.maven.plugin.wizard.pdodata.DataItem
- All Implemented Interfaces:
DataNode
A simple java attribute or property of a PDO.
Such as
Such as
String blah = "some text"
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the associated attribute in the model.
Notice that some items have no model equivalent, such as classId.The optional comment.Gets the optional configuration path.getName()Gets the property name.getNodes()Gets the optional subnodes of this node.Gets the optional object relation.Gets the original object of the displayed value.getType()Gets the type basename.getValue()Gets the property value, may be null.booleanReturns whether this the ID of a composite object relation.voidsetConfigurationPath(String configurationPath) Sets the optional configuration path.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.tentackle.maven.plugin.wizard.pdodata.DataNode
getNodeType
-
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 basenamename- the property namevalue- the property value, may be nullcomment- the optional commentattribute- the model attribute, null if not in modelidOfCompositeRelation- true if this an ID of a composite object relationnonCompositeRelation- the non-composite relation, may be null
-
-
Method Details
-
getType
Gets the type basename. -
getName
Gets the property name. -
getValue
Gets the property value, may be null. -
getOrgValue
Gets the original object of the displayed value.- Returns:
- the value, may be null
-
getComment
Description copied from interface:DataNodeThe optional comment.- Specified by:
getCommentin interfaceDataNode- Returns:
- the comment, null if none
-
getNodes
Description copied from interface:DataNodeGets the optional subnodes of this node. -
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
Gets the optional object relation.- Returns:
- the non-composite 1:1 relation, null if none
-
setConfigurationPath
Description copied from interface:DataNodeSets the optional configuration path.- Specified by:
setConfigurationPathin interfaceDataNode- Parameters:
configurationPath- the path
-
getConfigurationPath
Description copied from interface:DataNodeGets the optional configuration path.- Specified by:
getConfigurationPathin interfaceDataNode- Returns:
- the path, null if none
-
toString
-