@Test public void testGetBusinessObjectFormatWithParents() { setupBusinessObjectFormatParentChild(); BusinessObjectFormatKey businessObjectFormat = new BusinessObjectFormatKey(NAMESPACE + " ", BDEF_NAME.toLowerCase(), " " + FORMAT_USAGE_CODE, " " + FORMAT_FILE_TYPE_CODE + " ", null); BusinessObjectFormatKey childBusinessObjectFormat = new BusinessObjectFormatKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE_2, FORMAT_FILE_TYPE_CODE, null); BusinessObjectFormat resultBusinessObjectFormat = businessObjectFormatService.getBusinessObjectFormat(businessObjectFormat); BusinessObjectFormat resultChildBusinessObjectFormat = businessObjectFormatService.getBusinessObjectFormat(childBusinessObjectFormat); assertEquals(0, resultBusinessObjectFormat.getBusinessObjectFormatParents().size()); assertEquals(1, resultChildBusinessObjectFormat.getBusinessObjectFormatParents().size()); assertEquals(1, resultBusinessObjectFormat.getBusinessObjectFormatChildren().size()); }
assertEquals(resultBusinessObjectFormatParentV2.getBusinessObjectFormatChildren().size(), 1); BusinessObjectFormat expectedBusinessObjectParent = resultBusinessObjectFormatV0; expectedBusinessObjectParent.setId(resultBusinessObjectFormatParentV2.getId()); expectedBusinessObjectParent.setBusinessObjectFormatVersion(resultBusinessObjectFormatParentV2.getBusinessObjectFormatVersion()); expectedBusinessObjectParent.setBusinessObjectFormatChildren(resultBusinessObjectFormatParentV2.getBusinessObjectFormatChildren()); assertEquals(expectedBusinessObjectParent, resultBusinessObjectFormatParentV2);
lhsBusinessObjectFormatChildren = ((this.businessObjectFormatChildren!= null)?this.getBusinessObjectFormatChildren():null); List<BusinessObjectFormatKey> rhsBusinessObjectFormatChildren; rhsBusinessObjectFormatChildren = ((that.businessObjectFormatChildren!= null)?that.getBusinessObjectFormatChildren():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "businessObjectFormatChildren", lhsBusinessObjectFormatChildren), LocatorUtils.property(thatLocator, "businessObjectFormatChildren", rhsBusinessObjectFormatChildren), lhsBusinessObjectFormatChildren, rhsBusinessObjectFormatChildren, (this.businessObjectFormatChildren!= null), (that.businessObjectFormatChildren!= null))) { return false;
lhsBusinessObjectFormatChildren = ((this.businessObjectFormatChildren!= null)?this.getBusinessObjectFormatChildren():null); List<BusinessObjectFormatKey> rhsBusinessObjectFormatChildren; rhsBusinessObjectFormatChildren = ((that.businessObjectFormatChildren!= null)?that.getBusinessObjectFormatChildren():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "businessObjectFormatChildren", lhsBusinessObjectFormatChildren), LocatorUtils.property(thatLocator, "businessObjectFormatChildren", rhsBusinessObjectFormatChildren), lhsBusinessObjectFormatChildren, rhsBusinessObjectFormatChildren, (this.businessObjectFormatChildren!= null), (that.businessObjectFormatChildren!= null))) { return false;
lhsBusinessObjectFormatChildren = ((this.businessObjectFormatChildren!= null)?this.getBusinessObjectFormatChildren():null); List<BusinessObjectFormatKey> rhsBusinessObjectFormatChildren; rhsBusinessObjectFormatChildren = ((that.businessObjectFormatChildren!= null)?that.getBusinessObjectFormatChildren():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "businessObjectFormatChildren", lhsBusinessObjectFormatChildren), LocatorUtils.property(thatLocator, "businessObjectFormatChildren", rhsBusinessObjectFormatChildren), lhsBusinessObjectFormatChildren, rhsBusinessObjectFormatChildren, (this.businessObjectFormatChildren!= null), (that.businessObjectFormatChildren!= null))) { return false;
theBusinessObjectFormatChildren = ((this.businessObjectFormatChildren!= null)?this.getBusinessObjectFormatChildren():null); strategy.appendField(locator, this, "businessObjectFormatChildren", buffer, theBusinessObjectFormatChildren, (this.businessObjectFormatChildren!= null));
theBusinessObjectFormatChildren = ((this.businessObjectFormatChildren!= null)?this.getBusinessObjectFormatChildren():null); strategy.appendField(locator, this, "businessObjectFormatChildren", buffer, theBusinessObjectFormatChildren, (this.businessObjectFormatChildren!= null));
theBusinessObjectFormatChildren = ((this.businessObjectFormatChildren!= null)?this.getBusinessObjectFormatChildren():null); strategy.appendField(locator, this, "businessObjectFormatChildren", buffer, theBusinessObjectFormatChildren, (this.businessObjectFormatChildren!= null));
theBusinessObjectFormatChildren = ((this.businessObjectFormatChildren!= null)?this.getBusinessObjectFormatChildren():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "businessObjectFormatChildren", theBusinessObjectFormatChildren), currentHashCode, theBusinessObjectFormatChildren, (this.businessObjectFormatChildren!= null));
theBusinessObjectFormatChildren = ((this.businessObjectFormatChildren!= null)?this.getBusinessObjectFormatChildren():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "businessObjectFormatChildren", theBusinessObjectFormatChildren), currentHashCode, theBusinessObjectFormatChildren, (this.businessObjectFormatChildren!= null));
theBusinessObjectFormatChildren = ((this.businessObjectFormatChildren!= null)?this.getBusinessObjectFormatChildren():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "businessObjectFormatChildren", theBusinessObjectFormatChildren), currentHashCode, theBusinessObjectFormatChildren, (this.businessObjectFormatChildren!= null));
if (businessObjectFormatChildrenShouldBeCopiedAndSet == Boolean.TRUE) { List<BusinessObjectFormatKey> sourceBusinessObjectFormatChildren; sourceBusinessObjectFormatChildren = ((this.businessObjectFormatChildren!= null)?this.getBusinessObjectFormatChildren():null); @SuppressWarnings("unchecked") List<BusinessObjectFormatKey> copyBusinessObjectFormatChildren = ((List<BusinessObjectFormatKey> ) strategy.copy(LocatorUtils.property(locator, "businessObjectFormatChildren", sourceBusinessObjectFormatChildren), sourceBusinessObjectFormatChildren, (this.businessObjectFormatChildren!= null)));
if (businessObjectFormatChildrenShouldBeCopiedAndSet == Boolean.TRUE) { List<BusinessObjectFormatKey> sourceBusinessObjectFormatChildren; sourceBusinessObjectFormatChildren = ((this.businessObjectFormatChildren!= null)?this.getBusinessObjectFormatChildren():null); @SuppressWarnings("unchecked") List<BusinessObjectFormatKey> copyBusinessObjectFormatChildren = ((List<BusinessObjectFormatKey> ) strategy.copy(LocatorUtils.property(locator, "businessObjectFormatChildren", sourceBusinessObjectFormatChildren), sourceBusinessObjectFormatChildren, (this.businessObjectFormatChildren!= null)));
if (businessObjectFormatChildrenShouldBeCopiedAndSet == Boolean.TRUE) { List<BusinessObjectFormatKey> sourceBusinessObjectFormatChildren; sourceBusinessObjectFormatChildren = ((this.businessObjectFormatChildren!= null)?this.getBusinessObjectFormatChildren():null); @SuppressWarnings("unchecked") List<BusinessObjectFormatKey> copyBusinessObjectFormatChildren = ((List<BusinessObjectFormatKey> ) strategy.copy(LocatorUtils.property(locator, "businessObjectFormatChildren", sourceBusinessObjectFormatChildren), sourceBusinessObjectFormatChildren, (this.businessObjectFormatChildren!= null)));