@Test public void testIsGroupChange() { DataRow dataRow = mock( DataRow.class ); group.setAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.GROUP_FIELDS, "str" ); assertThat( group.isGroupChange( dataRow ), is( equalTo( false ) ) ); group.setAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.GROUP_FIELDS, new String[] { } ); assertThat( group.isGroupChange( dataRow ), is( equalTo( false ) ) ); group.setAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.GROUP_FIELDS, new String[] { "field_0", null, "field_1" } ); doReturn( false ).when( dataRow ).isChanged( "field_0" ); doReturn( true ).when( dataRow ).isChanged( "field_1" ); assertThat( group.isGroupChange( dataRow ), is( equalTo( true ) ) ); }
public boolean isGroupChange( final DataRow dataRow ) { final Object o = getAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.GROUP_FIELDS ); if ( o instanceof String[] ) { final String[] fields = (String[]) o; for ( int i = 0; i < fields.length; i++ ) { final String field = fields[i]; if ( field != null && dataRow.isChanged( field ) ) { return true; } } } return false; }
RelationalGroup extends Group { public boolean isGroupChange( final DataRow dataRow ) { final Object o = getAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.GROUP_FIELDS ); if ( o instanceof String[] ) { final String[] fields = (String[]) o; for ( int i = 0; i < fields.length; i++ ) { final String field = fields[i]; if ( field != null && dataRow.isChanged( field ) ) { return true; } } } return false; } }
RelationalGroup extends Group { public boolean isGroupChange( final DataRow dataRow ) { final Object o = getAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.GROUP_FIELDS ); if ( o instanceof String[] ) { final String[] fields = (String[]) o; for ( int i = 0; i < fields.length; i++ ) { final String field = fields[i]; if ( field != null && dataRow.isChanged( field ) ) { return true; } } } return false; } RelationalGroup(); }
RelationalGroup extends Group { public boolean isGroupChange( final DataRow dataRow ) { final Object o = getAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.GROUP_FIELDS ); if ( o instanceof String[] ) { final String[] fields = (String[]) o; for ( int i = 0; i < fields.length; i++ ) { final String field = fields[i]; if ( field != null && dataRow.isChanged( field ) ) { return true; } } } return false; } RelationalGroup(); GroupHeader getHeader(); void setHeader( final GroupHeader header ); GroupFooter getFooter(); void setFooter( final GroupFooter footer ); void setFields( final List<String> c ); void clearFields(); int getElementCount(); void addField( final String name ); List<String> getFields(); void setFieldsArray( final String[] fields ); String[] getFieldsArray(); String toString(); void setBody( final GroupBody body ); boolean equals( final Object obj ); int hashCode(); boolean isGroupChange( final DataRow dataRow ); @Deprecated GroupDataBody findGroupDataBody(); RelationalGroup clone(); RelationalGroup derive( final boolean preserveElementInstanceIds ); Element getElement( final int index ); void setElementAt( final int index, final Element element ); List<SortConstraint> getSortingConstraint(); }
RelationalGroup extends Group { public boolean isGroupChange( final DataRow dataRow ) { final Object o = getAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.GROUP_FIELDS ); if ( o instanceof String[] ) { final String[] fields = (String[]) o; for ( int i = 0; i < fields.length; i++ ) { final String field = fields[i]; if ( field != null && dataRow.isChanged( field ) ) { return true; } } } return false; } RelationalGroup(); GroupHeader getHeader(); void setHeader( final GroupHeader header ); GroupFooter getFooter(); void setFooter( final GroupFooter footer ); void setFields( final List<String> c ); void clearFields(); int getElementCount(); void addField( final String name ); List<String> getFields(); void setFieldsArray( final String[] fields ); String[] getFieldsArray(); String toString(); void setBody( final GroupBody body ); boolean equals( final Object obj ); int hashCode(); boolean isGroupChange( final DataRow dataRow ); @Deprecated GroupDataBody findGroupDataBody(); RelationalGroup clone(); RelationalGroup derive( final boolean preserveElementInstanceIds ); Element getElement( final int index ); void setElementAt( final int index, final Element element ); List<SortConstraint> getSortingConstraint();  }