Search in sources :

Example 1 with BeCaseInsensitiveCollection

use of com.developmentontheedge.be5.metadata.model.base.BeCaseInsensitiveCollection in project be5 by DevelopmentOnTheEdge.

the class MetaImpl method getColumns.

@Override
@SuppressWarnings(value = "unchecked")
public Map<String, ColumnDef> getColumns(Entity entity) {
    BeModelElement scheme = entity.getAvailableElement("Scheme");
    if (scheme == null)
        return new HashMap<>();
    BeCaseInsensitiveCollection<ColumnDef> columns = (BeCaseInsensitiveCollection<ColumnDef>) ((TableDef) scheme).get("Columns");
    return StreamSupport.stream(columns.spliterator(), false).collect(Utils.toLinkedMap(ColumnDef::getName, Function.identity()));
}
Also used : BeCaseInsensitiveCollection(com.developmentontheedge.be5.metadata.model.base.BeCaseInsensitiveCollection) BeModelElement(com.developmentontheedge.be5.metadata.model.base.BeModelElement) ColumnDef(com.developmentontheedge.be5.metadata.model.ColumnDef)

Aggregations

ColumnDef (com.developmentontheedge.be5.metadata.model.ColumnDef)1 BeCaseInsensitiveCollection (com.developmentontheedge.be5.metadata.model.base.BeCaseInsensitiveCollection)1 BeModelElement (com.developmentontheedge.be5.metadata.model.base.BeModelElement)1