AttributeCol52 extends DTColumnConfig52 { public AttributeCol52 cloneColumn() { AttributeCol52 cloned = new AttributeCol52(); cloned.setAttribute( getAttribute() ); cloned.setReverseOrder( isReverseOrder() ); cloned.setUseRowNumber( isUseRowNumber() ); cloned.cloneCommonColumnConfigFrom( this ); return cloned; }  @Override List<BaseColumnFieldDiff> diff( BaseColumn otherColumn ); AttributeCol52 cloneColumn(); String getAttribute(); void setAttribute( String attribute ); boolean isUseRowNumber(); void setUseRowNumber( boolean useRowNumber ); boolean isReverseOrder(); void setReverseOrder( boolean reverseOrder ); @Override boolean equals(Object o); @Override int hashCode(); static final String FIELD_ATTRIBUTE; static final String FIELD_REVERSE_ORDER; static final String FIELD_USE_ROW_NUMBER; }
@Test public void testCloneColumn() { column1.setWidth(10); AttributeCol52 clone = column1.cloneColumn(); assertEquals(column1.getAttribute(), clone.getAttribute()); assertEquals(column1.isReverseOrder(), clone.isReverseOrder()); assertEquals(column1.isUseRowNumber(), clone.isUseRowNumber()); assertEquals(column1.getHeader(), clone.getHeader()); assertEquals(column1.getWidth(), clone.getWidth()); assertEquals(column1.isHideColumn(), clone.isHideColumn()); assertEquals(column1.getDefaultValue(), clone.getDefaultValue()); }