|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ocltf.mapping.Mappings
An object responsible for mapping types in the object model to other language identifiers/types. (For example, Java, SQL, Jdbc, etc). The public constructor should NOT be used to construct this instance. An instance of this object should be retrieved through the method getInstance(java.net.URL).
The mappings will change based upon the language, database, etc being used.
Constructor Summary | |
Mappings()
|
Method Summary | |
void |
addMapping(Mapping mapping)
Adds a JdbcTypeMapping object to the set of current mappings. |
static Mappings |
getInstance(java.lang.String mappingsUri)
Returns a new configured instance of this TypeMappings configured from the mappings configuration URI string. |
static Mappings |
getInstance(java.net.URL mappingsUri)
Returns a new configured instance of this TypeMappings configured from the mappings configuration URI. |
java.lang.String |
getName()
Returns the name name (this is the name for which the type mappings are for). |
java.net.URL |
getResource()
Returns the resource URI from which this Mappings object was loaded. |
java.lang.String |
getTo(java.lang.String from)
Returns the JDBC type for the given model type. |
void |
setName(java.lang.String name)
Sets the name name. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Mappings()
Method Detail |
public static Mappings getInstance(java.lang.String mappingsUri) throws java.net.MalformedURLException
mappingsUri
- the URI to the XML type mappings configuration file.
java.net.MalformedURLException
- when the mappingsUri is invalid (not a valid URL).public static Mappings getInstance(java.net.URL mappingsUri)
mappingsUri
- the URI to the XML type mappings configuration file.
public java.lang.String getName()
public void setName(java.lang.String name)
name
- public void addMapping(Mapping mapping)
mapping
- the JdbcTypeMapping instance.public java.lang.String getTo(java.lang.String from)
from
- the 'from' mapping, this is the type/identifier
that is in the model.
public java.net.URL getResource()
public java.lang.String toString()
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |