org.teiid.query.mapping.xml
Class MappingRecursiveElement

java.lang.Object
  extended by org.teiid.query.mapping.xml.MappingNode
      extended by org.teiid.query.mapping.xml.MappingBaseNode
          extended by org.teiid.query.mapping.xml.MappingElement
              extended by org.teiid.query.mapping.xml.MappingRecursiveElement
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class MappingRecursiveElement
extends MappingElement

A element which specifies a recursive element inside and xml schema. A recursive element is that embeds the self node type of elements upto given depth limit.

See Also:
Serialized Form

Constructor Summary
MappingRecursiveElement(java.lang.String name, Namespace namespace, java.lang.String mappingClass)
           
MappingRecursiveElement(java.lang.String name, java.lang.String mappingClass)
           
 
Method Summary
 void acceptVisitor(MappingVisitor visitor)
           
 java.lang.String getCriteria()
          Get the re-currsion criteria; not to be consufused with criteria on the MappingCriteria element
 Criteria getCriteriaNode()
           
 java.util.List getGroupsInCriteria()
           
 java.lang.String getMappingClass()
           
 int getRecursionLimit()
           
 boolean isRecursive()
          Is recursice
 MappingRecursiveElement setCriteria(java.lang.String criteria)
          Sets the criteria on which the recurrsion must occur
 void setCriteriaNode(Criteria node)
          This is parsed and resolved criteria node based on the criteria string.
 void setGroupsInCriteria(java.util.List criteriaGroups)
          Groups that are referenced inthe criteria string.
 MappingRecursiveElement setRecursionLimit(int depth, boolean execeptionOnBreach)
          Sets limit on how deep the recurrsion is allowed to occur in result document.
 boolean throwExceptionOnRecurrsionLimit()
           
 
Methods inherited from class org.teiid.query.mapping.xml.MappingElement
addAttribute, addCommentNode, addNamespace, addSibilingElement, getAttributes, getDefaultValue, getElementSymbol, getName, getNameInSource, getNamespace, getNamespacePrefix, getNamespaces, getNamespacesAsProperties, getNormalizeText, getSourceNode, getType, getValue, hasAttributes, isAlwaysInclude, isNillable, isOptional, isTagRoot, removeAttribute, setAlwaysInclude, setDefaultValue, setElementSymbol, setNameInSource, setNamespaces, setNillable, setNormalizeText, setOptional, setType, setValue
 
Methods inherited from class org.teiid.query.mapping.xml.MappingBaseNode
addAllNode, addChildElement, addChoiceNode, addCriteriaNode, addSequenceNode, addSourceNode, addStagingTable, getCanonicalName, getDocument, getMaxOccurence, getMinOccurence, getParentNode, getRecursionId, getSource, getStagingTables, isDocumentNode, isRootRecursiveNode, removeChildNode, setMaxOccurrs, setMinOccurrs, setSource, setStagingTables
 
Methods inherited from class org.teiid.query.mapping.xml.MappingNode
addChild, equals, findNode, getChildren, getChildren, getFullyQualifiedName, getNodeChildren, getNodeProperties, getParent, getPathName, getProperty, hashCode, isExcluded, printMappingNodeTree, setExclude, toString, toStringNodeTree
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MappingRecursiveElement

public MappingRecursiveElement(java.lang.String name,
                               java.lang.String mappingClass)

MappingRecursiveElement

public MappingRecursiveElement(java.lang.String name,
                               Namespace namespace,
                               java.lang.String mappingClass)
Method Detail

acceptVisitor

public void acceptVisitor(MappingVisitor visitor)
Overrides:
acceptVisitor in class MappingElement

isRecursive

public boolean isRecursive()
Is recursice

Overrides:
isRecursive in class MappingElement
See Also:
MappingElement.isRecursive()

setCriteria

public MappingRecursiveElement setCriteria(java.lang.String criteria)
Sets the criteria on which the recurrsion must occur


setRecursionLimit

public MappingRecursiveElement setRecursionLimit(int depth,
                                                 boolean execeptionOnBreach)
Sets limit on how deep the recurrsion is allowed to occur in result document. If the execeptionOnBreach is set to true, if the limit rules are violated then exception will be thrown, otherwise re-currsion will stop at the depth specified.


getMappingClass

public java.lang.String getMappingClass()

getCriteria

public java.lang.String getCriteria()
Get the re-currsion criteria; not to be consufused with criteria on the MappingCriteria element

Returns:

getRecursionLimit

public int getRecursionLimit()

throwExceptionOnRecurrsionLimit

public boolean throwExceptionOnRecurrsionLimit()

setGroupsInCriteria

public void setGroupsInCriteria(java.util.List criteriaGroups)
Groups that are referenced inthe criteria string. This is set by ValidateMappedCriteriaVisitor class during the preplan.

Parameters:
criteriaGroups -

getGroupsInCriteria

public java.util.List getGroupsInCriteria()

setCriteriaNode

public void setCriteriaNode(Criteria node)
This is parsed and resolved criteria node based on the criteria string. This is set by ValidateMappedCriteriaVisitor class during pre planning.

Parameters:
node -

getCriteriaNode

public Criteria getCriteriaNode()


Copyright © 2010. All Rights Reserved.