fri.util.database.jpa.tree.closuretable.uniqueconstraints
Class UniqueWholeTreeConstraintImpl

java.lang.Object
  extended by fri.util.database.jpa.tree.uniqueconstraints.AbstractUniqueTreeConstraintImpl<N>
      extended by fri.util.database.jpa.tree.uniqueconstraints.AbstractWholeTreeUniqueConstraintImpl<ClosureTableTreeNode>
          extended by fri.util.database.jpa.tree.closuretable.uniqueconstraints.UniqueWholeTreeConstraintImpl
All Implemented Interfaces:
UniqueTreeConstraint<ClosureTableTreeNode>
Direct Known Subclasses:
UniqueChildrenConstraintImpl, UniqueWholeTreeTemporalConstraintImpl

public class UniqueWholeTreeConstraintImpl
extends AbstractWholeTreeUniqueConstraintImpl<ClosureTableTreeNode>

Unique nodes related to the whole tree. Defines the JPQL statements for super-class.

Author:
Fritz Ritzberger, 25.10.2012

Field Summary
 
Fields inherited from class fri.util.database.jpa.tree.uniqueconstraints.AbstractUniqueTreeConstraintImpl
shouldCheckRootsForUniqueness, uniquePropertyNames
 
Constructor Summary
UniqueWholeTreeConstraintImpl(java.lang.String[][] uniquePropertyNames, boolean shouldCheckRootsForUniqueness)
          See super-class constructor.
 
Method Summary
protected  void appendNodeCheckingCondition(ClosureTableTreeNode root, java.lang.StringBuilder queryText, java.util.List<java.lang.Object> parameters)
           
protected  void appendRootCheckingCondition(java.lang.StringBuilder queryText, java.util.List<java.lang.Object> parameters)
           
protected  java.lang.String fromClause()
           
protected  java.lang.String getNodeTableAlias()
           
protected  java.lang.String getPathTableAlias()
           
 
Methods inherited from class fri.util.database.jpa.tree.uniqueconstraints.AbstractWholeTreeUniqueConstraintImpl
checkUniqueConstraint
 
Methods inherited from class fri.util.database.jpa.tree.uniqueconstraints.AbstractUniqueTreeConstraintImpl
appendUniquenessConditions, appendUpdateCondition, beforeCheckUniqueness, checkUniqueChildrenConstraint, checkUniqueWholeTreeConstraint, equal, getDao, getNodeValueForProperty, getSession, isDifferent, isRootsCheck, nodeEntityName, pathEntityName, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueWholeTreeConstraintImpl

public UniqueWholeTreeConstraintImpl(java.lang.String[][] uniquePropertyNames,
                                     boolean shouldCheckRootsForUniqueness)
See super-class constructor.

Method Detail

getNodeTableAlias

protected java.lang.String getNodeTableAlias()
Specified by:
getNodeTableAlias in class AbstractUniqueTreeConstraintImpl<ClosureTableTreeNode>
Returns:
the node table alias (not the path table alias!) to be used for appending unique constraint conditions.

getPathTableAlias

protected java.lang.String getPathTableAlias()

fromClause

protected java.lang.String fromClause()
Specified by:
fromClause in class AbstractUniqueTreeConstraintImpl<ClosureTableTreeNode>
Returns:
the FROM clause contents, not starting with "from", but closing with "where" or "and".

appendRootCheckingCondition

protected void appendRootCheckingCondition(java.lang.StringBuilder queryText,
                                           java.util.List<java.lang.Object> parameters)
Specified by:
appendRootCheckingCondition in class AbstractUniqueTreeConstraintImpl<ClosureTableTreeNode>

appendNodeCheckingCondition

protected void appendNodeCheckingCondition(ClosureTableTreeNode root,
                                           java.lang.StringBuilder queryText,
                                           java.util.List<java.lang.Object> parameters)
Specified by:
appendNodeCheckingCondition in class AbstractUniqueTreeConstraintImpl<ClosureTableTreeNode>