public class MappingTool
extends java.lang.Object
Constructor | Description |
---|---|
MappingTool() |
Constructor, builds up the relations.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addClass(java.lang.Class cls) |
Adds the given Class to the mapping file.
|
void |
addClass(java.lang.Class cls,
boolean deep) |
Adds the given Class to the mapping file.
|
void |
addClass(java.lang.String name) |
Adds the Class, specified by the given name, to the mapping file.
|
void |
addClass(java.lang.String name,
boolean deep) |
Adds the Class, specified by the given name, to the mapping file.
|
static void |
main(java.lang.String[] args) |
Command line method.
|
void |
setForceIntrospection(boolean force) |
Enables or disables the forcing of introspection when a ClassDescriptor
already exists.
|
void |
setInternalContext(InternalContext internalContext) |
To set the XMLContext to be used.
|
void |
write(java.io.Writer writer) |
Serializes the mapping to the given writer.
|
public static void main(java.lang.String[] args)
args
- the command line parameterspublic void addClass(java.lang.String name) throws MappingException
name
- the name of the Class to addMappingException
- in case that the name is null or the Class can not be loadedpublic void addClass(java.lang.String name, boolean deep) throws MappingException
name
- the name of the Class to adddeep
- a flag to indicate that recursive processing should take place
and all classes used by the given class should also be added
to the mapping file. This flag is true by default.MappingException
- in case that the name is null or the Class can not be loadedpublic void addClass(java.lang.Class cls) throws MappingException
cls
- the Class to addMappingException
- in case that the name is null or the Class can not be loadedpublic void addClass(java.lang.Class cls, boolean deep) throws MappingException
cls
- the Class to adddeep
- a flag to indicate that recursive processing should take place
and all classes used by the given class should also be added
to the mapping file. This flag is true by default.MappingException
- in case that the name is null or the Class can not be loadedpublic void setForceIntrospection(boolean force)
force
- when true will cause the MappingTool to always use
introspection regardless of whether or not a ClassDescriptor
exists for a given Class.public void write(java.io.Writer writer) throws MappingException
writer
- the Writer to serialize the mapping toMappingException
- if writing the mapping information failspublic void setInternalContext(InternalContext internalContext)
internalContext
- the XMLContext to be usedIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com