Uploaded image for project: 'Apache MetaModel (Retired)'
  1. Apache MetaModel (Retired)
  2. METAMODEL-1170

Add a Schema.getTablesOfType(TableType) convenience method

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.0.0
    • 5.0.1

    Description

      I suggest adding a convenience method called something like "getTablesOfType(TableType)" on the Schema interface. This request is coming after the 5.0.0 introduction of alias tables which is generally good, but I have noticed that I write these lines again and again whenever I don't want to have the alias tables:

      schema.getTables().stream().filter(t -> t.getType() == TableType.TABLE).collect(Collectors.toList());
      

      I don't particularly like that line of code. So a convenience way of getting the same by just calling:

      schema.getTablesOfType(TableType.TABLE);
      

      would be a big syntax improvement. It could even be implemented as a default method with the above implementation on the Schema method.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kaspersor Kasper Sørensen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: