Java 类com.mongodb.client.model.RenameCollectionOptions 实例源码

项目:openbd-core    文件:MongoCollectionRename.java   
public cfData execute(cfSession _session, cfArgStructData argStruct ) throws cfmRunTimeException {
    MongoDatabase   db  = getMongoDatabase( _session, argStruct );

    String collection   = getNamedStringParam(argStruct, "collection", null);
    if ( collection == null )
        throwException(_session, "please specify a collection");

    String name = getNamedStringParam(argStruct, "name", null);
    if ( name == null )
        throwException(_session, "please specify a name");

    try{

        db
            .getCollection( collection )
            .renameCollection( new MongoNamespace( db.getName(), name ), new RenameCollectionOptions().dropTarget( getNamedBooleanParam(argStruct, "droptarget", false ) ) );

        return cfBooleanData.TRUE;

    } catch (MongoException me){
        throwException(_session, me.getMessage());
        return null;
    }
}
项目:mongo-java-driver-rx    文件:MongoCollectionImpl.java   
@Override
public Observable<Success> renameCollection(final MongoNamespace newCollectionNamespace, final RenameCollectionOptions options) {
    return RxObservables.create(Observables.observe(new Block<SingleResultCallback<Success>>() {
        @Override
        public void apply(final SingleResultCallback<Success> callback) {
            wrapped.renameCollection(newCollectionNamespace, options, voidToSuccessCallback(callback));
        }
    }), observableAdapter);
}
项目:mongo-java-driver-reactivestreams    文件:MongoCollectionImpl.java   
@Override
public Publisher<Success> renameCollection(final MongoNamespace newCollectionNamespace, final RenameCollectionOptions options) {
    return new ObservableToPublisher<Success>(observe(new Block<SingleResultCallback<Success>>() {
        @Override
        public void apply(final SingleResultCallback<Success> callback) {
            wrapped.renameCollection(newCollectionNamespace, options, voidToSuccessCallback(callback));
        }
    }));
}
项目:mongo-java-driver-reactivestreams    文件:MongoCollectionImpl.java   
@Override
public Publisher<Success> renameCollection(final ClientSession clientSession, final MongoNamespace newCollectionNamespace,
                                           final RenameCollectionOptions options) {
    return new ObservableToPublisher<Success>(observe(new Block<SingleResultCallback<Success>>() {
        @Override
        public void apply(final SingleResultCallback<Success> callback) {
            wrapped.renameCollection(clientSession, newCollectionNamespace, options, voidToSuccessCallback(callback));
        }
    }));
}
项目:ibm-performance-monitor    文件:ProfiledMongoCollection.java   
@Override
public void renameCollection(MongoNamespace arg0, RenameCollectionOptions arg1)
{
    collection.renameCollection(arg0, arg1);
}
项目:mongo-java-driver-rx    文件:MongoCollectionImpl.java   
@Override
public Observable<Success> renameCollection(final MongoNamespace newCollectionNamespace) {
    return renameCollection(newCollectionNamespace, new RenameCollectionOptions());
}
项目:mongofx    文件:Collection.java   
public void renameCollection(String target, boolean dropTarget) {
  getCollection().renameCollection(new MongoNamespace(mongoDatabase.getName(), target), new RenameCollectionOptions().dropTarget(dropTarget));
}
项目:mongo-java-driver-reactivestreams    文件:MongoCollectionImpl.java   
@Override
public Publisher<Success> renameCollection(final MongoNamespace newCollectionNamespace) {
    return renameCollection(newCollectionNamespace, new RenameCollectionOptions());
}
项目:mongo-java-driver-reactivestreams    文件:MongoCollectionImpl.java   
@Override
public Publisher<Success> renameCollection(final ClientSession clientSession, final MongoNamespace newCollectionNamespace) {
    return renameCollection(clientSession, newCollectionNamespace, new RenameCollectionOptions());
}
项目:mongo-java-driver-rx    文件:MongoCollection.java   
/**
 * Rename the collection with oldCollectionName to the newCollectionName.
 *
 * @param newCollectionNamespace the name the collection will be renamed to
 * @param options                the options for renaming a collection
 * @return an Observable with a single element indicating when the operation has completed
 * @mongodb.driver.manual reference/commands/renameCollection Rename collection
 */
Observable<Success> renameCollection(MongoNamespace newCollectionNamespace, RenameCollectionOptions options);
项目:mongo-java-driver-reactivestreams    文件:MongoCollection.java   
/**
 * Rename the collection with oldCollectionName to the newCollectionName.
 *
 * @param newCollectionNamespace the name the collection will be renamed to
 * @param options                the options for renaming a collection
 * @return a publisher with a single element indicating when the operation has completed
 * @mongodb.driver.manual reference/commands/renameCollection Rename collection
 */
Publisher<Success> renameCollection(MongoNamespace newCollectionNamespace, RenameCollectionOptions options);
项目:mongo-java-driver-reactivestreams    文件:MongoCollection.java   
/**
 * Rename the collection with oldCollectionName to the newCollectionName.
 *
 * @param clientSession the client session with which to associate this operation
 * @param newCollectionNamespace the name the collection will be renamed to
 * @param options                the options for renaming a collection
 * @return a publisher with a single element indicating when the operation has completed
 * @mongodb.driver.manual reference/commands/renameCollection Rename collection
 * @mongodb.server.release 3.6
 * @since 1.7
 */
Publisher<Success> renameCollection(ClientSession clientSession, MongoNamespace newCollectionNamespace,
                                    RenameCollectionOptions options);