public static class SchemaConfig.NsConfig
extends java.lang.Object
This class is public since it must be accessed as part of the public API for the containing class.
| Modifier and Type | Class and Description |
|---|---|
static class |
SchemaConfig.NsConfig.DialectParam
Helper class to read and set the dialect parameter.
|
| Modifier and Type | Field and Description |
|---|---|
private int |
conversion
SQL name conversion override for SQL table and column names.
|
private boolean |
defDb
Flag indicating if namespace is loaded by default.
|
private java.lang.String |
importFile
Name of
.df import file. |
private boolean |
mutable
Whether the schema is mutable (it can be modified externally and is scanned at runtime)
|
private java.lang.String |
name
Identifying name for namespace.
|
private java.util.Map<java.lang.String,java.lang.String> |
parameters
Namespace parameters.
|
private boolean |
prefer
Namespace is preferred in ambiguous name conflicts.
|
| Constructor and Description |
|---|
NsConfig()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDialectParameter(SchemaConfig.NsConfig.DialectParam dialectParam)
Add the specified dialect parameters to the namespace.
|
void |
addParameter(Parameter param)
Add the specified parameter to the namespace.
|
java.lang.String |
getConversion()
Get the type of conversion performed on SQL names.
|
java.lang.String |
getDataArtifactsLocation()
Get the location for
.dict, .schema, and .p2o files of this namespace. |
java.lang.String |
getImportFile()
Get DF import filename, defaulting to standard location for
.df files if not explicitly
configured in p2j.cfg.xml. |
java.lang.String |
getName()
Get identifying namespace name.
|
java.lang.String |
getParameter(java.lang.String param)
Get the value for the specified namespace parameter.
|
boolean |
isDefault()
Is this namespace loaded in the schema dictionary by default?
|
boolean |
isMutable()
Get the mutable flag.
|
boolean |
isPreferred()
Is this namespace preferred when its components are involved in
ambiguous name conflicts?
|
void |
setConversion(java.lang.String conversion)
Set the type of conversion performed on SQL names.
|
void |
setDefault(boolean defDb)
Set default flag for this namespace configuration.
|
void |
setImportFile(java.lang.String importFile)
Set DF import filename.
|
void |
setMutable(boolean mutable)
Set the mutable flag.
|
void |
setName(java.lang.String name)
Set name.
|
void |
setPreferred(boolean prefer)
Set preferred flag for this namespace configuration.
|
void |
setXmlFile(java.lang.String xmlFile)
Notify of the extra namespace parameter instead of abending the application.
|
private java.lang.String name
private boolean mutable
private java.lang.String importFile
.df import file.private int conversion
private boolean defDb
private boolean prefer
private final java.util.Map<java.lang.String,java.lang.String> parameters
public java.lang.String getName()
public void setName(java.lang.String name)
name - Namespace name.public boolean isMutable()
true if the database schema is mutable, else false.public void setMutable(boolean mutable)
mutable - true if the database schema is mutable, else false.public java.lang.String getImportFile()
.df files if not explicitly
configured in p2j.cfg.xml.public void setImportFile(java.lang.String importFile)
importFile - Import filename.public java.lang.String getConversion()
public void setConversion(java.lang.String conversion)
conversion - Type of conversion performed on SQL names.public java.lang.String getDataArtifactsLocation()
.dict, .schema, and .p2o files of this namespace.
This is the same as the directory of the import file, relative to application's jar root at runtime
and relative to $cvtpath at conversion time.public boolean isDefault()
true if namespace is loaded by default, else
false.public void setDefault(boolean defDb)
defDb - true if namespace is loaded by default, else
false.public boolean isPreferred()
true if namespace is preferred, else
false.public void setPreferred(boolean prefer)
prefer - true if namespace is preferred, else
false.public void setXmlFile(java.lang.String xmlFile)
"xmlFile" from the namespace options list (see its XML setup in
Configuration.setupHandler) will be removed in a future revision.xmlFile - ignoredpublic void addParameter(Parameter param)
param - The parameter.public void addDialectParameter(SchemaConfig.NsConfig.DialectParam dialectParam)
All the parameter's names will follow the [dialect]/[parameter] syntax.
dialectParam - The dialect parameter.public java.lang.String getParameter(java.lang.String param)
param - The parameter name.