|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.solarmetric.rd.kodo.impl.jdbc.meta.SingleRowDBMappingFactory
Factory that uses an XML mapping definition stored in the database to record the system mappings.
| Field Summary | |
static java.lang.String |
ACTION_ADD
|
static java.lang.String |
ACTION_DROP
|
| Constructor Summary | |
SingleRowDBMappingFactory()
|
|
| Method Summary | |
boolean |
dropMappings(com.solarmetric.rd.kodo.meta.ClassMetaData[] types)
Delete the given mappings. |
void |
dropTable()
Drops the mapping table in the DB. |
com.solarmetric.rd.kodo.impl.jdbc.meta.ClassIndicator[] |
getAvailableClassIndicators()
Return a list of all available class indicators, ordered from most to least general. |
com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping[] |
getAvailableClassMappings()
Return a list of all available class mappings, ordered from most to least general. |
com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping[] |
getAvailableFieldMappings()
Return a list of all available field mappings, ordered from least to most general. |
com.solarmetric.rd.kodo.impl.jdbc.meta.VersionIndicator[] |
getAvailableVersionIndicators()
Return a list of all available version indicators, ordered from most to least general. |
com.solarmetric.rd.kodo.impl.jdbc.schema.Column |
getBKColumn()
|
com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration |
getConfiguration()
|
protected java.sql.Connection |
getConnection()
Return a connection to use. |
com.solarmetric.rd.kodo.impl.jdbc.schema.Column |
getMappingColumn()
|
com.solarmetric.rd.kodo.impl.jdbc.schema.Column |
getPKColumn()
|
boolean |
isSingleOperation()
Return true if this factory reads and writes all system mappings at once. |
static void |
main(java.lang.String[] args)
Usage: java com.solarmetric.kodo.impl.jdbc.schema.SingleRowDBMappingFactory [option]* -action/-a <add | drop> |
void |
readMapping(com.solarmetric.rd.kodo.meta.ClassMetaData type,
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository repos)
Read the object-relational mapping for the given persistent type and add it to the given repository. |
java.lang.String |
readMappingColumn()
Returns the mappings as an XML string. |
void |
refreshTable()
Creates the mapping table in the DB. |
boolean |
revertMappings(com.solarmetric.rd.kodo.meta.ClassMetaData[] types)
Revert the mappings to their last saved state, or return false if any cannot be reverted. |
static boolean |
run(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf,
java.lang.String action)
Run the tool. |
void |
setConfiguration(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
Set the configuration for the factory. |
void |
storeMappings(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository mappings,
com.solarmetric.rd.kodo.meta.JDOMetaDataRepository repos)
Store any changes made to the given mappings, including their field mappings. |
void |
writeMappingColumn(java.lang.String mapping,
java.lang.String lastMapping)
Writes the mappings as a string to the database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String ACTION_ADD
public static final java.lang.String ACTION_DROP
| Constructor Detail |
public SingleRowDBMappingFactory()
| Method Detail |
public com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration getConfiguration()
public void setConfiguration(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
MappingFactory
setConfiguration in interface MappingFactorypublic com.solarmetric.rd.kodo.impl.jdbc.schema.Column getPKColumn()
public com.solarmetric.rd.kodo.impl.jdbc.schema.Column getMappingColumn()
public com.solarmetric.rd.kodo.impl.jdbc.schema.Column getBKColumn()
public boolean isSingleOperation()
MappingFactoryMappingFactory.readMapping(com.solarmetric.rd.kodo.meta.ClassMetaData, com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository) and MappingFactory.revertMappings(com.solarmetric.rd.kodo.meta.ClassMetaData[]) calls that pass
in a null meta data argument.
isSingleOperation in interface MappingFactory
public void readMapping(com.solarmetric.rd.kodo.meta.ClassMetaData type,
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository repos)
MappingFactory
readMapping in interface MappingFactorytype - the type to read mapping information forrepos - add the mapping information to this repository
public void storeMappings(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository mappings,
com.solarmetric.rd.kodo.meta.JDOMetaDataRepository repos)
MappingFactory
storeMappings in interface MappingFactorymappings - the changed mappingsrepos - can be used to access class metadata if needed
public void refreshTable()
throws java.sql.SQLException
java.sql.SQLException
public void dropTable()
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean revertMappings(com.solarmetric.rd.kodo.meta.ClassMetaData[] types)
MappingFactory
revertMappings in interface MappingFactorytypes - the types to revert
public boolean dropMappings(com.solarmetric.rd.kodo.meta.ClassMetaData[] types)
MappingFactory
dropMappings in interface MappingFactorytypes - the types to drop
public com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping[] getAvailableClassMappings()
MappingFactory
getAvailableClassMappings in interface MappingFactorypublic com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping[] getAvailableFieldMappings()
MappingFactoryMapping.map() method on a new instance of each
returned mapping util one returns true, or until the list is exhausted.
Implementations are free to use or add to the standard mappings list
available from FieldMapping.getDefaults().
getAvailableFieldMappings in interface MappingFactorypublic com.solarmetric.rd.kodo.impl.jdbc.meta.VersionIndicator[] getAvailableVersionIndicators()
MappingFactory
getAvailableVersionIndicators in interface MappingFactorypublic com.solarmetric.rd.kodo.impl.jdbc.meta.ClassIndicator[] getAvailableClassIndicators()
MappingFactory
getAvailableClassIndicators in interface MappingFactory
public java.lang.String readMappingColumn()
throws java.sql.SQLException
java.sql.SQLException
public void writeMappingColumn(java.lang.String mapping,
java.lang.String lastMapping)
throws java.sql.SQLException
java.sql.SQLException
protected java.sql.Connection getConnection()
throws java.sql.SQLException
java.sql.SQLException
public static void main(java.lang.String[] args)
throws java.io.IOException,
java.sql.SQLException
Usage: java com.solarmetric.kodo.impl.jdbc.schema.SingleRowDBMappingFactory [option]* -action/-a <add | drop>
Where the following options are recognized.
JDBCConfiguration. Optional.JDBCConfiguration can be set by
using their names and supplying a value. For example:
-licenseKey adslfja83r3lkadfThe various actions are as follows.
java.io.IOException
java.sql.SQLException
public static boolean run(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf,
java.lang.String action)
throws java.sql.SQLException
java.sql.SQLException
|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||