public function setSyncState($state)
    {
        switch ((int) $state) {
            case self::SYNC_STATE_MODIFIED:
            case self::SYNC_STATE_NO_CHANGE:
            case self::SYNC_STATE_REMOVED:
                // OK
                break;
            default:
                throw new \InvalidArgumentException(sprintf('Invalid sync state: %s', $state));
        }
        
        $this->syncState = (int) $state;
    }