public boolean isDirty(Entity entity,String... attributes){
  Set<String> dirtyFields=getDirtyFields(entity);
  for (  String attribute : attributes) {
    if (dirtyFields.contains(attribute))     return true;
  }
  return false;
}

public boolean isDirty ( Entity entity , String ... attributes ) { Set < String > dirtyFields = getDirtyFields ( entity ) ; for ( String attribute : attributes ) { if ( dirtyFields . contains ( attribute ) ) return true ; } return false ; }
returns true if at least one of the given attributes is dirty ( i . e . changed since the last load from the database ) . < p > if the entity is new , always returns true . < p > if the entity is not persistent or not in the managed state , always returns false .
