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

Add a Schema.getTablesOfType(TableType) convenience method

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.0
    • Fix Version/s: 5.0.1
    • Labels:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: