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
ConstructorsConstructorDescriptionDataItem(String type, String name, Object value, String comment, Entity entity, Attribute attribute, boolean idOfCompositeRelation, NonCompositeRelation nonCompositeRelation, SqlCondition sqlCondition) Creates a DataItem. -
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.Gets the entity this node belongs to.getName()Gets the property name.getNodes()Gets the optional sub nodes of this node.Gets the optional object relation.Gets the original object of the displayed value.Returns the SQL select configuration for the where clause.getType()Gets the type basename.getValue()Gets the property value, may be null.booleanDetermines whether this attribute is a counter for a composite list relation.
Used by the code generator to skip such items.booleanisHidden()Gets the hidden flag.booleanReturns whether this the ID of a composite object relation.booleanisKey()Returns whether this item is part of the unique domain key.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, Entity entity, Attribute attribute, boolean idOfCompositeRelation, NonCompositeRelation nonCompositeRelation, SqlCondition sqlCondition) Creates a DataItem.- Parameters:
type- the type basenamename- the property namevalue- the property value, may be nullcomment- the optional commententity- the effective entityattribute- the model attribute, null if not in modelidOfCompositeRelation- true if this an ID of a composite object relationnonCompositeRelation- the non-composite relation, may be nullsqlCondition- the SQL where condition
-
-
Method Details
-
getType
Gets the type basename. -
getName
Gets the property name. -
isHidden
public boolean isHidden()Description copied from interface:DataNodeGets the hidden flag. -
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 sub nodes 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
-
getEntity
Description copied from interface:DataNodeGets the entity this node belongs to. -
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
-
getSqlCondition
Description copied from interface:DataNodeReturns the SQL select configuration for the where clause.- Specified by:
getSqlConditionin interfaceDataNode- Returns:
- the sql config
-
isCounterForListRelation
public boolean isCounterForListRelation()Determines whether this attribute is a counter for a composite list relation.
Used by the code generator to skip such items.- Returns:
- true if counter
-
isKey
public boolean isKey()Returns whether this item is part of the unique domain key.- Returns:
- true if key
-
toString
-