Package com.impetus.kundera.rest.dto

Examples of com.impetus.kundera.rest.dto.Schema


                emfImpl.getKunderaMetadataInstance().getApplicationMetadata()
                    .getPersistenceUnitMetadata(persistenceUnit);
            String schemaStr = puMetadata.getProperty("kundera.keyspace");

            if (schemaStr != null) {
                Schema schema = new Schema();
                schema.setSchemaName(schemaStr);

               
                MetamodelImpl metamodel = (MetamodelImpl) em.getEntityManagerFactory().getMetamodel();
                Map<String, EntityMetadata> metamodelMap = metamodel.getEntityMetadataMap();

                for (String clazz : metamodelMap.keySet()) {
                    EntityMetadata m = metamodelMap.get(clazz);
                    Table table = new Table();
                    table.setEntityClassName(clazz);
                    table.setTableName(m.getTableName());
                    table.setSimpleEntityClassName(m.getEntityClazz().getSimpleName());

                    schema.addTable(table);
                }
                schemaMetadata.addSchema(schema);
            }
        }
View Full Code Here

TOP

Related Classes of com.impetus.kundera.rest.dto.Schema

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.