|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cmu.survey.jsp.tags.GenericUpdate
public abstract class GenericUpdate
Field Summary | |
---|---|
protected boolean |
changedDBLastUpdate
|
protected java.util.Vector<java.lang.String> |
dateInsertStringNames
|
protected java.util.Vector |
dateInsertStringValues
|
protected java.util.HashMap<java.lang.String,java.util.Calendar> |
dateMap
|
protected java.util.HashMap |
dateMapIsNull
|
protected java.util.Vector<java.lang.String> |
dateNames
|
protected java.util.Vector<java.lang.String> |
dateSubtypes
|
protected java.util.Vector<java.lang.String> |
dateTimeInsertStringNames
|
protected java.util.Vector |
dateTimeInsertStringValues
|
protected java.util.HashMap<java.lang.String,java.util.Calendar> |
dateTimeMap
|
protected java.util.HashMap |
dateTimeMapIsEmpty
|
protected java.util.Vector<java.lang.String> |
dateTimeNames
|
protected java.util.Vector<java.lang.String> |
dateTimeSubtypes
|
protected java.util.Vector |
dateTimeValues
|
protected java.util.Vector |
dateValues
|
protected static boolean |
debug
|
static int |
DELETE
|
protected boolean |
didParseOutParameters
|
protected boolean |
formWasSubmitted
Whether or not the form was submitted on this page -- i.e. whether someone clicked submit on a previous page and this would have data if it could |
static int |
INSERT
|
protected java.util.Vector<PairOfVectors<java.lang.String,java.lang.Object>> |
keyValueLists
|
protected java.lang.String |
lastMessage
|
static int |
NOTHING
|
protected java.util.Vector<java.lang.String> |
numberKeyNames
|
protected java.util.Vector<java.lang.Number> |
numberKeyValues
|
protected java.util.Vector<java.lang.String> |
numberNames
|
protected java.util.Vector<java.lang.Number> |
numberValues
|
protected javax.servlet.jsp.PageContext |
pageContext
|
protected java.lang.String |
parametersTurnedIntoTextForm
|
protected boolean |
parametersWerePassedIn
|
protected boolean |
saveChangesToDB
|
protected java.util.Vector<java.lang.String> |
stringKeyNames
|
protected java.util.Vector<java.lang.String> |
stringKeyValues
|
protected java.util.Vector<java.lang.String> |
stringNames
|
protected java.util.Vector<java.lang.String> |
stringValues
|
protected Survey |
survey
|
protected java.lang.String |
tableName
|
protected javax.servlet.http.HttpServletRequest |
theRequest
The request object from the page |
protected int |
thingToDo
|
protected java.util.Vector<java.lang.String> |
timeInsertStringNames
|
protected java.util.Vector |
timeInsertStringValues
|
protected java.util.HashMap<java.lang.String,java.util.Calendar> |
timeMap
|
protected java.util.HashMap |
timeMapIsEmpty
|
protected java.util.Vector<java.lang.String> |
timeNames
|
protected java.util.Vector<java.lang.String> |
timeSubtypes
|
protected java.util.Vector |
timeValues
|
static int |
UPDATE
|
protected static java.lang.String[] |
VALID_SUBTYPES
|
Constructor Summary | |
---|---|
GenericUpdate(Survey surveyToUse,
javax.servlet.jsp.PageContext usePageContext)
|
Method Summary | |
---|---|
protected java.lang.String |
cleanStringValue(java.lang.String string)
A wrapper method for Survey.cleanStringBetter() and DatabaseConnection.cleanString() |
protected void |
convertDateTimeFormToCalendars()
|
protected abstract int |
decideWhatToDo()
|
protected abstract void |
doDatabaseChanges()
|
protected void |
doUpdate()
|
protected abstract java.util.Calendar |
getCalendar()
|
boolean |
getChangedDBLastUpdate()
|
protected abstract java.lang.String |
getDateTimeNowStringFormat()
Get the date and time right now as a string |
Pair<java.util.Vector<java.lang.String>,java.util.Vector<java.lang.Object>> |
getKeys()
Makes a two-vector (tuple) Vector of two |
java.lang.String |
getLastMessage()
|
protected QuestionInfo |
getQuestionInfo(java.lang.String name,
java.lang.String paramSubtype,
boolean isListMember)
|
int |
getTypeOfChangeDone()
|
boolean |
getWasPageSubmitted()
|
boolean |
getWereParametersPassedIn()
|
protected boolean |
hasParamBeenAddedBefore(java.lang.String name,
java.lang.Object value)
Use this instead of the regular add, to make sure we don't have duplicates. |
protected boolean |
isValidSubtype(java.lang.String subtype)
Checks whether a subtype (in date_year_birthDay, "year" is the subtype) is one of the valid subtypes. |
void |
parseOutParameters()
|
protected java.lang.String |
parseOutParameters(boolean saveToTextForm)
|
void |
setLastMessage(java.lang.String string)
|
void |
setSaveChangesToDB(boolean allowChangesToDB)
|
protected java.util.Calendar |
updateFormToCalendar(java.lang.String type,
java.lang.String value,
java.util.Calendar cal)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final boolean debug
protected java.util.Vector<java.lang.String> stringNames
protected java.util.Vector<java.lang.String> stringValues
protected java.util.Vector<java.lang.String> numberNames
protected java.util.Vector<java.lang.Number> numberValues
protected java.util.Vector<java.lang.String> dateNames
protected java.util.Vector<java.lang.String> dateSubtypes
protected java.util.Vector dateValues
protected java.util.HashMap<java.lang.String,java.util.Calendar> dateMap
protected java.util.HashMap dateMapIsNull
protected java.util.Vector<java.lang.String> dateTimeNames
protected java.util.Vector<java.lang.String> dateTimeSubtypes
protected java.util.Vector dateTimeValues
protected java.util.HashMap<java.lang.String,java.util.Calendar> dateTimeMap
protected java.util.HashMap dateTimeMapIsEmpty
protected java.util.Vector<java.lang.String> timeNames
protected java.util.Vector<java.lang.String> timeSubtypes
protected java.util.Vector timeValues
protected java.util.HashMap<java.lang.String,java.util.Calendar> timeMap
protected java.util.HashMap timeMapIsEmpty
protected java.util.Vector<java.lang.String> numberKeyNames
protected java.util.Vector<java.lang.Number> numberKeyValues
protected java.util.Vector<java.lang.String> stringKeyNames
protected java.util.Vector<java.lang.String> stringKeyValues
protected java.util.Vector<java.lang.String> dateTimeInsertStringNames
protected java.util.Vector dateTimeInsertStringValues
protected java.util.Vector<java.lang.String> timeInsertStringNames
protected java.util.Vector timeInsertStringValues
protected java.util.Vector<java.lang.String> dateInsertStringNames
protected java.util.Vector dateInsertStringValues
protected java.util.Vector<PairOfVectors<java.lang.String,java.lang.Object>> keyValueLists
protected Survey survey
protected java.lang.String tableName
protected int thingToDo
public static final int NOTHING
public static final int UPDATE
public static final int INSERT
public static final int DELETE
protected boolean saveChangesToDB
protected boolean changedDBLastUpdate
protected boolean parametersWerePassedIn
protected boolean didParseOutParameters
protected java.lang.String parametersTurnedIntoTextForm
protected java.lang.String lastMessage
protected javax.servlet.http.HttpServletRequest theRequest
protected boolean formWasSubmitted
protected static final java.lang.String[] VALID_SUBTYPES
protected javax.servlet.jsp.PageContext pageContext
Constructor Detail |
---|
public GenericUpdate(Survey surveyToUse, javax.servlet.jsp.PageContext usePageContext)
Method Detail |
---|
protected java.lang.String cleanStringValue(java.lang.String string)
string
-
protected boolean isValidSubtype(java.lang.String subtype)
public void setLastMessage(java.lang.String string)
public java.lang.String getLastMessage()
public boolean getChangedDBLastUpdate()
public void setSaveChangesToDB(boolean allowChangesToDB)
public int getTypeOfChangeDone()
public Pair<java.util.Vector<java.lang.String>,java.util.Vector<java.lang.Object>> getKeys()
protected QuestionInfo getQuestionInfo(java.lang.String name, java.lang.String paramSubtype, boolean isListMember)
public void parseOutParameters()
protected boolean hasParamBeenAddedBefore(java.lang.String name, java.lang.Object value)
names
- name
- type
- value
-
protected java.lang.String parseOutParameters(boolean saveToTextForm)
protected java.util.Calendar updateFormToCalendar(java.lang.String type, java.lang.String value, java.util.Calendar cal)
protected void convertDateTimeFormToCalendars()
protected void doUpdate()
protected abstract int decideWhatToDo()
protected abstract void doDatabaseChanges()
protected abstract java.util.Calendar getCalendar()
protected abstract java.lang.String getDateTimeNowStringFormat()
public boolean getWereParametersPassedIn()
public boolean getWasPageSubmitted()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |