public class MetaDataTool extends java.lang.Object implements MetaDataModes
Modifier and Type | Class and Description |
---|---|
static class |
MetaDataTool.Flags
Run flags.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_ADD |
static java.lang.String |
ACTION_DROP |
static java.lang.String[] |
ACTIONS |
MODE_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY
Constructor and Description |
---|
MetaDataTool(OpenJPAConfiguration conf,
java.lang.String action)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Reset state.
|
java.lang.String |
getAction()
The action supplied on construction.
|
java.io.File |
getFile()
The file to generate metadata to.
|
MetaDataRepository |
getRepository()
The repository to use to hold metadata.
|
java.io.Writer |
getWriter()
The writer to generate metadata to.
|
static void |
main(java.lang.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(java.lang.Class cls)
Generate new metadata for the given class.
|
static boolean |
run(OpenJPAConfiguration conf,
java.lang.String[] args,
MetaDataTool.Flags flags,
MetaDataRepository repos,
java.lang.ClassLoader loader)
Run the tool.
|
static boolean |
run(OpenJPAConfiguration conf,
java.lang.String[] args,
Options opts)
Run the tool.
|
void |
setFile(java.io.File file)
The file to generate metadata to.
|
void |
setRepository(MetaDataRepository repos)
The repository to use to hold metadata.
|
void |
setWriter(java.io.Writer writer)
The writer to generate metadata to.
|
public static final java.lang.String ACTION_ADD
public static final java.lang.String ACTION_DROP
public static final java.lang.String[] ACTIONS
public MetaDataTool(OpenJPAConfiguration conf, java.lang.String action)
public java.lang.String getAction()
public java.io.File getFile()
public void setFile(java.io.File file)
public java.io.Writer getWriter()
public void setWriter(java.io.Writer writer)
public MetaDataRepository getRepository()
protected MetaDataRepository newRepository()
public void setRepository(MetaDataRepository repos)
public void clear()
record()
.public void run(java.lang.Class cls)
public void record()
public static void main(java.lang.String[] args) throws java.io.IOException
OpenJPAConfiguration
. Optional.OpenJPAConfiguration
can be set by
using their names and supplying a value.java.io.IOException
public static boolean run(OpenJPAConfiguration conf, java.lang.String[] args, Options opts) throws java.io.IOException
java.io.IOException
public static boolean run(OpenJPAConfiguration conf, java.lang.String[] args, MetaDataTool.Flags flags, MetaDataRepository repos, java.lang.ClassLoader loader) throws java.io.IOException
java.io.IOException
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.