@Override /** * Export schema handles the handleOperation method. */ public void exportSchema(final String persistenceUnit, List<TableInfo> schemas) { super.exportSchema(persistenceUnit, schemas); }
@Override public void destroy() { // TODO destroy pool // hTablePool = null; // indexManager.close(); if (schemaManager != null) { schemaManager.dropSchema(); } externalProperties = null; schemaManager = null; }
/** * Handle operations. * * @param tableInfos * the table infos */ private void handleOperations(List<TableInfo> tableInfos) { SchemaOperationType operationType = SchemaOperationType.getInstance(operation); switch (operationType) { case createdrop: create_drop(tableInfos); break; case create: create(tableInfos); break; case update: update(tableInfos); break; case validate: validate(tableInfos); break; } } }
/** * Gets the single instance of ScheamOperationType. * * @param operation * the operation * @return single instance of ScheamOperationType */ public static SchemaOperationType getInstance(String operation) { if (operation.equalsIgnoreCase("create-drop")) { return SchemaOperationType.createdrop; } return SchemaOperationType.valueOf(SchemaOperationType.class, operation); } }
@Override public SchemaManager getSchemaManager(Map<String, Object> puProperties) { if(schemaManager == null) schemaManager = new CoreSchemaManager("com.impetus.kundera.client.CoreTestClientFactory", puProperties, kunderaMetadata); return schemaManager; }
@Test public void testCreate() { Map<String, Object> props = new HashMap<String, Object>(); props.put(PersistenceProperties.KUNDERA_DDL_AUTO_PREPARE, "create"); EntityManagerFactory emf = Persistence.createEntityManagerFactory("metaDataTest", props); Assert.assertTrue(CoreSchemaManager.validateAction("create")); emf.close(); Assert.assertTrue(CoreSchemaManager.validateAction("create")); Assert.assertFalse(CoreSchemaManager.validateAction("drop")); }
@Override public void destroy() { if (indexManager != null) { indexManager.close(); } if (schemaManager != null) { schemaManager.dropSchema(); } schemaManager = null; // Pelops.shutdown(); // Pelops.removePool(PelopsUtils.generatePoolName(getPersistenceUnit(), // externalProperties)); externalProperties = null; }
@Override /** * Export schema handles the handleOperation method. */ public void exportSchema(final String persistenceUnit, List<TableInfo> schemas) { super.exportSchema(persistenceUnit, schemas); }
@Override public void destroy() { if (indexManager != null) { indexManager.close(); } if (schemaManager != null) { schemaManager.dropSchema(); } schemaManager = null; externalProperties = null; httpClient.getConnectionManager().shutdown(); }
@Override /** * Export schema handles the handleOperation method. */ public void exportSchema(final String persistenceUnit, List<TableInfo> schemas) { super.exportSchema(persistenceUnit, schemas); }
@Override public void destroy() { schemaManager.dropSchema(); super.unload(); }
@Override public void exportSchema(String persistenceUnit, List<TableInfo> puToSchemaCol) { super.exportSchema(persistenceUnit, puToSchemaCol); }
@Override public void destroy() { try { if (schemaManager != null) { schemaManager.dropSchema(); } externalProperties = null; schemaManager = null; connection.close(); } catch (IOException e) { logger.error("connection already closed", e); throw new KunderaException("connection already closed", e); } }
@Override /** * Export schema handles the handleOperation method. */ public void exportSchema(final String persistenceUnit, List<TableInfo> schemas) { super.exportSchema(persistenceUnit, schemas); }
@Override public void destroy() { if (indexManager != null) { indexManager.close(); } if (schemaManager != null) { schemaManager.dropSchema(); } schemaManager = null; externalProperties = null; releaseConnection(this.session); ((Cluster) getConnectionPoolOrConnection()).closeAsync(); }
@Override public void exportSchema(final String persistenceUnit, List<TableInfo> schemas) { super.exportSchema(persistenceUnit, schemas); }
public void exportSchema(final String persistenceUnit, List<TableInfo> schemas) { super.exportSchema(persistenceUnit, schemas); }
public void exportSchema(final String persistenceUnit, List<TableInfo> schemas) { super.exportSchema(persistenceUnit, schemas); }
@Override /** * Export schema handles the handleOperation method. */ public void exportSchema(final String persistenceUnit, List<TableInfo> schemas) { cql_version = externalProperties != null ? (String) externalProperties.get(CassandraConstants.CQL_VERSION) : CassandraConstants.CQL_VERSION_2_0; super.exportSchema(persistenceUnit, schemas); }
public void exportSchema(final String persistenceUnit, List<TableInfo> schemas) { super.exportSchema(persistenceUnit, schemas); }