Methods Summary |
---|
public void | catchExceptions()PUBLIC:
This method is used for catching all the Descriptor Exceptions
setShouldCatchExceptions(true);
|
public void | checkDatabase()PUBLIC:
This method is used to check the database tables.
setShouldCheckDatabase(true);
|
public void | checkInstantiationPolicy()PUBLIC:
This method is used to check the InstantiationPolicy.
setShouldCheckInstantiationPolicy(true);
|
public boolean | checkTable(oracle.toplink.essentials.internal.helper.DatabaseTable table, oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
This method checks that tables are present in the database.
if (getTables().size() == 0) {
// load the tables from the session
initializeTables(session);
}
//MySQL converts all the table names to lower case.
if (session.getPlatform().isMySQL()) {
return getTables().contains(table.getName().toLowerCase());
}
return getTables().contains(table.getName());
|
public void | dontCatchExceptions()PUBLIC:
This method is used for don't catching all the Descriptor Exceptions
setShouldCatchExceptions(false);
|
public void | dontCheckDatabase()PUBLIC:
This method is used for don't checking the database tables and fields.
setShouldCheckDatabase(false);
|
public void | dontCheckInstantiationPolicy()PUBLIC:
This method is used for don't checking the InstantiationPolicy.
setShouldCheckInstantiationPolicy(false);
|
public java.util.Vector | getCaughtExceptions()PUBLIC:
This method returns the vecotr which adds all the Descriptors Exceptions.
if (caughtExceptions == null) {
caughtExceptions = new Vector();
}
return caughtExceptions;
|
public java.util.Vector | getTables()INTERNAL:
This method returns a vector which holds all the tables of database
if (tables == null) {
tables = new Vector();
}
return tables;
|
public void | handleError(java.lang.RuntimeException runtimeException)INTERNAL:
This method handle all the Descriptor Exceptions.
This method throw the exception or add the exceptions into a vector depand on the value of shouldCatchExceptions.
if (!shouldCatchExceptions()) {
throw runtimeException;
}
getCaughtExceptions().addElement(runtimeException);
|
public boolean | hasErrors()INTERNAL:
Return if any errors occured.
if ((caughtExceptions != null) && (caughtExceptions.size() > 0)) {
return true;
}
return false;
|
public boolean | hasRuntimeExceptions()INTERNAL:
Return if any runtime errors occured.
if (hasErrors()) {
for (Enumeration exceptionsEnum = getCaughtExceptions().elements();
exceptionsEnum.hasMoreElements();) {
if (exceptionsEnum.nextElement() instanceof RuntimeException) {
return true;
}
}
}
return false;
|
public void | initializeTables(oracle.toplink.essentials.internal.sessions.AbstractSession session)INTERNAL:
This method is used to get all the database tables and add them into a vector.
Vector result = session.getAccessor().getTableInfo(null, null, null, null, session);
for (Enumeration resultEnum = result.elements(); resultEnum.hasMoreElements();) {
AbstractRecord row = (AbstractRecord)resultEnum.nextElement();
tables.addElement(row.get("TABLE_NAME"));
}
|
public void | setCaughtExceptions(java.util.Vector exceptions)INTERNAL:
this.caughtExceptions = exceptions;
|
public void | setShouldCatchExceptions(boolean answer)PUBLIC:
This method assigns the value to the variable (shouldCatchExceptions)
that we should catch all Descriptor Exceptions or not.
shouldCatchExceptions = answer;
|
public void | setShouldCheckDatabase(boolean answer)PUBLIC:
This method assigns the value to the variable (shouldCheckDatabase)
that we should check database or not.
shouldCheckDatabase = answer;
|
public void | setShouldCheckInstantiationPolicy(boolean answer)PUBLIC:
This method assigns the value to the variable (shouldCheckInstantiationPolicy)
that we should check InstantiationPolicy or not.
shouldCheckInstantiationPolicy = answer;
|
public boolean | shouldCatchExceptions()PUBLIC:
This method is used to know that all the Descriptor Exceptions should be thrown or not.
return shouldCatchExceptions;
|
public boolean | shouldCheckDatabase()PUBLIC:
This method is used to know that database tables and fields should be checked or not.
return shouldCheckDatabase;
|
public boolean | shouldCheckInstantiationPolicy()PUBLIC:
This method tells us that we should check InstantiationPolicy or not.
return shouldCheckInstantiationPolicy;
|