public class MetaDataTool extends Object implements MetaDataModes
Modifier and Type | Class and Description |
---|---|
static class |
MetaDataTool.Flags
Run flags.
|
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_ADD |
static String |
ACTION_DROP |
static String[] |
ACTIONS |
MODE_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY
Constructor and Description |
---|
MetaDataTool(OpenJPAConfiguration conf,
String action)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Reset state.
|
String |
getAction()
The action supplied on construction.
|
File |
getFile()
The file to generate metadata to.
|
MetaDataRepository |
getRepository()
The repository to use to hold metadata.
|
Writer |
getWriter()
The writer to generate metadata to.
|
static void |
main(String[] args)
Usage: java org.apache.openjpa.meta.MetaDataTool [option]*
[-action/-a <add | drop>]
<class name | .java file | .class file>+
Where the following options are recognized.
|
protected MetaDataRepository |
newRepository()
Create a new metadata repository.
|
void |
record()
Record metadata changes.
|
void |
run(Class cls)
Generate new metadata for the given class.
|
static boolean |
run(OpenJPAConfiguration conf,
String[] args,
MetaDataTool.Flags flags,
MetaDataRepository repos,
ClassLoader loader)
Run the tool.
|
static boolean |
run(OpenJPAConfiguration conf,
String[] args,
Options opts)
Run the tool.
|
void |
setFile(File file)
The file to generate metadata to.
|
void |
setRepository(MetaDataRepository repos)
The repository to use to hold metadata.
|
void |
setWriter(Writer writer)
The writer to generate metadata to.
|
public static final String ACTION_ADD
public static final String ACTION_DROP
public static final String[] ACTIONS
public MetaDataTool(OpenJPAConfiguration conf, String action)
public String getAction()
public File getFile()
public void setFile(File file)
public Writer getWriter()
public void setWriter(Writer writer)
public MetaDataRepository getRepository()
protected MetaDataRepository newRepository()
public void setRepository(MetaDataRepository repos)
public void clear()
record()
.public void run(Class cls)
public void record()
public static void main(String[] args) throws IOException
OpenJPAConfiguration
. Optional.OpenJPAConfiguration
can be set by
using their names and supplying a value.IOException
public static boolean run(OpenJPAConfiguration conf, String[] args, Options opts) throws IOException
IOException
public static boolean run(OpenJPAConfiguration conf, String[] args, MetaDataTool.Flags flags, MetaDataRepository repos, ClassLoader loader) throws IOException
IOException
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.