Package org.eclipselabs.emongo

Examples of org.eclipselabs.emongo.MongoIdFactory


    idFactories.put(mongoIdFactory.getCollectionURI(), mongoIdFactory);
  }

  public void unbindMongoIdFactory(MongoIdFactory mongoIdFactory)
  {
    MongoIdFactory target = idFactories.get(mongoIdFactory.getCollectionURI());

    if (mongoIdFactory == target)
      idFactories.remove(mongoIdFactory.getCollectionURI());
  }
View Full Code Here


    // If the id was not specified, look for an id generator

    if (id == null && idFactories != null)
    {
      MongoIdFactory mongoIdFactory = idFactories.get(uri.trimSegments(uri.segmentCount() - 2).toString());

      if (mongoIdFactory != null)
      {
        id = mongoIdFactory.getNextId();
        uri = uri.appendSegment(id.toString());
        resource.setURI(resource.getURI().trimSegments(1).appendSegment(id.toString()));
      }
    }
View Full Code Here

TOP

Related Classes of org.eclipselabs.emongo.MongoIdFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.