|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cmu.survey.editor.data.table.DataBitStorageTable
public abstract class DataBitStorageTable
Nested Class Summary | |
---|---|
static class |
DataBitStorageTable.AuxillaryOptionTableFormatClass
|
static class |
DataBitStorageTable.QuestionsTableFormatClass
|
static class |
DataBitStorageTable.RepeatedMeasureAnswerTableFormatClass
|
static class |
DataBitStorageTable.RepeatedMeasureTableFormatClass
|
static class |
DataBitStorageTable.SurveyPagesTableFormatClass
|
Field Summary | |
---|---|
protected static java.lang.String[] |
ALL_REQUIRED_TABLES
The list of all tables that are required for making a survey. |
protected static java.lang.String[] |
ALL_USED_TABLES
The list of all tables used for storing questions, etc. |
static java.lang.String |
AuxillaryOptionsTable
|
static java.lang.String |
ChoicesTable
|
static java.lang.String |
defaultAnswersTable
|
static java.lang.String |
PagesOfQuestionsTable
|
static java.lang.String |
QuestionsTable
|
static java.lang.String |
SurveyPagesTableName
|
Fields inherited from interface cmu.survey.editor.data.DataBitStorage |
---|
CANNOT_CHECK, DEFAULT_USERS_TABLE_NAME, ERROR_FIXABLE, ERROR_FIXABLE_CREATE, ERROR_NOT_FIXABLE, ERROR_USER_FIXABLE, IS_GOOD, OPERATION_FAILED, OPERATION_PARTIALLY_SUCCEEDED, OPERATION_SUCCEEDED |
Constructor Summary | |
---|---|
DataBitStorageTable(TableStorage tableStorage)
|
Method Summary | |
---|---|
void |
close()
|
protected abstract boolean |
couldCreateNewSurveyInDatabase()
|
int |
createNewSurveyInDatabase()
Fix a broken table by creating the survey database into this database. |
boolean |
deleteAuxillaryOption(AuxillaryOptionDataBitTable opt)
|
boolean |
deleteDataBits(DataTableModel table,
java.lang.Integer id,
java.lang.String idFieldName)
|
static boolean |
errorCanBeFixedBySystem(int error)
|
java.util.Vector<DataTableModel> |
getAllPossibleAnswerTableModels()
|
java.util.Vector<java.lang.String> |
getAllPossibleAnswerTables()
|
DataTableModel |
getAnswersTable()
|
DataTableModel |
getAnswersTable(java.util.Vector<java.lang.Integer> userIDs)
|
static TableFormat |
getAnswersTableFormat(java.lang.String tableName)
|
DataTableModel |
getAnswersTableNamed(java.lang.String answersTableName)
Gets a table formatted for answers. |
java.util.Vector<AuxillaryOptionDataBitTable> |
getAuxillaryOptions(IntegerDataBit questionID)
|
DataTableModel |
getAuxillaryOptionsTable()
|
static TableFormat |
getAuxillaryOptionsTableFormat()
|
abstract ChoicesDataBitSet |
getChoices(IntegerDataBit questionID,
StringDataBit choicesType,
IntegerDataBit numberOfChoices)
|
protected IntegerDataBit |
getIntegerBitFrom(ForwardOnlyData data,
java.lang.String name)
|
AuxillaryOptionDataBitTable |
getNewAuxillaryOption(IntegerDataBit questionID)
|
OneChoiceDataBitSetStub |
getNewChoice()
|
QuestionDataBitSet |
getNewQuestion()
|
abstract QuestionDataBitSetTable |
getNewQuestionStub()
|
protected abstract PageTable |
getPage(ForwardOnlyData data)
|
Page |
getPage(int id)
|
java.util.Vector<Page> |
getPages(java.lang.String pageName)
Gets all pages by this name -- since it's possible that there are multiple pages by the same name. |
DataTableModel |
getPagesOfQuestionsTable()
|
static TableFormat |
getPagesOfQuestionsTableFormat()
|
abstract QuestionDataBitSetTable |
getQuestion(int questionID)
|
DataTableModel |
getQuestionsTable()
|
static TableFormat |
getQuestionsTableFormat()
|
DataTableModel |
getRepeatedMeasuresTableNamed(java.lang.String repeatedMeasuresTableName)
Get a table formatted for storing repeated measures (NOT an answers table for repeated measures, but for the list of repeated measures). |
static DataBitStorageTable.RepeatedMeasureTableFormatClass |
getRepeatedMeasureTableFormat(java.lang.String tableName)
|
protected StringDataBit |
getStringBitFrom(ForwardOnlyData data,
java.lang.String name)
|
Survey |
getSurvey()
If it returns null, the database is in an old format of the survey tool or does not have a survey in the database, or is not a valid database, etc. |
DataTableModel |
getSurveyPagesTable()
|
static TableFormat |
getSurveyPagesTableFormat()
|
SurveyTable |
getSurveyTable()
For those who know we're a DataBitStorageTable. |
DataTableModel |
getTableNamed(java.lang.String tableName)
|
TableStorage |
getTableStorage()
|
DataTableModel |
getUsersTable()
|
boolean |
isOpen()
|
abstract boolean |
isSameStorageAs(DataBitStorage storage)
|
int |
isSurveyValid()
This should be called first to check whether the survey is a recent one or not. |
protected void |
loadIntoNewAuxillaryOption(IntegerDataBit questionID,
AuxillaryOptionDataBitTable auxOpt)
|
abstract java.lang.Integer |
saveDataBits(java.util.List<? extends DataBit> dataBits,
java.lang.String table,
java.lang.Integer id,
java.lang.String idFieldName)
This should be replaced by DataTableModel.saveDataBits(). |
boolean |
saveQuestionDataBits(QuestionDataBitSetTable q)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cmu.survey.editor.data.DataBitStorage |
---|
getNewPage |
Field Detail |
---|
public static final java.lang.String PagesOfQuestionsTable
public static final java.lang.String SurveyPagesTableName
public static final java.lang.String QuestionsTable
public static final java.lang.String ChoicesTable
public static final java.lang.String AuxillaryOptionsTable
protected static final java.lang.String[] ALL_USED_TABLES
protected static final java.lang.String[] ALL_REQUIRED_TABLES
public static final java.lang.String defaultAnswersTable
Constructor Detail |
---|
public DataBitStorageTable(TableStorage tableStorage)
Method Detail |
---|
public static TableFormat getSurveyPagesTableFormat()
public static TableFormat getPagesOfQuestionsTableFormat()
public static TableFormat getAuxillaryOptionsTableFormat()
public static TableFormat getAnswersTableFormat(java.lang.String tableName)
public static DataBitStorageTable.RepeatedMeasureTableFormatClass getRepeatedMeasureTableFormat(java.lang.String tableName)
public static TableFormat getQuestionsTableFormat()
public DataTableModel getQuestionsTable()
public DataTableModel getPagesOfQuestionsTable()
public DataTableModel getSurveyPagesTable()
public DataTableModel getUsersTable()
getUsersTable
in interface DataBitStorage
public DataTableModel getAnswersTable()
getAnswersTable
in interface DataBitStorage
public DataTableModel getAuxillaryOptionsTable()
public DataTableModel getAnswersTable(java.util.Vector<java.lang.Integer> userIDs)
getAnswersTable
in interface DataBitStorage
public java.util.Vector<java.lang.String> getAllPossibleAnswerTables()
getAllPossibleAnswerTables
in interface DataBitStorage
public java.util.Vector<DataTableModel> getAllPossibleAnswerTableModels()
getAllPossibleAnswerTableModels
in interface DataBitStorage
public DataTableModel getAnswersTableNamed(java.lang.String answersTableName)
DataBitStorage
getAnswersTableNamed
in interface DataBitStorage
public DataTableModel getRepeatedMeasuresTableNamed(java.lang.String repeatedMeasuresTableName)
DataBitStorage
getRepeatedMeasuresTableNamed
in interface DataBitStorage
public DataTableModel getTableNamed(java.lang.String tableName)
getTableNamed
in interface DataBitStorage
public int createNewSurveyInDatabase()
DataBitStorage
createNewSurveyInDatabase
in interface DataBitStorage
public static boolean errorCanBeFixedBySystem(int error)
protected IntegerDataBit getIntegerBitFrom(ForwardOnlyData data, java.lang.String name) throws FailedRequest
FailedRequest
protected StringDataBit getStringBitFrom(ForwardOnlyData data, java.lang.String name) throws FailedRequest
FailedRequest
public abstract boolean isSameStorageAs(DataBitStorage storage)
public abstract QuestionDataBitSetTable getQuestion(int questionID)
protected abstract PageTable getPage(ForwardOnlyData data)
public java.util.Vector<Page> getPages(java.lang.String pageName)
DataBitStorage
getPages
in interface DataBitStorage
public Page getPage(int id)
getPage
in interface DataBitStorage
public Survey getSurvey()
DataBitStorage
getSurvey
in interface DataBitStorage
public SurveyTable getSurveyTable()
public TableStorage getTableStorage()
getTableStorage
in interface DataBitStorage
protected abstract boolean couldCreateNewSurveyInDatabase()
public QuestionDataBitSet getNewQuestion()
getNewQuestion
in interface DataBitStorage
public abstract QuestionDataBitSetTable getNewQuestionStub()
public java.util.Vector<AuxillaryOptionDataBitTable> getAuxillaryOptions(IntegerDataBit questionID)
public AuxillaryOptionDataBitTable getNewAuxillaryOption(IntegerDataBit questionID)
protected void loadIntoNewAuxillaryOption(IntegerDataBit questionID, AuxillaryOptionDataBitTable auxOpt)
public abstract ChoicesDataBitSet getChoices(IntegerDataBit questionID, StringDataBit choicesType, IntegerDataBit numberOfChoices)
public OneChoiceDataBitSetStub getNewChoice()
public boolean deleteDataBits(DataTableModel table, java.lang.Integer id, java.lang.String idFieldName)
public boolean deleteAuxillaryOption(AuxillaryOptionDataBitTable opt)
public abstract java.lang.Integer saveDataBits(java.util.List<? extends DataBit> dataBits, java.lang.String table, java.lang.Integer id, java.lang.String idFieldName)
dataBits
- table
- id
- idFieldName
-
public boolean saveQuestionDataBits(QuestionDataBitSetTable q)
public int isSurveyValid()
DataBitStorage
isSurveyValid
in interface DataBitStorage
public boolean isOpen()
isOpen
in interface DataBitStorage
public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |