code: private static void setSchemaAndPU(Class<?> clazz, EntityMetadata metadata)
      {
          Table table = clazz.getAnnotation(Table.class);
          if (table != null)
          {
              metadata.setTableName(!StringUtils.isBlank(table.name()) ? table.name() : clazz.getSimpleName());
              String schemaStr = table.schema();
  
              MetadataUtils.setSchemaAndPersistenceUnit(metadata, schemaStr,
                      em.getEntityManagerFactory().getProperties());
          }
          else
          {
              metadata.setTableName(clazz.getSimpleName());
              metadata.setSchema((String) em.getEntityManagerFactory().getProperties().get("kundera.keyspace"));
          }
  
          if (metadata.getPersistenceUnit() == null)
          {
              metadata.setPersistenceUnit(getPersistenceUnit());
          }
      }
docs: Sets the schema and pu.
  
  @param clazz
  the clazz
  @param metadata
  the metadata