Class IntegrityChecker
- java.lang.Object
-
- org.eclipse.persistence.exceptions.IntegrityChecker
-
- All Implemented Interfaces:
java.io.Serializable
public class IntegrityChecker extends java.lang.Object implements java.io.SerializablePurpose: 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.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.VectorcaughtExceptionsTo add all the Descriptor exceptionsprotected booleanshouldCatchExceptionsTo know that should we catch all the descriptors exceptions or notprotected booleanshouldCheckDatabaseTo know that should we check database tables or notprotected booleanshouldCheckInstantiationPolicyTo know that should we check InstantiationPolicy or notprotected java.util.VectortablesTo load the tables from database
-
Constructor Summary
Constructors Constructor Description IntegrityChecker()PUBLIC: IntegrityChecker is used for catching all the Descriptor Exceptions, and check database tables.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcatchExceptions()PUBLIC: This method is used for catching all the Descriptor ExceptionsvoidcheckDatabase()PUBLIC: This method is used to check the database tables.voidcheckInstantiationPolicy()PUBLIC: This method is used to check the InstantiationPolicy.booleancheckTable(org.eclipse.persistence.internal.helper.DatabaseTable table, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: This method checks that tables are present in the database.voiddontCatchExceptions()PUBLIC: This method is used for don't catching all the Descriptor ExceptionsvoiddontCheckDatabase()PUBLIC: This method is used for don't checking the database tables and fields.voiddontCheckInstantiationPolicy()PUBLIC: This method is used for don't checking the InstantiationPolicy.java.util.VectorgetCaughtExceptions()PUBLIC: This method returns the vector which adds all the Descriptors Exceptions.java.util.VectorgetTables()INTERNAL: This method returns a vector which holds all the tables of databasevoidhandleError(java.lang.RuntimeException runtimeException)INTERNAL: This method handles all the Descriptor Exceptions.booleanhasErrors()INTERNAL: Return if any errors occurred.booleanhasRuntimeExceptions()INTERNAL: Return if any runtime errors occurred.voidinitializeTables(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: This method is used to get all the database tables and add them into a vector.voidsetCaughtExceptions(java.util.Vector exceptions)INTERNAL:voidsetShouldCatchExceptions(boolean answer)PUBLIC: This method assigns the value to the variable (shouldCatchExceptions) that defines whether we should catch all Descriptor Exceptions or not.voidsetShouldCheckDatabase(boolean answer)PUBLIC: This method assigns the value to the variable (shouldCheckDatabase) that defines whether we should check the database or not.voidsetShouldCheckInstantiationPolicy(boolean answer)PUBLIC: This method assigns the value to the variable (shouldCheckInstantiationPolicy) that defines whether we should check InstantiationPolicy or not.booleanshouldCatchExceptions()PUBLIC: This method signifies whether all Descriptor Exceptions should be thrown individually or queued.booleanshouldCheckDatabase()PUBLIC: This method signifies whether database tables and fields should be checked or not.booleanshouldCheckInstantiationPolicy()PUBLIC: This method tells us whether we should check InstantiationPolicy or not.
-
-
-
Field Detail
-
caughtExceptions
protected java.util.Vector caughtExceptions
To add all the Descriptor exceptions
-
tables
protected java.util.Vector tables
To load the tables from database
-
shouldCatchExceptions
protected boolean shouldCatchExceptions
To know that should we catch all the descriptors exceptions or not
-
shouldCheckDatabase
protected boolean shouldCheckDatabase
To know that should we check database tables or not
-
shouldCheckInstantiationPolicy
protected boolean shouldCheckInstantiationPolicy
To know that should we check InstantiationPolicy or not
-
-
Constructor Detail
-
IntegrityChecker
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
-
catchExceptions
public void catchExceptions()
PUBLIC: This method is used for catching all the Descriptor Exceptions
-
checkDatabase
public void checkDatabase()
PUBLIC: This method is used to check the database tables.
-
checkInstantiationPolicy
public void checkInstantiationPolicy()
PUBLIC: This method is used to check the InstantiationPolicy.
-
checkTable
public boolean checkTable(org.eclipse.persistence.internal.helper.DatabaseTable table, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: This method checks that tables are present in the database.
-
dontCatchExceptions
public void dontCatchExceptions()
PUBLIC: This method is used for don't catching all the Descriptor Exceptions
-
dontCheckDatabase
public void dontCheckDatabase()
PUBLIC: This method is used for don't checking the database tables and fields.
-
dontCheckInstantiationPolicy
public void dontCheckInstantiationPolicy()
PUBLIC: This method is used for don't checking the InstantiationPolicy.
-
getCaughtExceptions
public java.util.Vector getCaughtExceptions()
PUBLIC: This method returns the vector which adds all the Descriptors Exceptions.
-
getTables
public java.util.Vector getTables()
INTERNAL: This method returns a vector which holds all the tables of database
-
handleError
public void handleError(java.lang.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.
-
hasErrors
public boolean hasErrors()
INTERNAL: Return if any errors occurred.
-
hasRuntimeExceptions
public boolean hasRuntimeExceptions()
INTERNAL: Return if any runtime errors occurred.
-
initializeTables
public void initializeTables(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This method is used to get all the database tables and add them into a vector.
-
setCaughtExceptions
public void setCaughtExceptions(java.util.Vector exceptions)
INTERNAL:
-
setShouldCatchExceptions
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.
-
setShouldCheckDatabase
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.
-
setShouldCheckInstantiationPolicy
public void setShouldCheckInstantiationPolicy(boolean answer)
PUBLIC: This method assigns the value to the variable (shouldCheckInstantiationPolicy) that defines whether we should check InstantiationPolicy or not.
-
shouldCatchExceptions
public boolean shouldCatchExceptions()
PUBLIC: This method signifies whether all Descriptor Exceptions should be thrown individually or queued.
-
shouldCheckDatabase
public boolean shouldCheckDatabase()
PUBLIC: This method signifies whether database tables and fields should be checked or not.
-
shouldCheckInstantiationPolicy
public boolean shouldCheckInstantiationPolicy()
PUBLIC: This method tells us whether we should check InstantiationPolicy or not.
-
-