/** * Run the tool. Returns false if any invalid options were given. */ public static boolean run(OpenJPAConfiguration conf, String[] args, Options opts) throws IOException { Flags flags = new Flags(); flags.action = opts.removeProperty("action", "a", flags.action); String fileName = opts.removeProperty("file", "f", null); if ("stdout".equals(fileName)) { flags.writer = new PrintWriter(System.out); fileName = null; } else if ("stderr".equals(fileName)) { flags.writer = new PrintWriter(System.err); fileName = null; } Configurations.populateConfiguration(conf, opts); ClassLoader loader = conf.getClassResolverInstance(). getClassLoader(MetaDataTool.class, null); if (fileName != null) flags.file = Files.getFile(fileName, loader); return run(conf, args, flags, null, loader); }
/** * Run the tool. Returns false if any invalid options were given. */ public static boolean run(OpenJPAConfiguration conf, String[] args, Options opts) throws IOException { Flags flags = new Flags(); flags.action = opts.removeProperty("action", "a", flags.action); String fileName = opts.removeProperty("file", "f", null); if ("stdout".equals(fileName)) { flags.writer = new PrintWriter(System.out); fileName = null; } else if ("stderr".equals(fileName)) { flags.writer = new PrintWriter(System.err); fileName = null; } Configurations.populateConfiguration(conf, opts); ClassLoader loader = conf.getClassResolverInstance(). getClassLoader(MetaDataTool.class, null); if (fileName != null) flags.file = Files.getFile(fileName, loader); return run(conf, args, flags, null, loader); }
/** * Run the tool. Returns false if any invalid options were given. */ public static boolean run(OpenJPAConfiguration conf, String[] args, Options opts) throws IOException { Flags flags = new Flags(); flags.action = opts.removeProperty("action", "a", flags.action); String fileName = opts.removeProperty("file", "f", null); if ("stdout".equals(fileName)) { flags.writer = new PrintWriter(System.out); fileName = null; } else if ("stderr".equals(fileName)) { flags.writer = new PrintWriter(System.err); fileName = null; } Configurations.populateConfiguration(conf, opts); ClassLoader loader = conf.getClassResolverInstance(). getClassLoader(MetaDataTool.class, null); if (fileName != null) flags.file = Files.getFile(fileName, loader); return run(conf, args, flags, null, loader); }
/** * Run the tool. Returns false if any invalid options were given. */ public static boolean run(OpenJPAConfiguration conf, String[] args, Options opts) throws IOException { Flags flags = new Flags(); flags.action = opts.removeProperty("action", "a", flags.action); String fileName = opts.removeProperty("file", "f", null); if ("stdout".equals(fileName)) { flags.writer = new PrintWriter(System.out); fileName = null; } else if ("stderr".equals(fileName)) { flags.writer = new PrintWriter(System.err); fileName = null; } Configurations.populateConfiguration(conf, opts); ClassLoader loader = conf.getClassResolverInstance(). getClassLoader(MetaDataTool.class, null); if (fileName != null) flags.file = Files.getFile(fileName, loader); return run(conf, args, flags, null, loader); }
/** * Run the tool. Returns false if any invalid options were given. */ public static boolean run(OpenJPAConfiguration conf, String[] args, Options opts) throws IOException { Flags flags = new Flags(); flags.action = opts.removeProperty("action", "a", flags.action); String fileName = opts.removeProperty("file", "f", null); if ("stdout".equals(fileName)) { flags.writer = new PrintWriter(System.out); fileName = null; } else if ("stderr".equals(fileName)) { flags.writer = new PrintWriter(System.err); fileName = null; } Configurations.populateConfiguration(conf, opts); ClassLoader loader = conf.getClassResolverInstance(). getClassLoader(MetaDataTool.class, null); if (fileName != null) flags.file = Files.getFile(fileName, loader); return run(conf, args, flags, null, loader); }