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.
| Modifier and Type | Field and Description |
|---|---|
| protected Vector | 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 | tables
To load the tables from database |
| Access | Constructor and Description |
|---|---|
| public | IntegrityChecker()
PUBLIC: IntegrityChecker is used for catching all the Descriptor Exceptions, and check database tables. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public boolean | checkTable(DatabaseTable table, AbstractSession session)
INTERNAL: This method checks that tables are present in the database. |
| public void | |
| public void | |
| public void | dontCheckInstantiationPolicy()
PUBLIC: This method is used for don't checking the InstantiationPolicy. |
| public Vector | getCaughtExceptions()
PUBLIC: This method returns the vector which adds all the Descriptors Exceptions. |
| public Vector | |
| public void | handleError(RuntimeException runtimeException)
INTERNAL: This method handles all the Descriptor Exceptions. |
| public boolean | |
| public boolean | |
| public void | initializeTables(AbstractSession session)
INTERNAL: This method is used to get all the database tables and add them into a vector. |
| public void | |
| 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. |
| caughtExceptions | back to summary |
|---|---|
| protected Vector<Exception> caughtExceptions To add all the Descriptor exceptions | |
| shouldCatchExceptions | back to summary |
|---|---|
| protected boolean shouldCatchExceptions To know that should we catch all the descriptors exceptions or not | |
| shouldCheckDatabase | back to summary |
|---|---|
| protected boolean shouldCheckDatabase To know that should we check database tables or not | |
| shouldCheckInstantiationPolicy | back to summary |
|---|---|
| protected boolean shouldCheckInstantiationPolicy To know that should we check InstantiationPolicy or not | |
| tables | back to summary |
|---|---|
| protected Vector<E> tables To load the tables from database | |
| IntegrityChecker | back 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. | |
| catchExceptions | back to summary |
|---|---|
| public void catchExceptions() PUBLIC: This method is used for catching all the Descriptor Exceptions | |
| checkDatabase | back to summary |
|---|---|
| public void checkDatabase() PUBLIC: This method is used to check the database tables. | |
| checkInstantiationPolicy | back to summary |
|---|---|
| public void checkInstantiationPolicy() PUBLIC: This method is used to check the InstantiationPolicy. | |
| checkTable | back to summary |
|---|---|
| public boolean checkTable(DatabaseTable table, AbstractSession session) INTERNAL: This method checks that tables are present in the database. | |
| dontCatchExceptions | back to summary |
|---|---|
| public void dontCatchExceptions() PUBLIC: This method is used for don't catching all the Descriptor Exceptions | |
| dontCheckDatabase | back to summary |
|---|---|
| public void dontCheckDatabase() PUBLIC: This method is used for don't checking the database tables and fields. | |
| dontCheckInstantiationPolicy | back to summary |
|---|---|
| public void dontCheckInstantiationPolicy() PUBLIC: This method is used for don't checking the InstantiationPolicy. | |
| getCaughtExceptions | back to summary |
|---|---|
| public Vector PUBLIC: This method returns the vector which adds all the Descriptors Exceptions. | |
| getTables | back to summary |
|---|---|
| public Vector INTERNAL: This method returns a vector which holds all the tables of database | |
| handleError | back 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. | |
| hasErrors | back to summary |
|---|---|
| public boolean hasErrors() INTERNAL: Return if any errors occurred. | |
| hasRuntimeExceptions | back to summary |
|---|---|
| public boolean hasRuntimeExceptions() INTERNAL: Return if any runtime errors occurred. | |
| initializeTables | back to summary |
|---|---|
| public void initializeTables(AbstractSession session) INTERNAL: This method is used to get all the database tables and add them into a vector. | |
| setCaughtExceptions | back to summary |
|---|---|
| public void setCaughtExceptions(Vector<Exception> exceptions) INTERNAL: | |
| setShouldCatchExceptions | back 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. | |
| setShouldCheckDatabase | back 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. | |
| setShouldCheckInstantiationPolicy | back 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. | |
| shouldCatchExceptions | back to summary |
|---|---|
| public boolean shouldCatchExceptions() PUBLIC: This method signifies whether all Descriptor Exceptions should be thrown individually or queued. | |
| shouldCheckDatabase | back to summary |
|---|---|
| public boolean shouldCheckDatabase() PUBLIC: This method signifies whether database tables and fields should be checked or not. | |
| shouldCheckInstantiationPolicy | back to summary |
|---|---|
| public boolean shouldCheckInstantiationPolicy() PUBLIC: This method tells us whether we should check InstantiationPolicy or not. | |