Package org.apache.cayenne.gen

Examples of org.apache.cayenne.gen.ClassGenerationAction


    try {
      loaderAction.setAdditionalDataMapFiles(convertAdditionalDataMaps());

      DataMap dataMap = loaderAction.getMainDataMap();

      ClassGenerationAction generator = createGenerator();
      generator.setLogger(logger);
      generator.setTimestamp(map.lastModified());
      generator.setDataMap(dataMap);
      generator.addEntities(filterAction.getFilteredEntities(dataMap));
      generator.addEmbeddables(filterAction
          .getFilteredEmbeddables(dataMap));
      generator.execute();
    } catch (Exception e) {
      throw new MojoExecutionException("Error generating classes: ", e);
    }
  }
View Full Code Here


   * Factory method to create internal class generator. Called from
   * constructor.
   */
  protected ClassGenerationAction createGenerator() {

    ClassGenerationAction action;
    if (client) {
      action = new ClientClassGenerationAction();
    } else if (ClassGenerator.VERSION_1_1.equals(version)) {
      action = new ClassGenerationAction1_1();
    } else {
      action = new ClassGenerationAction();
    }

    action.setDestDir(destDir);
    action.setEncoding(encoding);
    action.setMakePairs(makePairs);
    action.setArtifactsGenerationMode(mode);
    action.setOutputPattern(outputPattern);
    action.setOverwrite(overwrite);
    action.setSuperPkg(superPkg);
    action.setSuperTemplate(superTemplate);
    action.setTemplate(template);
    action.setEmbeddableSuperTemplate(embeddableSuperTemplate);
    action.setEmbeddableTemplate(embeddableTemplate);
    action.setUsePkgPath(usePkgPath);

    return action;
  }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.gen.ClassGenerationAction

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.