public static void dropSchemaAndDatabase(SessionFactory sessionFactory) { // if the factory is closed, we don't have access to the service registry if (sessionFactory != null && !sessionFactory.isClosed()) { try { helper.dropSchemaAndDatabase(sessionFactory); } catch (Exception e) { log.warn("Exception while dropping schema and database in test", e); } } }
public static Map<String, String> getEnvironmentProperties() { // TODO hibernate.properties is ignored due to HHH-8635, thus explicitly load its properties Map<String, String> properties = getHibernateProperties(); Map<String, String> environmentProperties = helper.getEnvironmentProperties(); if (environmentProperties != null) { properties.putAll(environmentProperties); } return properties; }
/** * Returns the number of associations of the given type. * * <p>Optional operation which only is supported for document datastores. */ public static long getNumberOfAssociations( SessionFactory sessionFactory, AssociationStorageType type) { return helper.getNumberOfAssociations(sessionFactory, type); }
public static long getNumberOfAssociations(SessionFactory sessionFactory) { return helper.getNumberOfAssociations(sessionFactory); }
public static Map<String, Object> extractEntityTuple( SessionFactory sessionFactory, EntityKey key) { return helper.extractEntityTuple(sessionFactory, key); }
public static long getNumberOfEntities(SessionFactory sessionFactory) { return helper.getNumberOfEntities(sessionFactory); }
public static GridDialectType getCurrentDialectType() { return GridDialectType.valueFromHelperClass(helper.getClass()); }
/** * Returns a {@link GlobalContext} for configuring the current datastore. * * @param configuration the target the configuration will be applied to * @return a context object for configuring the current datastore. */ public static GlobalContext<?, ?> configureDatastore(OgmConfiguration configuration) { return helper.configureDatastore(configuration); }
public static boolean backendSupportsTransactions() { return helper.backendSupportsTransactions(); }
/** * Returns the number of collections stored embedded within an entity structure in the datastore * * <p>Optional operation which only is supported for document datastores. */ public static long getNumberOfEmbeddedCollections(SessionFactory sessionFactory) { return helper.getNumberOEmbeddedCollections(sessionFactory); }