1 13 package com.tonbeller.jpivot.xmla; 14 15 import com.tonbeller.jpivot.olap.model.Member; 16 import com.tonbeller.jpivot.olap.query.PositionBase; 17 18 21 public class XMLA_Position extends PositionBase { 22 23 int axisOrdinal; 24 25 29 protected XMLA_Position(int axisOrdinal) { 30 super(); 31 this.axisOrdinal = axisOrdinal; 32 } 33 34 38 public void setMembers(Member[] members) { 39 this.members = members; 40 } 41 42 46 public void setAxisOrdinal(int axisOrdinal) { 47 this.axisOrdinal = axisOrdinal; 48 } 49 50 54 public int getAxisOrdinal() { 55 return axisOrdinal; 56 } 57 58 63 public boolean isEquivalent(XMLA_Position other) { 64 Member[] othermembers = other.getMembers(); 66 int nMembers = members.length; 67 if (othermembers.length != nMembers) 68 return false; 69 for (int i = 0; i < nMembers; i++) { 70 if (!othermembers[i].getLabel().equals(members[i].getLabel())) 71 return false; 72 } 73 return true; 74 } 75 76 } | Popular Tags |