Search in sources :

Example 1 with CouchbaseEntryManagerFactory

use of io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory in project jans by JanssenProject.

the class CouchbaseNativeBenchmarkCacheTest method createCouchbaseEntryManager.

private CouchbaseEntryManager createCouchbaseEntryManager() {
    CouchbaseEntryManagerFactory couchbaseEntryManagerFactory = new CouchbaseEntryManagerFactory();
    couchbaseEntryManagerFactory.create();
    Properties connectionProperties = getSampleConnectionProperties();
    CouchbaseEntryManager couchbaseEntryManager = couchbaseEntryManagerFactory.createEntryManager(connectionProperties);
    System.out.println("Created CouchbaseEntryManager: " + couchbaseEntryManager);
    return couchbaseEntryManager;
}
Also used : CouchbaseEntryManagerFactory(io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory) CouchbaseEntryManager(io.jans.orm.couchbase.impl.CouchbaseEntryManager)

Example 2 with CouchbaseEntryManagerFactory

use of io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory in project jans by JanssenProject.

the class ClientApiPersistenceEntryManagerFactory method createPersistenceEntryManager.

public final PersistenceEntryManager createPersistenceEntryManager(Properties properties, String persistenceType) {
    try {
        PersistenceEntryManagerFactory persistenceEntryManagerFactory = this.standalonePersistanceFactoryService.getPersistenceEntryManagerFactory(persistenceType);
        if (persistenceEntryManagerFactory.getPersistenceType().equalsIgnoreCase("couchbase")) {
            ((CouchbaseEntryManagerFactory) persistenceEntryManagerFactory).create();
        }
        Properties connProps = createConnectionProperties(properties, persistenceEntryManagerFactory.getPersistenceType());
        PersistenceEntryManager ret = persistenceEntryManagerFactory.createEntryManager(connProps);
        if (ret == null)
            throw new RuntimeException("Could not create persistence entry manager");
        return ret;
    } catch (ConfigurationException e) {
        throw new RuntimeException(e.getMessage(), e);
    }
}
Also used : CouchbaseEntryManagerFactory(io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory) PersistenceEntryManager(io.jans.orm.PersistenceEntryManager) ConfigurationException(io.jans.exception.ConfigurationException) PersistenceEntryManagerFactory(io.jans.orm.PersistenceEntryManagerFactory) Properties(java.util.Properties)

Example 3 with CouchbaseEntryManagerFactory

use of io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory in project jans by JanssenProject.

the class CouchbaseEntryManagerSample method createCouchbaseEntryManager.

public CouchbaseEntryManager createCouchbaseEntryManager() {
    CouchbaseEntryManagerFactory couchbaseEntryManagerFactory = new CouchbaseEntryManagerFactory();
    couchbaseEntryManagerFactory.create();
    Properties connectionProperties = getSampleConnectionProperties();
    CouchbaseEntryManager couchbaseEntryManager = couchbaseEntryManagerFactory.createEntryManager(connectionProperties);
    LOG.debug("Created CouchbaseEntryManager: " + couchbaseEntryManager);
    return couchbaseEntryManager;
}
Also used : CouchbaseEntryManagerFactory(io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory) CouchbaseEntryManager(io.jans.orm.couchbase.impl.CouchbaseEntryManager) Properties(java.util.Properties)

Example 4 with CouchbaseEntryManagerFactory

use of io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory in project jans by JanssenProject.

the class ManualCouchbaseEntryManagerTest method createCouchbaseEntryManager.

public static CouchbaseEntryManager createCouchbaseEntryManager() throws IOException {
    CouchbaseEntryManagerFactory couchbaseEntryManagerFactory = new CouchbaseEntryManagerFactory();
    couchbaseEntryManagerFactory.create();
    CouchbaseEntryManager couchbaseEntryManager = couchbaseEntryManagerFactory.createEntryManager(loadProperties());
    System.out.println("Created CouchbaseEntryManager: " + couchbaseEntryManager);
    return couchbaseEntryManager;
}
Also used : CouchbaseEntryManagerFactory(io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory) CouchbaseEntryManager(io.jans.orm.couchbase.impl.CouchbaseEntryManager)

Aggregations

CouchbaseEntryManagerFactory (io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory)4 CouchbaseEntryManager (io.jans.orm.couchbase.impl.CouchbaseEntryManager)3 Properties (java.util.Properties)2 ConfigurationException (io.jans.exception.ConfigurationException)1 PersistenceEntryManager (io.jans.orm.PersistenceEntryManager)1 PersistenceEntryManagerFactory (io.jans.orm.PersistenceEntryManagerFactory)1