@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj != null && obj.getClass() == this.getClass()) { ResultModelDefinition other = (ResultModelDefinition) obj; return JodaBeanUtils.equal( getAggregatePositionOutputMode(), other.getAggregatePositionOutputMode()) && JodaBeanUtils.equal(getPositionOutputMode(), other.getPositionOutputMode()) && JodaBeanUtils.equal(getTradeOutputMode(), other.getTradeOutputMode()) && JodaBeanUtils.equal(getSecurityOutputMode(), other.getSecurityOutputMode()) && JodaBeanUtils.equal(getPrimitiveOutputMode(), other.getPrimitiveOutputMode()); } return false; }
/** * Tests whether the view has portfolio outputs enabled. * * @param viewDefinition the view definition * @return {@code true} if there is at least one portfolio target, {@code false} otherwise */ private static boolean isPortfolioOutputEnabled(ViewDefinition viewDefinition) { ResultModelDefinition resultModelDefinition = viewDefinition.getResultModelDefinition(); return resultModelDefinition.getPositionOutputMode() != ResultOutputMode.NONE || resultModelDefinition.getAggregatePositionOutputMode() != ResultOutputMode.NONE; }