1 13 package com.tonbeller.jpivot.olap.model.impl; 14 15 import com.tonbeller.jpivot.olap.model.Hierarchy; 16 import com.tonbeller.jpivot.olap.model.Level; 17 import com.tonbeller.jpivot.olap.model.Visitor; 18 19 24 public class LevelImpl implements Level { 25 String label; 26 Hierarchy hierarchy; 27 28 public LevelImpl() { 29 } 30 31 public LevelImpl(String label, Hierarchy hierarchy) { 32 this.label = label; 33 this.hierarchy = hierarchy; 34 } 35 36 40 public Hierarchy getHierarchy() { 41 return hierarchy; 42 } 43 44 48 public void setHierarchy(Hierarchy hierarchy) { 49 this.hierarchy = hierarchy; 50 } 51 52 public void accept(Visitor visitor) { 53 visitor.visitLevel(this); 54 } 55 56 public Object getRootDecoree() { 57 return this; 58 } 59 60 64 public String getLabel() { 65 return label; 66 } 67 68 72 public void setLabel(String label) { 73 this.label = label; 74 } 75 76 79 public String getUniqueName() { 80 return "[" + label + "]"; 81 } 82 83 } 84 | Popular Tags |