Search in sources :

Example 11 with ClassGenerationAction

use of org.apache.cayenne.gen.ClassGenerationAction in project cayenne by apache.

the class StandardModeController method newGenerator.

@Override
protected ClassGenerationAction newGenerator() {
    ClassGenerationAction action = new ClassGenerationAction();
    getApplication().getInjector().injectMembers(action);
    return action;
}
Also used : ClassGenerationAction(org.apache.cayenne.gen.ClassGenerationAction)

Example 12 with ClassGenerationAction

use of org.apache.cayenne.gen.ClassGenerationAction in project cayenne by apache.

the class CayenneGeneratorMojo method createGenerator.

/**
 * Factory method to create internal class generator. Called from
 * constructor.
 */
protected ClassGenerationAction createGenerator() {
    ClassGenerationAction action;
    if (client) {
        action = new ClientClassGenerationAction();
    } else {
        action = new ClassGenerationAction();
    }
    injector.injectMembers(action);
    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);
    action.setCreatePropertyNames(createPropertyNames);
    return action;
}
Also used : ClientClassGenerationAction(org.apache.cayenne.gen.ClientClassGenerationAction) ClassGenerationAction(org.apache.cayenne.gen.ClassGenerationAction) ClientClassGenerationAction(org.apache.cayenne.gen.ClientClassGenerationAction)

Aggregations

ClassGenerationAction (org.apache.cayenne.gen.ClassGenerationAction)12 ClientClassGenerationAction (org.apache.cayenne.gen.ClientClassGenerationAction)6 DataMap (org.apache.cayenne.map.DataMap)4 ToolsModule (org.apache.cayenne.dbsync.reverse.configuration.ToolsModule)3 File (java.io.File)2 Injector (org.apache.cayenne.di.Injector)2 ArrayList (java.util.ArrayList)1 LinkedList (java.util.LinkedList)1 Preferences (java.util.prefs.Preferences)1 CayenneRuntimeException (org.apache.cayenne.CayenneRuntimeException)1 Embeddable (org.apache.cayenne.map.Embeddable)1 ObjEntity (org.apache.cayenne.map.ObjEntity)1 GeneralPreferences (org.apache.cayenne.modeler.dialog.pref.GeneralPreferences)1 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)1 MojoFailureException (org.apache.maven.plugin.MojoFailureException)1 BuildException (org.apache.tools.ant.BuildException)1 GradleException (org.gradle.api.GradleException)1 InvalidUserDataException (org.gradle.api.InvalidUserDataException)1 InputFile (org.gradle.api.tasks.InputFile)1 TaskAction (org.gradle.api.tasks.TaskAction)1