private void createOrUpdateSchema ( Boolean isUpdate ) { createNamespace ( isUpdate ) ; readExternalProperties ( ) ; Map < Class < ? > , EntityType < ? > > entityMap = kunderaMetadata . getApplicationMetadata ( ) . getMetaModelBuilder ( puMetadata . getPersistenceUnitName ( ) ) . getManagedTypes ( ) ; // iterating all classes of pu to generate schema for ( Class < ? > clazz : entityMap . keySet ( ) ) { EntityMetadata m = KunderaMetadataManager . getEntityMetadata ( kunderaMetadata , clazz ) ; if ( m != null ) { String tablename = m . getTableName ( ) ; HTableDescriptor hTableDescriptor = getTableDescriptor ( clazz , entityMap . get ( clazz ) , tablename ) ; String hTableName = HBaseUtils . getHTableName ( databaseName , tablename ) ; createOrUpdateTable ( hTableName , hTableDescriptor ) ; } } }
Creates the or update schema .