docs: public static String buildSequenceName(PersistenceBroker brokerForClass,
                                             FieldDescriptor field, boolean autoNaming)
              throws SequenceManagerException
      {
          String seqName = field.getSequenceName();
          /*
          if we found a sequence name bound to the field descriptor
          via 'sequence-name' attribute we use that name
          */
          if (seqName != null && seqName.trim().length() != 0)
          {
              return seqName;
          }
          else if (!autoNaming)
          {
              /*
              arminw:
              we don't find a sequence name and we should not automatic build one,
              thus we throw an exception
              */
              throw new SequenceManagerException("Could not find sequence-name for field '" +
                      field + "' of class '" + field.getClassDescriptor().getClassNameOfObject() +
                      "', property 'autoNaming' in sequence-manager element in repository was '" +
                      autoNaming + "'. Set autoNaming true in sequence-descriptor or define a " +
                      " sequence-name in field-descriptor.");
          }
  
          ClassDescriptor cldTargetClass = field.getClassDescriptor();
          /*
          check for inheritance on multiple table
          */
          cldTargetClass = findInheritanceRoot(cldTargetClass);
          Class topLevel = brokerForClass.getTopLevelClass(cldTargetClass.getClassOfObject());
          ClassDescriptor cldTopLevel = brokerForClass.getClassDescriptor(topLevel);
          /**
           *
           * MBAIRD
           * Should not use classname for the sequenceName as we will end up
           * re-using sequence numbers for classes mapped to the same table.
           * Instead, make the FullTableName the discriminator since it will
           * always be unique for that table, and hence that class.
           *
           * arminw:
           * If the found top-level class has extents, we take the first
           * found extent class table name as sequence name. Else we take
           * the table name of the 'targetClass'.
           *
           */
          if (cldTopLevel.isExtent())
          {
              /*
              arminw:
              this is a little critical, because we do not know if the extent classes
              will change by and by and the first found extent class may change, thus the
              returned table name could change!
              But I don't know a way to resolve this problem. I put a comment to the
              sequence manager docs
              TODO: find better solution
              */
  //            seqName = brokerForClass.getClassDescriptor(((Class) cldTopLevel.getExtentClasses().
  //                    get(0))).getFullTableName();
              seqName = firstFoundTableName(brokerForClass, cldTopLevel);
          }
          else
          {
              seqName = cldTargetClass.getFullTableName();
          }
  //        log.info("* targetClass: "+targetClass +", toplevel: "+topLevel+ " seqName: "+seqName);
          if (seqName == null)
          {
              seqName = SEQ_UNASSIGNED;
              log.warn("Too complex structure, can not assign automatic sequence name for field '" +
                      field.getAttributeName() + "' in class '" +
                      field.getClassDescriptor().getClassNameOfObject() +
                      "'. Use a default sequence name instead: " + (SEQ_PREFIX + seqName));
          }
  //        System.out.println("* targetClass: " + cldTargetClass.getClassNameOfObject() + ", toplevel: " + topLevel + " seqName: " + seqName);
          seqName = SEQ_PREFIX + seqName;
          if (log.isDebugEnabled())
                  log.debug("Set automatic generated sequence-name for field '" +
                          field.getAttributeName() + "' in class '" +
                          field.getClassDescriptor().getClassNameOfObject() +
                          "'.");
          field.setSequenceName(seqName);
          return seqName;
      }