You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2018/01/09 06:47:00 UTC

[jira] [Resolved] (METAMODEL-1170) Add a Schema.getTablesOfType(TableType) convenience method

     [ https://issues.apache.org/jira/browse/METAMODEL-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kasper Sørensen resolved METAMODEL-1170.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 5.0.1

This seems to have been resolved in 5.0.1

> Add a Schema.getTablesOfType(TableType) convenience method
> ----------------------------------------------------------
>
>                 Key: METAMODEL-1170
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-1170
>             Project: Apache MetaModel
>          Issue Type: Improvement
>    Affects Versions: 5.0.0
>            Reporter: Kasper Sørensen
>            Priority: Minor
>              Labels: starter
>             Fix For: 5.0.1
>
>
> 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:
> {code}
> schema.getTables().stream().filter(t -> t.getType() == TableType.TABLE).collect(Collectors.toList());
> {code}
> I don't particularly like that line of code. So a convenience way of getting the same by just calling:
> {code}
> schema.getTablesOfType(TableType.TABLE);
> {code}
> would be a big syntax improvement. It could even be implemented as a default method with the above implementation on the Schema method.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)