|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.jchem.db.RegenerationChecker
public class RegenerationChecker
Class for checking if regeneration is necessary.
| Field Summary | |
|---|---|
static java.lang.String |
ATTR_ID
|
static java.lang.String |
ATTR_OPERATION
|
protected static java.lang.String |
defaultXmlFile
|
static java.lang.String |
OPER_EQUALS
|
static java.lang.String |
OPER_NOT_EQUALS
|
static java.lang.String |
TAG_CONDITION
|
static java.lang.String |
TAG_CT
|
static java.lang.String |
TAG_FULL
|
static java.lang.String |
TAG_MD
|
static java.lang.String |
TAG_NOCT
|
static java.lang.String |
TAG_PROPERTY
|
static java.lang.String |
TAG_PROPERTY_NAME
|
static java.lang.String |
TAG_PROPERTY_VALUE
|
static java.lang.String |
TAG_TABLE_VERSION
|
protected static org.w3c.dom.Document |
xml
|
protected static java.lang.String |
xmlName
|
| Constructor Summary | |
|---|---|
RegenerationChecker()
|
|
| Method Summary | |
|---|---|
static int |
deduceTableVersion(java.lang.String tableName,
DatabaseProperties dp)
Deduce a table's version from its properties and current regeneration conditions. |
static int |
deduceTableVersion(java.lang.String tableName,
DatabaseProperties dp,
int regenerationType)
Deduce a table's version from its properties and current regeneration conditions. |
static java.util.List<java.lang.String> |
getColumnsToRegenerate(ConnectionHandler conh,
java.lang.String tableName,
int regenerationType)
Return the columns should be regenerated in a table depending on a regeneration type. |
static int |
getRegenerationTypeForTable(DatabaseProperties dp,
java.lang.String tableName)
Get which kind of regeneration is needed for a structure table. |
static java.util.List<java.lang.String> |
getTablesToRegenerate(ConnectionHandler conh,
int regenerationType)
Give back the tables that need a type of regeneration. |
static org.w3c.dom.Document |
getXml(java.lang.String xmlFileName)
Read the xml file that contains the regeneration information. |
static int |
isRegenerationNeeded(java.lang.String tableName,
DatabaseProperties dp)
Check whether any regeneration type is needed for a table. |
static int |
isRegenerationNeeded(java.lang.String tableName,
DatabaseProperties dp,
org.w3c.dom.Document xml,
int regenerationType)
Check whether regeneration is needed for a table or not. |
static int |
isRegenerationNeeded(java.lang.String tableName,
DatabaseProperties dp,
int regenerationType)
Check whether regeneration is needed for a table. |
static int |
isRegenerationNeededExact(java.lang.String tableName,
DatabaseProperties dp,
org.w3c.dom.Document xml,
int regenerationType)
Check whether a regeneration type is needed for a table or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.w3c.dom.Document xml
protected static java.lang.String xmlName
protected static final java.lang.String defaultXmlFile
public static final java.lang.String TAG_TABLE_VERSION
public static final java.lang.String TAG_CONDITION
public static final java.lang.String TAG_PROPERTY
public static final java.lang.String TAG_PROPERTY_NAME
public static final java.lang.String TAG_PROPERTY_VALUE
public static final java.lang.String TAG_FULL
public static final java.lang.String TAG_CT
public static final java.lang.String TAG_NOCT
public static final java.lang.String TAG_MD
public static final java.lang.String ATTR_ID
public static final java.lang.String ATTR_OPERATION
public static final java.lang.String OPER_EQUALS
public static final java.lang.String OPER_NOT_EQUALS
| Constructor Detail |
|---|
public RegenerationChecker()
| Method Detail |
|---|
public static org.w3c.dom.Document getXml(java.lang.String xmlFileName)
xmlFileName - Path of the xml file that contains the regeneration rules.
public static int isRegenerationNeeded(java.lang.String tableName,
DatabaseProperties dp)
throws java.sql.SQLException
tableName - Name of the table to be checked.dp - DatabaseProperties object.
java.sql.SQLException
public static int isRegenerationNeeded(java.lang.String tableName,
DatabaseProperties dp,
int regenerationType)
throws java.sql.SQLException
tableName - Name of the table to be checked.dp - DatabaseProperties object.regenerationType - Regeneration type defined in RegenerationConstants.
java.sql.SQLException
public static int isRegenerationNeeded(java.lang.String tableName,
DatabaseProperties dp,
org.w3c.dom.Document xml,
int regenerationType)
throws java.sql.SQLException
tableName - Name of the table to be checked.dp - DatabaseProperties object.xml - Xml Document object.regenerationType - Regeneration type defined in RegenerationConstants.
java.sql.SQLException
public static int isRegenerationNeededExact(java.lang.String tableName,
DatabaseProperties dp,
org.w3c.dom.Document xml,
int regenerationType)
throws java.sql.SQLException
tableName - Name of the table to be checked.dp - DatabaseProperties object.xml - Xml Document object.regenerationType - Regeneration type defined in RegenerationConstants.
java.sql.SQLException
public static int deduceTableVersion(java.lang.String tableName,
DatabaseProperties dp)
throws java.sql.SQLException
tableName - Name of the structure tabledp - Database Properties object.
java.sql.SQLException
public static int deduceTableVersion(java.lang.String tableName,
DatabaseProperties dp,
int regenerationType)
throws java.sql.SQLException
tableName - Name of the structure tabledp - Database Properties object.regenerationType - Regeneration type defined in RegenerationConstants.
java.sql.SQLException
public static java.util.List<java.lang.String> getTablesToRegenerate(ConnectionHandler conh,
int regenerationType)
throws java.sql.SQLException
conh - Connection handler.regenerationType - Regeneration type defined in RegenerationConstants.
java.sql.SQLException
public static int getRegenerationTypeForTable(DatabaseProperties dp,
java.lang.String tableName)
throws java.sql.SQLException
dp - DatabaseProperties object.tableName - Name of the table.
RegenerationConstants.
java.sql.SQLException
public static java.util.List<java.lang.String> getColumnsToRegenerate(ConnectionHandler conh,
java.lang.String tableName,
int regenerationType)
throws java.sql.SQLException
conh - Connection handler.tableName - Name of the table.regenerationType - Regeneration type defined in RegenerationConstants.
java.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||