use of org.olap4j.impl.AbstractNamedList in project mondrian by pentaho.
the class MondrianOlap4jMember method getChildMembers.
public NamedList<MondrianOlap4jMember> getChildMembers() throws OlapException {
final RolapConnection conn = olap4jSchema.olap4jCatalog.olap4jDatabaseMetaData.olap4jConnection.getMondrianConnection();
final List<mondrian.olap.Member> children = Locus.execute(conn, "MondrianOlap4jMember.getChildMembers", new Locus.Action<List<mondrian.olap.Member>>() {
public List<mondrian.olap.Member> execute() {
return conn.getSchemaReader().getMemberChildren(member);
}
});
return new AbstractNamedList<MondrianOlap4jMember>() {
public String getName(Object member) {
return ((MondrianOlap4jMember) member).getName();
}
public MondrianOlap4jMember get(int index) {
return new MondrianOlap4jMember(olap4jSchema, children.get(index));
}
public int size() {
return children.size();
}
};
}
Aggregations