Package model

Examples of model.JPAClassModel


public class JPAClassGenerator extends AbstractGenerator{
//    private static final Logger log = LoggerFactory.getLogger(JPAClassGenerator.class);
  private String jpaClassPackageName;
 
    public JPAClassModel createJPAClassModel(SQLData sqlData){
    JPAClassModel model = new JPAClassModel();
    model.generatePKClass=sqlData.getPrimaryKeys().size()>1;
    model.tableName=sqlData.getTableName();
    model.className = convertToJavaTitleCaseStringConvention(sqlData.getTableName());
    if (model.generatePKClass) {
      model.pkClassModel.className=model.className+"_PK";
View Full Code Here


 
  public static void testJPAClassGen() {
    SQLData data = createSQLData();
    JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
    jpaClassGenerator.setJpaClassPackageName("org.apache.aiaravata.application.catalog.data.model");
    JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
    System.out.println(jpaClassGenerator.generateJPAClass(model));
    System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
    System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
  }
View Full Code Here

  }
 
  public static void testJPAResourceClassGen() {
    SQLData data = createSQLData();
    JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
    JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
    JPAResourceClassGenerator jpaResourceClassGenerator = new JPAResourceClassGenerator();
    jpaResourceClassGenerator.setExceptionClassName("AppCatalogException");
    jpaResourceClassGenerator.setJpaUtilsClassName("AppCatalogJPAUtils");
    jpaResourceClassGenerator.setResourceTypeClassName("AppCatalogResourceType");
    jpaResourceClassGenerator.setQueryGeneratorClassName("AppCatalogQueryGenerator");
View Full Code Here

 
  public static void testJPAClassGen() {
    SQLData data = createSQLData();
    JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
    jpaClassGenerator.setJpaClassPackageName("org.apache.aiaravata.application.catalog.data.model");
    JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
    System.out.println(jpaClassGenerator.generateJPAClass(model));
    System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
    System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
  }
View Full Code Here

  }
 
  public static void testJPAResourceClassGen() {
    SQLData data = createSQLData();
    JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
    JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
    JPAResourceClassGenerator jpaResourceClassGenerator = new JPAResourceClassGenerator();
    jpaResourceClassGenerator.setExceptionClassName("AppCatalogException");
    jpaResourceClassGenerator.setJpaUtilsClassName("AppCatalogJPAUtils");
    jpaResourceClassGenerator.setResourceTypeClassName("AppCatalogResourceType");
    jpaResourceClassGenerator.setQueryGeneratorClassName("AppCatalogQueryGenerator");
View Full Code Here

 
  public static void testJPAClassGen() {
    SQLData data = createSQLData();
    JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
    jpaClassGenerator.setJpaClassPackageName("org.apache.aiaravata.application.catalog.data.model");
    JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
    System.out.println(jpaClassGenerator.generateJPAClass(model));
    System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
    System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
  }
View Full Code Here

  }
 
  public static void testJPAResourceClassGen() {
    SQLData data = createSQLData();
    JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
    JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
    JPAResourceClassGenerator jpaResourceClassGenerator = new JPAResourceClassGenerator();
    jpaResourceClassGenerator.setExceptionClassName("AppCatalogException");
    jpaResourceClassGenerator.setJpaUtilsClassName("AppCatalogJPAUtils");
    jpaResourceClassGenerator.setResourceTypeClassName("AppCatalogResourceType");
    jpaResourceClassGenerator.setQueryGeneratorClassName("AppCatalogQueryGenerator");
View Full Code Here

 
  public static void testJPAClassGen() {
    SQLData data = createSQLData();
    JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
    jpaClassGenerator.setJpaClassPackageName("org.apache.aiaravata.application.catalog.data.model");
    JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
    System.out.println(jpaClassGenerator.generateJPAClass(model));
    System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
    System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
  }
View Full Code Here

  }
 
  public static void testJPAResourceClassGen() {
    SQLData data = createSQLData();
    JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
    JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
    JPAResourceClassGenerator jpaResourceClassGenerator = new JPAResourceClassGenerator();
    jpaResourceClassGenerator.setExceptionClassName("AppCatalogException");
    jpaResourceClassGenerator.setJpaUtilsClassName("AppCatalogJPAUtils");
    jpaResourceClassGenerator.setResourceTypeClassName("AppCatalogResourceType");
    jpaResourceClassGenerator.setQueryGeneratorClassName("AppCatalogQueryGenerator");
View Full Code Here

 
  public static void testJPAClassGen() {
    SQLData data = createSQLData();
    JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
    jpaClassGenerator.setJpaClassPackageName("org.apache.aiaravata.application.catalog.data.model");
    JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
    System.out.println(jpaClassGenerator.generateJPAClass(model));
    System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
    System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
  }
View Full Code Here

TOP

Related Classes of model.JPAClassModel

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.