META-INF/MANIFEST.MF
SQLAssessment/DataTypeCondition.class
DataTypeCondition.java package SQLAssessment public SQLAssessment.DataTypeCondition extends java.lang.Object { private String columnName private String tableName private String dataType public void <init> (java.lang.String, java.lang.String, java.lang.String) String tName String cName String dType public java.lang.String getColumnName () public java.lang.String getTableName () public java.lang.String getdataType () }
SQLAssessment/WrapperHSQL.class
WrapperHSQL.java package SQLAssessment public SQLAssessment.WrapperHSQL extends java.lang.Object { private static final String SEPARATOR private static final String ALL_ENTRIES_FOUND private static final String WRONG_ROW_COUNT private static final String WRONG_COLUMN_COUNT private static final String INSUF_ROW_COUNT private static final String TOO_HIGH_ROW_COUNT private static final String OVERALL_SUCCESS private static final String INSUF_COLUMN_COUNT private static final String TOO_HIGH_COLUMN_COUNT private static final String INVALID_SELECT_QUERY private static final String RESULT_SET_EMPTY private static final String MANIPULATION_FAILED private static final String COLUMN_COUNT_OK private static final String SUBMISSION_FAIL private static final String WRONG_ROW private static final String CONNECTION_ERROR private static final String ONLY_SELECT_ALLOWED private static final String INSUF_TABLE_COUNT private static final String TOO_HIGH_TABLE_COUNT private static final String CORRECT_TABLE_COUNT private static final String FOR_TABLE private static final String WRONG_ROWS_BUT_CORRECT private static final String ROWS_MISSING private static final String MISMATCHING_DATA_TYPES private static final String CORRECT_ROW_COUNT private static final String DATA_TYPES_CORRECT private static final String WRONG_TYPE private static final String COL_NOT_FOUND private static java.sql.Connection conn private static org.dbunit.dataset.IDataSet DBUnitDS private static java.sql.ResultSet rSet private static boolean forceCheckForWrongRows private static boolean CheckOnlyForDatabaseGlobal private static boolean nonSelectStatementsAreAllowed private static boolean dontCheckForDataTypes public static int[] tableCount public static java.util.ArrayList tableNamesTeacher public static java.util.ArrayList tableNamesStudent public static java.util.ArrayList teachersDataTypes public static java.util.ArrayList studentsDataTypes static void <clinit> () public void <init> () public static void runValidation (boolean, boolean, boolean, boolean) throws java.lang.Exception boolean checkWrongRows boolean nonSelectAllowed boolean checkOnlyForDatabase boolean noTypeCheck public static void compareResultSets () throws java.sql.SQLException org.dbunit.DatabaseUnitException java.util.ArrayList bestPractice java.util.ArrayList studentsResult public static void compareDatabases () throws java.sql.SQLException org.dbunit.DatabaseUnitException String tableCountFeedback boolean tableCorrect boolean tableNotMissingInner boolean NoTableMissingOutter String actualTable boolean outterCorrectness int studentEntryCount java.util.ArrayList teachersDB java.util.ArrayList studentsDB int i int i int z public static java.lang.String compareTableCount () String msg public static java.util.ArrayList getWholeDatabase (int) throws java.sql.SQLException org.dbunit.DatabaseUnitException int role java.util.ArrayList allTables java.util.ArrayList nonSelectQueries java.util.ArrayList tableNames java.util.ArrayList actualSet java.sql.Statement ReadStmt String statemment String table int i java.sql.SQLException e public static void clearDatabase () throws java.sql.SQLException org.dbunit.DatabaseUnitException int tableCount java.util.ArrayList dropTableQuery java.util.ArrayList tables int i public static void printAllTableNames () throws java.sql.SQLException org.dbunit.DatabaseUnitException java.util.ArrayList tables int count int i public static java.util.ArrayList getAllTableNames () throws java.sql.SQLException org.dbunit.DatabaseUnitException org.dbunit.database.IDatabaseConnection dbConn java.util.ArrayList tables int tableCount String[] tableNames int i public static void createConnection () throws java.lang.Exception java.sql.SQLException e public static void prepareDatabase () throws java.sql.SQLException java.util.ArrayList queriesForDatabasePreparation public static java.util.ArrayList getSubmission (int, int) int role int type java.util.ArrayList submission java.util.ArrayList formattedSubmission java.util.ArrayList nonSelectStatements java.util.ArrayList selectStatement String QuerySource String QuerySource String QuerySource public static java.util.ArrayList getArrayListFromFile (java.lang.String) String filename java.util.ArrayList submission java.io.BufferedReader input String line String line java.io.IOException e public static boolean roleIsAllowedToUseNonSelectStatements (java.util.ArrayList, int) java.util.ArrayList listOfNonSelectStatements int role boolean result public static java.util.ArrayList getLastSelectStatementFrom (java.util.ArrayList) java.util.ArrayList toBeFormattedArrayList int numberOfLines java.util.ArrayList SelectStatement int i public static java.util.ArrayList getNonSelectStatements (java.util.ArrayList) java.util.ArrayList toBeFormattedArrayList int numberOfLines java.util.ArrayList nonSelectStatements int i public static java.util.ArrayList getFormattedSubmission (java.util.ArrayList) java.util.ArrayList toBeFormattedArrayList java.util.ArrayList formattedSubmission int numberOfLinesInFile String line int i int a public static boolean semicolonIsNotBetweenTicks (java.lang.String) String value int tickCount int maskedTickCount public static int getQueryTypeForLine (java.lang.String) String Q public static java.util.ArrayList getResultSetAsList (int) throws java.sql.SQLException int role java.util.ArrayList submissionWRITING java.util.ArrayList submissionSELECT java.util.ArrayList submissionResult java.sql.Statement ReadStmt IndexOutOfBoundsException e public static java.util.ArrayList resultSetToArrayList (java.sql.ResultSet) throws java.sql.SQLException java.sql.ResultSet rSet java.util.ArrayList submissionResult int columnNumber int numberOfColumns int i String line public static void dbWritingOperations (java.util.ArrayList) throws java.sql.SQLException java.util.ArrayList submission java.sql.Statement ReadStmt int i java.sql.SQLException e public static void compareArrayListSets (java.util.ArrayList, java.util.ArrayList) throws java.sql.SQLException java.util.ArrayList studentsResult java.util.ArrayList bestPractice int bestPracticeColumns int studentsResultColumns boolean columnCountIsCorrect boolean rowCountIsCorrect boolean noWrongRows int z public static int getNumberOfColumnsInArraylist (java.util.ArrayList) java.util.ArrayList studentsResult int count String row int index public static int getNumberOfStringsInString (java.lang.String, java.lang.String) String line String signs int count int index public static boolean validateColumnCount (int, int) int bestPracticeColumns int studentsResultColumns public static boolean validateRowCount (java.util.ArrayList, java.util.ArrayList) java.util.ArrayList studentsResult java.util.ArrayList bestPractice boolean isCorrect int a int b public static boolean setContainsRow (java.util.ArrayList, java.lang.String) java.util.ArrayList expectedResult String theRow public static boolean allNeededEntriesFound (java.util.ArrayList, java.util.ArrayList) java.util.ArrayList studentsResult java.util.ArrayList bestPractice boolean innerTemp boolean outerTemp int studentEntryCount int teachersEntryCount java.util.ArrayList teacherSide java.util.ArrayList studentSide int columnCountT int columnCountS int i int t public static java.util.ArrayList getValueOuttaEntry (java.lang.String) String Entry int length java.util.ArrayList EntryAsArrayList java.util.ArrayList Result int maxValueCount String remaining String temp int i int t public static boolean dataTypesAreValid () throws java.sql.SQLException boolean outerTemp public static java.util.ArrayList fillDataSetList (java.util.ArrayList) java.util.ArrayList unformattedList java.util.ArrayList DataTypes int lines int sepPosition1 int sepPosition2 String tName String cName String dType int lineLength int sepLength int lineNumber SQLAssessment.DataTypeCondition singleEntry public static boolean checkCondition (java.util.ArrayList, java.util.ArrayList) java.util.ArrayList studentsCond java.util.ArrayList teachersCond int studentsCondCount int teachersCondCount boolean columnFound boolean outer boolean result int i int k public static java.util.ArrayList getDataTypesFromRS () throws java.sql.SQLException java.util.ArrayList columnNames String tName String cName String dType int columnCount int i SQLAssessment.DataTypeCondition resSetInfo public static java.lang.String turnSeparatorIntoVerticalLine (java.lang.String) String line String outPutLine public static void outPutArrayList (java.util.ArrayList) java.util.ArrayList AL int ALs int i public static void outPutConditionList (java.util.ArrayList) java.util.ArrayList AL SQLAssessment.DataTypeCondition Data int ALs int i public static boolean getAdditionalProperty (int) int optionNumber String filename String line java.io.BufferedReader input java.io.IOException e char result public static void correctProperties () public static boolean reverse (boolean) boolean input }
SQLAssessment/Main.class
Main.java package SQLAssessment public SQLAssessment.Main extends java.lang.Object { public void <init> () public static void main (java.lang.String[]) throws java.lang.Exception String[] args boolean checkEntriesAlthoughTableHeightIsWrong boolean nonSelectStatementsAreAllowed boolean checkOnlyDatabase boolean noTypeCheck }