Package com.ibm.dbb.migration
Class AbstractMappingRule
- java.lang.Object
-
- com.ibm.dbb.migration.AbstractMappingRule
-
- All Implemented Interfaces:
IMappingRule
- Direct Known Subclasses:
MappingRule
public abstract class AbstractMappingRule extends java.lang.Object implements IMappingRule
-
-
Constructor Summary
Constructors Constructor Description AbstractMappingRule(java.io.File repository, java.util.Map<java.lang.String,java.lang.String> attributes)
Construct a mapping rule from a GIT repository and a set of attributes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAttr(java.lang.String name)
Returns the value of the mapping rule attributejava.lang.String
getAttr(java.lang.String name, java.lang.String defaultValue)
Returns the value of the mapping rule attributeboolean
getBooleanAttr(java.lang.String name)
Returns theboolean
value of the mapping rule attributeboolean
getBooleanAttr(java.lang.String name, boolean defaultValue)
Returns theboolean
value of the mapping rule attributejava.io.File
getFileAttr(java.lang.String name)
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.dbb.migration.IMappingRule
generateMapping
-
-
-
-
Constructor Detail
-
AbstractMappingRule
public AbstractMappingRule(java.io.File repository, java.util.Map<java.lang.String,java.lang.String> attributes)
Construct a mapping rule from a GIT repository and a set of attributes- Parameters:
repository
- the name of the repositoryattributes
- the value of the attribute
-
-
Method Detail
-
getAttr
public java.lang.String getAttr(java.lang.String name)
Returns the value of the mapping rule attribute- Parameters:
name
- the name of the attribute to look up- Returns:
- the value of the attribute or
null
if not found
-
getAttr
public java.lang.String getAttr(java.lang.String name, java.lang.String defaultValue)
Returns the value of the mapping rule attribute- Parameters:
name
- the name of the attribute to look updefaultValue
- the default value if the attribute is not found- Returns:
- the value of the attribute or
null
if not found
-
getBooleanAttr
public boolean getBooleanAttr(java.lang.String name)
Returns theboolean
value of the mapping rule attribute- Parameters:
name
- the name of the attribute to look up- Returns:
- the boolean value of the attribute or
false
if not found
-
getBooleanAttr
public boolean getBooleanAttr(java.lang.String name, boolean defaultValue)
Returns theboolean
value of the mapping rule attribute- Parameters:
name
- the name of the attribute to look updefaultValue
- the default value to be returned if attribute is not found- Returns:
- the boolean value of the attribute or
false
if not found
-
getFileAttr
public java.io.File getFileAttr(java.lang.String name)
-
-