Ejemplo n.º 1
0
 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);
     }
   }
 }
Ejemplo n.º 2
0
  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;
  }
Ejemplo n.º 3
0
 /**
  * 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);
 }
Ejemplo n.º 4
0
 public static long getNumberOfAssociations(SessionFactory sessionFactory) {
   return helper.getNumberOfAssociations(sessionFactory);
 }
Ejemplo n.º 5
0
 public static Map<String, Object> extractEntityTuple(
     SessionFactory sessionFactory, EntityKey key) {
   return helper.extractEntityTuple(sessionFactory, key);
 }
Ejemplo n.º 6
0
 public static long getNumberOfEntities(SessionFactory sessionFactory) {
   return helper.getNumberOfEntities(sessionFactory);
 }
Ejemplo n.º 7
0
 public static GridDialectType getCurrentDialectType() {
   return GridDialectType.valueFromHelperClass(helper.getClass());
 }
Ejemplo n.º 8
0
 /**
  * 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);
 }
Ejemplo n.º 9
0
 public static boolean backendSupportsTransactions() {
   return helper.backendSupportsTransactions();
 }
Ejemplo n.º 10
0
 /**
  * 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);
 }