org.clazzes.jdbc2xml.tools
Class ProcessRestrictionFilter
java.lang.Object
org.clazzes.jdbc2xml.tools.ProcessRestrictionFilter
- All Implemented Interfaces:
- IndexFilter, TableFilter
public class ProcessRestrictionFilter
- extends java.lang.Object
- implements TableFilter
This class holds all properties to customize dumping and restoring
database to/from XML files.
- Author:
- lech
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tableNames
protected java.lang.String[] tableNames
excludedTableNames
protected java.lang.String[] excludedTableNames
primaryRestrictions
protected java.util.Map<java.lang.String,java.lang.String> primaryRestrictions
processData
protected boolean processData
processConstraints
protected boolean processConstraints
processXmlSchemaCheck
protected boolean processXmlSchemaCheck
prettyPrintXml
protected boolean prettyPrintXml
ProcessRestrictionFilter
public ProcessRestrictionFilter()
processTable
public boolean processTable(java.lang.String tableName)
- Specified by:
processTable
in interface TableFilter
- Parameters:
tableName
- The table name.
- Returns:
- Whether the table with the given name shall be processed.
getTableNames
public java.lang.String[] getTableNames()
- Returns:
- the tableNames
setTableNames
public void setTableNames(java.lang.String[] tableNames)
- Parameters:
tableNames
- the tableNames to set
getExcludedTableNames
public java.lang.String[] getExcludedTableNames()
- Returns:
- the excludedTableNames
setExcludedTableNames
public void setExcludedTableNames(java.lang.String[] excludedTableNames)
- Parameters:
excludedTableNames
- the excludedTableNames to set
isProcessData
public boolean isProcessData()
- Returns:
- the processData
setProcessData
public void setProcessData(boolean processData)
- Parameters:
processData
- the processData to set
isProcessConstraints
public boolean isProcessConstraints()
- Returns:
- the processConstraints
setProcessConstraints
public void setProcessConstraints(boolean processConstraints)
- Parameters:
processConstraints
- the processConstraints to set
getBatchSize
public int getBatchSize()
- Returns:
- the batchSize
setBatchSize
public void setBatchSize(int batchSize)
- Parameters:
batchSize
- the batchSize to set
isProcessXmlSchemaCheck
public boolean isProcessXmlSchemaCheck()
- Returns:
- the processXmlSchemaCheck
setProcessXmlSchemaCheck
public void setProcessXmlSchemaCheck(boolean processXmlSchemaCheck)
- Parameters:
processXmlSchemaCheck
- the processXmlSchemaCheck to set
isPrettyPrintXml
public boolean isPrettyPrintXml()
- Returns:
- the prettyPrintXml
setPrettyPrintXml
public void setPrettyPrintXml(boolean prettyPrintXml)
- Parameters:
prettyPrintXml
- the prettyPrintXml to set
isKeepInternalIndices
public boolean isKeepInternalIndices()
- Specified by:
isKeepInternalIndices
in interface IndexFilter
- Returns:
- Whether we should keep indices generated by the RDBMS, which are covering
primary key / and or foreign key columns.
setKeepInternalIndices
public void setKeepInternalIndices(boolean keepInternalIndices)
- Parameters:
keepInternalIndices
- The keepInternalIndices flag to set.
getPrimaryRestrictions
public java.util.Map<java.lang.String,java.lang.String> getPrimaryRestrictions()
- Returns:
- The restrictions on the primary key of a table.
The keys of the map are table names, whose data is restricted.
The values are the primary key values to which the table data is restricted.
If the primary key value is null, the table data should be omitted and
foreign key columns in tables, which import the primary key of the given table
should be set to null.
setPrimaryRestrictions
public void setPrimaryRestrictions(java.util.Map<java.lang.String,java.lang.String> primaryRestrictions)
- Parameters:
primaryRestrictions
- the primaryRestrictions to set
addPrimaryRestriction
public void addPrimaryRestriction(java.lang.String table,
java.lang.String pkValue)
- Add a data restriction to a given table.
- Parameters:
table
- The table which shall be restricted.pkValue
- The primary key value which restricts the table data.
If this value is null, the nullable foreign keys of the
table are not used to restrict the table data, but are set
to null, if the dependent dataset is not present in the target
database.
Copyright © 2008. All Rights Reserved.