public XDimAttrNames withAttrName(String... values) { if (values!= null) { for (String value: values) { getAttrName().add(value); } } return this; }
public XDimAttrNames withAttrName(Collection<String> values) { if (values!= null) { getAttrName().addAll(values); } return this; }
public XDimAttrNames withAttrName(Collection<String> values) { if (values!= null) { getAttrName().addAll(values); } return this; }
public XDimAttrNames withAttrName(String... values) { if (values!= null) { for (String value: values) { getAttrName().add(value); } } return this; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { List<String> theAttrName; theAttrName = (((this.attrName!= null)&&(!this.attrName.isEmpty()))?this.getAttrName():null); strategy.appendField(locator, this, "attrName", buffer, theAttrName); } return buffer; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { List<String> theAttrName; theAttrName = (((this.attrName!= null)&&(!this.attrName.isEmpty()))?this.getAttrName():null); strategy.appendField(locator, this, "attrName", buffer, theAttrName); } return buffer; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { List<String> theAttrName; theAttrName = (((this.attrName!= null)&&(!this.attrName.isEmpty()))?this.getAttrName():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "attrName", theAttrName), currentHashCode, theAttrName); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { List<String> theAttrName; theAttrName = (((this.attrName!= null)&&(!this.attrName.isEmpty()))?this.getAttrName():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "attrName", theAttrName), currentHashCode, theAttrName); } return currentHashCode; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof XDimAttrNames)) { return false; } if (this == object) { return true; } final XDimAttrNames that = ((XDimAttrNames) object); { List<String> lhsAttrName; lhsAttrName = (((this.attrName!= null)&&(!this.attrName.isEmpty()))?this.getAttrName():null); List<String> rhsAttrName; rhsAttrName = (((that.attrName!= null)&&(!that.attrName.isEmpty()))?that.getAttrName():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "attrName", lhsAttrName), LocatorUtils.property(thatLocator, "attrName", rhsAttrName), lhsAttrName, rhsAttrName)) { return false; } } return true; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof XDimAttrNames)) { return false; } if (this == object) { return true; } final XDimAttrNames that = ((XDimAttrNames) object); { List<String> lhsAttrName; lhsAttrName = (((this.attrName!= null)&&(!this.attrName.isEmpty()))?this.getAttrName():null); List<String> rhsAttrName; rhsAttrName = (((that.attrName!= null)&&(!that.attrName.isEmpty()))?that.getAttrName():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "attrName", lhsAttrName), LocatorUtils.property(thatLocator, "attrName", rhsAttrName), lhsAttrName, rhsAttrName)) { return false; } } return true; }
XDerivedCube dcube = (XDerivedCube) cube; Set<String> dims = new LinkedHashSet<String>(); dims.addAll(dcube.getDimAttrNames().getAttrName());
XDerivedCube dcube = (XDerivedCube) cube; Set<String> dims = new LinkedHashSet<String>(); dims.addAll(dcube.getDimAttrNames().getAttrName());
dcube.getDimAttrNames().getAttrName().add("dim3"); .queryParam("sessionid", lensSessionId).request(mediaType).get(new GenericType<JAXBElement<XCube>>() {}); XDerivedCube actual2 = (XDerivedCube) got.getValue(); assertEquals(actual2.getDimAttrNames().getAttrName().size(), 2); assertEquals(actual2.getMeasureNames().getMeasureName().size(), 2); assertTrue(actual2.getMeasureNames().getMeasureName().contains("msr3")); assertTrue(actual2.getDimAttrNames().getAttrName().contains("dim3"));
private XDerivedCube createDerivedCube(String cubeName, String parent, boolean addExtraFields) throws Exception { XDerivedCube cube = cubeObjectFactory.createXDerivedCube(); cube.setName(cubeName); cube.setDimAttrNames(new XDimAttrNames()); cube.setMeasureNames(new XMeasureNames()); cube.setProperties(new XProperties()); cube.getDimAttrNames().getAttrName().add("dim1"); cube.getMeasureNames().getMeasureName().add("msr1"); if (addExtraFields) { cube.getDimAttrNames().getAttrName().add("random_dim"); cube.getMeasureNames().getMeasureName().add("random_measure"); } XProperty xp1 = cubeObjectFactory.createXProperty(); xp1.setName("derived.foo"); xp1.setValue("derived.bar"); cube.getProperties().getProperty().add(xp1); cube.setParent(parent); return cube; }
assertEquals(actual2.getParent(), "testGetCube".toLowerCase()); assertEquals(actual2.getMeasureNames().getMeasureName().size(), dcube.getMeasureNames().getMeasureName().size()); assertEquals(actual2.getDimAttrNames().getAttrName().size(), dcube.getDimAttrNames().getAttrName().size()); } finally { dropDatabase(DB, mediaType);
xc = xdc; xdc.getMeasureNames().getMeasureName().addAll(c.getMeasureNames()); xdc.getDimAttrNames().getAttrName().addAll(c.getDimAttributeNames()); xdc.setParent(((DerivedCube) c).getParent().getName()); } else {
xc = xdc; xdc.getMeasureNames().getMeasureName().addAll(c.getMeasureNames()); xdc.getDimAttrNames().getAttrName().addAll(c.getDimAttributeNames()); xdc.setParent(((DerivedCube) c).getParent().getName()); } else {