org.objectweb.jorm.comp.cmdline.rdb
Class RdbMapperOption

java.lang.Object
  |
  +--org.objectweb.jorm.comp.cmdline.rdb.RdbMapperOption
All Implemented Interfaces:
CmdLineParser, Loggable

public class RdbMapperOption
extends java.lang.Object
implements CmdLineParser, Loggable

Author:
Sebastien Chassande-Barrioz

Field Summary
static java.lang.String CLASS_NAME
           
static java.lang.String DATABASE_OPTION_NAME
           
static java.lang.String DATABASE_OPTION_NAME_FULL
           
static java.lang.String DATABASE_OPTION_SINGLE_NAME
           
 java.lang.String dataBaseName
           
protected  org.objectweb.util.monolog.api.Logger logger
           
protected  org.objectweb.util.monolog.api.LoggerFactory loggerFactory
           
static java.lang.String SINGLE_CLASS_NAME
           
 
Constructor Summary
RdbMapperOption()
           
 
Method Summary
 java.lang.String getDataBaseName()
           
 org.objectweb.util.monolog.api.Logger getLogger()
          Returns a logger to an component that wants to log things.
 org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()
          Returns a logger factory that allows the creation of new loggers.
 int parseArgument(java.lang.String[] args, int i)
          Parses options from a command line and returns the next index in the list of arguments when encounters an unknown option.
 void parseProperty(java.lang.String elem, java.lang.String value)
          Assigns to the elem tag, the corresponding value.
 void setDataBaseName(java.lang.String dataBaseName)
           
 void setLogger(org.objectweb.util.monolog.api.Logger l)
          Assigns a logger to an component that wants to log things.
 void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory lf)
          Assigns a logger factory that allows the creation of new loggers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.objectweb.util.monolog.api.Logger logger

loggerFactory

protected org.objectweb.util.monolog.api.LoggerFactory loggerFactory

dataBaseName

public java.lang.String dataBaseName

SINGLE_CLASS_NAME

public static final java.lang.String SINGLE_CLASS_NAME

CLASS_NAME

public static final java.lang.String CLASS_NAME

DATABASE_OPTION_NAME

public static final java.lang.String DATABASE_OPTION_NAME

DATABASE_OPTION_NAME_FULL

public static final java.lang.String DATABASE_OPTION_NAME_FULL

DATABASE_OPTION_SINGLE_NAME

public static final java.lang.String DATABASE_OPTION_SINGLE_NAME
Constructor Detail

RdbMapperOption

public RdbMapperOption()
Method Detail

getDataBaseName

public java.lang.String getDataBaseName()

setDataBaseName

public void setDataBaseName(java.lang.String dataBaseName)

parseArgument

public int parseArgument(java.lang.String[] args,
                         int i)
Parses options from a command line and returns the next index in the list of arguments when encounters an unknown option. This method is used by the CommandLineParser to parse unknows option which are in link with the current object.
Specified by:
parseArgument in interface CmdLineParser
Parameters:
args - the list of arguments. This list contains known options for the current object to the beginning of the list, and unknown options to the end of the list.
i - the current index to parse the args list
Returns:
the new current index to continue the parsing

parseProperty

public void parseProperty(java.lang.String elem,
                          java.lang.String value)
Assigns to the elem tag, the corresponding value. This method is used by the CompilerParameter when the jorm.properties is read.
Specified by:
parseProperty in interface CmdLineParser
Parameters:
elem - the element which is found in the jorm.properties file
value - the value of the corresponding property

getLogger

public org.objectweb.util.monolog.api.Logger getLogger()
Description copied from interface: Loggable
Returns a logger to an component that wants to log things.
Specified by:
getLogger in interface Loggable
Following copied from interface: org.objectweb.jorm.util.api.Loggable
Parameters:
logger - the logger object

getLoggerFactory

public org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()
Description copied from interface: Loggable
Returns a logger factory that allows the creation of new loggers.
Specified by:
getLoggerFactory in interface Loggable
Following copied from interface: org.objectweb.jorm.util.api.Loggable
Parameters:
loggerfactory - the LoggerFactory object to obtain new loggers

setLogger

public void setLogger(org.objectweb.util.monolog.api.Logger l)
Description copied from interface: Loggable
Assigns a logger to an component that wants to log things.
Specified by:
setLogger in interface Loggable
Following copied from interface: org.objectweb.jorm.util.api.Loggable
Parameters:
logger - the logger object

setLoggerFactory

public void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory lf)
Description copied from interface: Loggable
Assigns a logger factory that allows the creation of new loggers.
Specified by:
setLoggerFactory in interface Loggable
Following copied from interface: org.objectweb.jorm.util.api.Loggable
Parameters:
loggerfactory - the LoggerFactory object to obtain new loggers