org.objectweb.jorm.mapper.rdb.lib
Class RdbScriptPMSM

java.lang.Object
  extended byorg.objectweb.jorm.mapper.rdb.lib.RdbPMappingStructuresManager
      extended byorg.objectweb.jorm.mapper.rdb.lib.RdbScriptPMSM
All Implemented Interfaces:
PMappingStructuresManager, RdbScriptWriter

public class RdbScriptPMSM
extends RdbPMappingStructuresManager
implements RdbScriptWriter

This class is used to define a dummy PMappingStructuresManager to generate the database creation script.

Author:
Y.Bersihand

Field Summary
 
Fields inherited from class org.objectweb.jorm.mapper.rdb.lib.RdbPMappingStructuresManager
logger
 
Constructor Summary
RdbScriptPMSM(java.lang.String fileName, boolean writeScript)
           
 
Method Summary
 java.lang.String getFileName()
          Get the name of the file to generate.
 java.io.FileWriter getFileWriter()
           
 void init()
          Creates the file.
 boolean isWriteScript()
          Return true if the script has to be written.
 void setFileName(java.lang.String fileName)
           
 void setWriteScript(boolean writeScript)
           
 
Methods inherited from class org.objectweb.jorm.mapper.rdb.lib.RdbPMappingStructuresManager
addDependency, addTableColumn, classDefined, clear, declareClass, getPMapCluster, getPMapClusters, getPMapper, setLogger, setPMapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RdbScriptPMSM

public RdbScriptPMSM(java.lang.String fileName,
                     boolean writeScript)
Method Detail

init

public void init()
          throws PException
Creates the file. The file name MUST be specified before calling this method.

Specified by:
init in interface RdbScriptWriter
Throws:
PException

getFileName

public java.lang.String getFileName()
Description copied from interface: RdbScriptWriter
Get the name of the file to generate.

Specified by:
getFileName in interface RdbScriptWriter

setFileName

public void setFileName(java.lang.String fileName)
Specified by:
setFileName in interface RdbScriptWriter

getFileWriter

public java.io.FileWriter getFileWriter()
Specified by:
getFileWriter in interface RdbScriptWriter

isWriteScript

public boolean isWriteScript()
Description copied from interface: RdbScriptWriter
Return true if the script has to be written.

Specified by:
isWriteScript in interface RdbScriptWriter

setWriteScript

public void setWriteScript(boolean writeScript)
Specified by:
setWriteScript in interface RdbScriptWriter