@ Override public < S extends T > S save ( S entity ) { Assert . notNull ( entity , "entity must not be null" ) ; // save entity if ( information . isNew ( entity ) ) { return operation . insert ( information . getCollectionName ( ) , entity , createKey ( information . getPartitionKeyFieldValue ( entity ) ) ) ; } else { operation . upsert ( information . getCollectionName ( ) , entity , createKey ( information . getPartitionKeyFieldValue ( entity ) ) ) ; } return entity ; }
save entity without partition