Java Code Examples for org.olap4j.metadata.Member#equals()
The following examples show how to use
org.olap4j.metadata.Member#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CubeUtilities.java From Knowage-Server with GNU Affero General Public License v3.0 | 6 votes |
/** * Checks if the member is visible in the cube * * @param model * the pivot model * @param member * the member to check * @param axis * the axis that contains the member * @return true if the model is visible */ public static boolean isMemberVisible(PivotModel model, Member member, Axis axis) { List<Member> visibleMembers = null; PlaceMembersOnAxes pm = model.getTransform(PlaceMembersOnAxes.class); visibleMembers = pm.findVisibleMembers(axis); for (int i = 0; i < visibleMembers.size(); i++) { Member m = visibleMembers.get(i); if (m.equals(member)) { return true; } } return false; }
Example 2
Source File: SpagoBICellWrapper.java From Knowage-Server with GNU Affero General Public License v3.0 | 4 votes |
/** * See if member2 is ancestor of member1 */ private boolean isChildOrEqualTo(Member member1, Member member2) { if (member1.equals(member2)) { return true; } if(member1.getLevel().getDepth()<=member2.getDepth()) return false; Member aMember=member1.getParentMember(); while(aMember.getLevel().getDepth()>=member2.getDepth() && !aMember.equals(member2)){ aMember = aMember.getParentMember(); } return (aMember.equals(member2)); }