Top Description Fields Constructors Methods
org.eclipse.persistence.exceptions

public Class IntegrityChecker

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.util.*, java.io.*, org.eclipse.persistence.internal.helper.*, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession

Purpose: IntegrityChecker is used for catching all the descriptor exceptions, and checking database tables. It gives the user options if he/she wants to catch descriptor exceptions, check database, and check InstantiationPolicy or not.

Field Summary

Modifier and TypeField and Description
protected Vector<Exception>
caughtExceptions

To add all the Descriptor exceptions

protected boolean
shouldCatchExceptions

To know that should we catch all the descriptors exceptions or not

protected boolean
shouldCheckDatabase

To know that should we check database tables or not

protected boolean
shouldCheckInstantiationPolicy

To know that should we check InstantiationPolicy or not

protected Vector<E>
tables

To load the tables from database

Constructor Summary

AccessConstructor and Description
public
IntegrityChecker()

PUBLIC: IntegrityChecker is used for catching all the Descriptor Exceptions, and check database tables.

Method Summary

Modifier and TypeMethod and Description
public void
catchExceptions()

PUBLIC: This method is used for catching all the Descriptor Exceptions

public void
checkDatabase()

PUBLIC: This method is used to check the database tables.

public void
checkInstantiationPolicy()

PUBLIC: This method is used to check the InstantiationPolicy.

public boolean
checkTable(DatabaseTable table, AbstractSession session)

INTERNAL: This method checks that tables are present in the database.

public void
dontCatchExceptions()

PUBLIC: This method is used for don't catching all the Descriptor Exceptions

public void
dontCheckDatabase()

PUBLIC: This method is used for don't checking the database tables and fields.

public void
dontCheckInstantiationPolicy()

PUBLIC: This method is used for don't checking the InstantiationPolicy.

public Vector<Exception>
getCaughtExceptions()

PUBLIC: This method returns the vector which adds all the Descriptors Exceptions.

public Vector<E>
getTables()

INTERNAL: This method returns a vector which holds all the tables of database

public void
handleError(RuntimeException runtimeException)

INTERNAL: This method handles all the Descriptor Exceptions.

public boolean
hasErrors()

INTERNAL: Return if any errors occurred.

public boolean
hasRuntimeExceptions()

INTERNAL: Return if any runtime errors occurred.

public void
initializeTables(AbstractSession session)

INTERNAL: This method is used to get all the database tables and add them into a vector.

public void
setCaughtExceptions(Vector<Exception> exceptions)

INTERNAL:

public void
setShouldCatchExceptions(boolean answer)

PUBLIC: This method assigns the value to the variable (shouldCatchExceptions) that defines whether we should catch all Descriptor Exceptions or not.

public void
setShouldCheckDatabase(boolean answer)

PUBLIC: This method assigns the value to the variable (shouldCheckDatabase) that defines whether we should check the database or not.

public void
setShouldCheckInstantiationPolicy(boolean answer)

PUBLIC: This method assigns the value to the variable (shouldCheckInstantiationPolicy) that defines whether we should check InstantiationPolicy or not.

public boolean
shouldCatchExceptions()

PUBLIC: This method signifies whether all Descriptor Exceptions should be thrown individually or queued.

public boolean
shouldCheckDatabase()

PUBLIC: This method signifies whether database tables and fields should be checked or not.

public boolean
shouldCheckInstantiationPolicy()

PUBLIC: This method tells us whether we should check InstantiationPolicy or not.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

caughtExceptionsback to summary
protected Vector<Exception> caughtExceptions

To add all the Descriptor exceptions

shouldCatchExceptionsback to summary
protected boolean shouldCatchExceptions

To know that should we catch all the descriptors exceptions or not

shouldCheckDatabaseback to summary
protected boolean shouldCheckDatabase

To know that should we check database tables or not

shouldCheckInstantiationPolicyback to summary
protected boolean shouldCheckInstantiationPolicy

To know that should we check InstantiationPolicy or not

tablesback to summary
protected Vector<E> tables

To load the tables from database

Constructor Detail

IntegrityCheckerback to summary
public IntegrityChecker()

PUBLIC: IntegrityChecker is used for catching all the Descriptor Exceptions, and check database tables. IntegrityChecker gives the option to the user that does he wants to catch all the descriptor exceptions,check database, and check InstantiationPolicy or not.

Method Detail

catchExceptionsback to summary
public void catchExceptions()

PUBLIC: This method is used for catching all the Descriptor Exceptions

checkDatabaseback to summary
public void checkDatabase()

PUBLIC: This method is used to check the database tables.

checkInstantiationPolicyback to summary
public void checkInstantiationPolicy()

PUBLIC: This method is used to check the InstantiationPolicy.

checkTableback to summary
public boolean checkTable(DatabaseTable table, AbstractSession session)

INTERNAL: This method checks that tables are present in the database.

dontCatchExceptionsback to summary
public void dontCatchExceptions()

PUBLIC: This method is used for don't catching all the Descriptor Exceptions

dontCheckDatabaseback to summary
public void dontCheckDatabase()

PUBLIC: This method is used for don't checking the database tables and fields.

dontCheckInstantiationPolicyback to summary
public void dontCheckInstantiationPolicy()

PUBLIC: This method is used for don't checking the InstantiationPolicy.

getCaughtExceptionsback to summary
public Vector<Exception> getCaughtExceptions()

PUBLIC: This method returns the vector which adds all the Descriptors Exceptions.

getTablesback to summary
public Vector<E> getTables()

INTERNAL: This method returns a vector which holds all the tables of database

handleErrorback to summary
public void handleError(RuntimeException runtimeException)

INTERNAL: This method handles all the Descriptor Exceptions. This method will throw the exception or add the exceptions into a vector depending on the value of shouldCatchExceptions.

hasErrorsback to summary
public boolean hasErrors()

INTERNAL: Return if any errors occurred.

hasRuntimeExceptionsback to summary
public boolean hasRuntimeExceptions()

INTERNAL: Return if any runtime errors occurred.

initializeTablesback to summary
public void initializeTables(AbstractSession session)

INTERNAL: This method is used to get all the database tables and add them into a vector.

setCaughtExceptionsback to summary
public void setCaughtExceptions(Vector<Exception> exceptions)

INTERNAL:

setShouldCatchExceptionsback to summary
public void setShouldCatchExceptions(boolean answer)

PUBLIC: This method assigns the value to the variable (shouldCatchExceptions) that defines whether we should catch all Descriptor Exceptions or not.

setShouldCheckDatabaseback to summary
public void setShouldCheckDatabase(boolean answer)

PUBLIC: This method assigns the value to the variable (shouldCheckDatabase) that defines whether we should check the database or not.

setShouldCheckInstantiationPolicyback to summary
public void setShouldCheckInstantiationPolicy(boolean answer)

PUBLIC: This method assigns the value to the variable (shouldCheckInstantiationPolicy) that defines whether we should check InstantiationPolicy or not.

shouldCatchExceptionsback to summary
public boolean shouldCatchExceptions()

PUBLIC: This method signifies whether all Descriptor Exceptions should be thrown individually or queued.

shouldCheckDatabaseback to summary
public boolean shouldCheckDatabase()

PUBLIC: This method signifies whether database tables and fields should be checked or not.

shouldCheckInstantiationPolicyback to summary
public boolean shouldCheckInstantiationPolicy()

PUBLIC: This method tells us whether we should check InstantiationPolicy or not.