Class ModelCommentSupport


  • public class ModelCommentSupport
    extends java.lang.Object
    Support methods for model comment.
    Author:
    harald
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void printComponents​(java.util.Set<org.tentackle.model.Relation> allRelations, java.util.Collection<org.tentackle.model.Relation> compositeRelations, java.util.Collection<org.tentackle.model.Entity> subEntities, java.lang.String indent, java.io.PrintStream out)
      Recursively prints the components and sub-entities of an entity.
      static void printNonCompositeRelations​(org.tentackle.model.Entity entity, java.util.List<org.tentackle.model.Relation> relations, boolean rootsFromForeignEntity, java.lang.String indent, java.io.PrintStream out)
      Prints outgoing non-composite relations from components.
      static void printReferencedBy​(org.tentackle.model.Entity entity, org.tentackle.model.Relation relation, java.lang.String indent, java.io.PrintStream out)
      Prints the referencing relation.
      static void printSubEntities​(java.util.Collection<org.tentackle.model.Entity> subEntities, java.lang.String indent, java.io.PrintStream out)
      Recursively prints the sub-entities of an entity.
      static void printVia​(org.tentackle.model.Relation relation, java.io.PrintStream out)
      Prints the attribute holding the link.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • printVia

        public static void printVia​(org.tentackle.model.Relation relation,
                                    java.io.PrintStream out)
        Prints the attribute holding the link.
        Parameters:
        relation - the relation
        out - the output stream
      • printReferencedBy

        public static void printReferencedBy​(org.tentackle.model.Entity entity,
                                             org.tentackle.model.Relation relation,
                                             java.lang.String indent,
                                             java.io.PrintStream out)
        Prints the referencing relation.
        Parameters:
        entity - the referenced entity
        relation - the relation
        indent - the indent string
        out - the output stream
      • printComponents

        public static void printComponents​(java.util.Set<org.tentackle.model.Relation> allRelations,
                                           java.util.Collection<org.tentackle.model.Relation> compositeRelations,
                                           java.util.Collection<org.tentackle.model.Entity> subEntities,
                                           java.lang.String indent,
                                           java.io.PrintStream out)
        Recursively prints the components and sub-entities of an entity.
        Parameters:
        allRelations - set to avoid recursion loops
        compositeRelations - the composite relations
        subEntities - the sub entities
        indent - the indent string
        out - the output stream
      • printSubEntities

        public static void printSubEntities​(java.util.Collection<org.tentackle.model.Entity> subEntities,
                                            java.lang.String indent,
                                            java.io.PrintStream out)
        Recursively prints the sub-entities of an entity.
        Parameters:
        subEntities - the sub entities
        indent - the indent string
        out - the output stream
      • printNonCompositeRelations

        public static void printNonCompositeRelations​(org.tentackle.model.Entity entity,
                                                      java.util.List<org.tentackle.model.Relation> relations,
                                                      boolean rootsFromForeignEntity,
                                                      java.lang.String indent,
                                                      java.io.PrintStream out)
        Prints outgoing non-composite relations from components.
        Parameters:
        entity - the root entity
        relations - the outgoing relations
        rootsFromForeignEntity - true if print roots from relation.foreignEntity else relation.entity
        indent - the indent string
        out - the output stream