code: public boolean isModified(ItemData item)
     {
  
        if (item.isNode())
        {
           // this node and child changes only
           Collection<ItemState> nodeChanges = changesLog.getLastModifyStates((NodeData)item);
           return nodeChanges.size() > 0;
        }
  
        ItemState state = changesLog.getLastState(item, false);
  
        if (state != null)
        {
           if (state.isAdded() || state.isDeleted())
           {
              return false;
           }
  
           return true;
        }
  
        return false;
     }
docs: Returns true if this Item has been saved but has subsequently been modified through the current
  session and therefore the state of this item as recorded in the session differs from the state
  of this item as saved. Within a transaction, isModified on an Item may return false (because
  the Item has been saved since the modification) even if the modification in question is not in
  persistent storage (because the transaction has not yet been committed).
  
  @param item
  ItemData
  @return boolean