code: private long getMax(Object sourceAttribute)
      {
          int size = primaryKeyAttributes.size();
          long maxFromAllTables = Long.MIN_VALUE;
          Long maxFromTable;
          Attribute primaryKeyAttribute;
  
          for(int i = 0; i < size; i++)
          {
              primaryKeyAttribute = (Attribute)primaryKeyAttributes.get(i);
              maxFromTable = this.getValidIdForPrimaryKey(primaryKeyAttribute, sourceAttribute, true);
              if((maxFromTable != null) && (maxFromTable > maxFromAllTables))
              {
                  maxFromAllTables = maxFromTable;
              }
          }
          return maxFromAllTables;
      }
docs: /*
  Validates that the sequence next id to give is greater than the value of the primary key from all the tables
  this sequence is used. If not, the value for the next id to give in the sequence is set to a value higher than
  the max from all tables.