Package model

Examples of model.SQLData$ForiegnKeyData


import model.JPAResourceClassModel;
import model.SQLData;

public class DataMovementInterfaceGenerator {
  private static SQLData createSQLData() {
    SQLData data = new SQLData();
    data.setTableName("DATA_MOVEMENT_INTERFACE");
    data.getFieldData().put("COMPUTE_RESOURCE_ID", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
    data.getFieldData().put("DATA_MOVEMENT_INTERFACE_ID", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
    data.getFieldData().put("DATA_MOVEMENT_PROTOCOL", Arrays.asList(new String[]{"VARCHAR", "(255)","NOT", "NULL"}));
    data.getFieldData().put("PRIORITY_ORDER", Arrays.asList(new String[]{"INTEGER"}));
    data.getPrimaryKeys().add("COMPUTE_RESOURCE_ID");
    data.getPrimaryKeys().add("DATA_MOVEMENT_INTERFACE_ID");
    data.getForiegnKeys().put("COMPUTE_RESOURCE_ID", new SQLData.ForiegnKeyData("COMPUTE_RESOURCE(RESOURCE_ID)","ComputeResource","ComputeHostResource"));
    return data;
  }
View Full Code Here


    data.getPrimaryKeys().add("DATA_MOVEMENT_INTERFACE_ID");
    data.getForiegnKeys().put("COMPUTE_RESOURCE_ID", new SQLData.ForiegnKeyData("COMPUTE_RESOURCE(RESOURCE_ID)","ComputeResource","ComputeHostResource"));
    return data;
  }
  public static void testSqlGen() {
    SQLData data = createSQLData();
    SQLGenerator sqlGenerator = new SQLGenerator();
    System.out.println(sqlGenerator.generateSQLCreateQuery(data));
  }
View Full Code Here

    SQLGenerator sqlGenerator = new SQLGenerator();
    System.out.println(sqlGenerator.generateSQLCreateQuery(data));
  }
 
  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));
View Full Code Here

    System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
    System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
  }
 
  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");
View Full Code Here

import model.JPAResourceClassModel;
import model.SQLData;

public class JobManagerCommandGenerator {
  private static SQLData createSQLData() {
    SQLData data = new SQLData();
    data.setTableName("JOB_MANAGER_COMMAND");
    data.getFieldData().put("RESOURCE_JOB_MANAGER_ID", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
    data.getFieldData().put("COMMAND_TYPE", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
    data.getFieldData().put("COMMAND", Arrays.asList(new String[]{"VARCHAR", "(255)",}));
    data.getPrimaryKeys().add("RESOURCE_JOB_MANAGER_ID");
    data.getPrimaryKeys().add("COMMAND_TYPE");
    data.getForiegnKeys().put("RESOURCE_JOB_MANAGER_ID", new SQLData.ForiegnKeyData("RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)","ResourceJobManager","ResourceJobManagerResource"));
    return data;
  }
View Full Code Here

    data.getPrimaryKeys().add("COMMAND_TYPE");
    data.getForiegnKeys().put("RESOURCE_JOB_MANAGER_ID", new SQLData.ForiegnKeyData("RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)","ResourceJobManager","ResourceJobManagerResource"));
    return data;
  }
  public static void testSqlGen() {
    SQLData data = createSQLData();
    SQLGenerator sqlGenerator = new SQLGenerator();
    System.out.println(sqlGenerator.generateSQLCreateQuery(data));
  }
View Full Code Here

    SQLGenerator sqlGenerator = new SQLGenerator();
    System.out.println(sqlGenerator.generateSQLCreateQuery(data));
  }
 
  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));
View Full Code Here

    System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
    System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
  }
 
  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");
View Full Code Here

import java.util.Arrays;

public class ModuleCMDGenerator {
    private static SQLData createSQLData() {
        SQLData data = new SQLData();
        data.setTableName("MODULE_LOAD_CMD");
        data.getFieldData().put("CMD", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
        data.getFieldData().put("APP_DEPLOYMENT_ID", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
        data.getPrimaryKeys().add("APP_DEPLOYMENT_ID");
        data.getPrimaryKeys().add("CMD");
        data.getForiegnKeys().put("APP_DEPLOYMENT_ID", new SQLData.ForiegnKeyData("APPLICATION_DEPLOYMENT(DEPLOYMENT_ID)","ApplicationDeployment","AppDeploymentResource"));
        return data;
    }
View Full Code Here

        data.getPrimaryKeys().add("CMD");
        data.getForiegnKeys().put("APP_DEPLOYMENT_ID", new SQLData.ForiegnKeyData("APPLICATION_DEPLOYMENT(DEPLOYMENT_ID)","ApplicationDeployment","AppDeploymentResource"));
        return data;
    }
    public static void testSqlGen() {
        SQLData data = createSQLData();
        SQLGenerator sqlGenerator = new SQLGenerator();
        System.out.println(sqlGenerator.generateSQLCreateQuery(data));
    }
View Full Code Here

TOP

Related Classes of model.SQLData$ForiegnKeyData

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.