Search in sources :

Example 1 with ChartBuilder

use of com.axelor.studio.db.ChartBuilder in project axelor-open-suite by axelor.

the class ChartBuilderRepo method remove.

@Override
public void remove(ChartBuilder chartBuilder) {
    MetaView metaView = chartBuilder.getMetaViewGenerated();
    List<ChartBuilder> chartBuilders = all().filter("self.metaViewGenerated = ?1 and self.id != ?2", metaView, chartBuilder.getId()).fetch();
    for (ChartBuilder builder : chartBuilders) {
        builder.setMetaViewGenerated(null);
    }
    if (metaView != null) {
        metaViewRepo.remove(metaView);
    }
    super.remove(chartBuilder);
}
Also used : ChartBuilder(com.axelor.studio.db.ChartBuilder) MetaView(com.axelor.meta.db.MetaView)

Aggregations

MetaView (com.axelor.meta.db.MetaView)1 ChartBuilder (com.axelor.studio.db.ChartBuilder)1