Class DataList
java.lang.Object
org.tentackle.maven.plugin.wizard.pdodata.DataList
- All Implemented Interfaces:
DataNode
A list of PDOs.
Such as
Such as
List<Message> messages = [12]
-
Constructor Summary
ConstructorsConstructorDescriptionDataList(String genericType, String name, String comment, List<DataObject> nodes, Relation relation, SqlCondition sqlCondition) Creates a DataList. -
Method Summary
Modifier and TypeMethodDescriptionThe optional comment.Gets the optional configuration path.Gets the entity this node belongs to.Gets the inner generic type.getName()Gets the name of the list property.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.Gets the composite list relation.Returns the SQL select configuration for the where clause.getType()Returns the type of the node.
Can be any Java type, classname (w/o package) including optional generics.
Example:getValue()Returns the value of the node.
This is usually thetoStringvalue.booleanisHidden()Gets the hidden flag.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
-
DataList
public DataList(String genericType, String name, String comment, List<DataObject> nodes, Relation relation, SqlCondition sqlCondition) Creates a DataList.- Parameters:
genericType- the inner generic typename- the name of the list propertycomment- the optional commentnodes- the items of the listrelation- the composite list relationsqlCondition- the SQL where condition
-
-
Method Details
-
getGenericType
Gets the inner generic type.- Returns:
- the inner generic type
-
getName
Gets the name of the list property. -
getComment
Description copied from interface:DataNodeThe optional comment.- Specified by:
getCommentin interfaceDataNode- Returns:
- the comment, null if none
-
isHidden
public boolean isHidden()Description copied from interface:DataNodeGets the hidden flag. -
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. -
getSqlCondition
Description copied from interface:DataNodeReturns the SQL select configuration for the where clause.- Specified by:
getSqlConditionin interfaceDataNode- Returns:
- the sql config
-
getRelation
Gets the composite list relation.- Returns:
- the relation
-
getEntity
Description copied from interface:DataNodeGets the entity this node belongs to. -
getType
Description copied from interface:DataNodeReturns the type of the node.
Can be any Java type, classname (w/o package) including optional generics.
Example:List<Message>
-
getValue
Description copied from interface:DataNodeReturns the value of the node.
This is usually thetoStringvalue. For collections, it's the size. -
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
-