macaw.persistenceLayer.production
Class SQLVariableManager
java.lang.Object
macaw.persistenceLayer.production.SQLCurationConceptManager
macaw.persistenceLayer.production.SQLVariableManager
public class SQLVariableManager
- extends SQLCurationConceptManager
Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- Version:
- 1.0
- Author:
- Kevin Garwood (kgarwood@users.sourceforge.net)
Method Summary |
void |
addDerivedVariable(java.sql.Connection connection,
User user,
DerivedVariable derivedVariable)
|
void |
addRawVariable(java.sql.Connection connection,
User user,
RawVariable rawVariable)
|
void |
associateOntologyTerms(java.sql.Connection connection,
User user,
Variable variable,
java.util.ArrayList<OntologyTerm> ontologyTermsToAssociate)
|
void |
associateSourceVariables(java.sql.Connection connection,
User user,
DerivedVariable derivedVariable,
java.util.ArrayList<Variable> sourceVariablesToAdd)
|
void |
associateSupportingDocuments(java.sql.Connection connection,
User user,
Variable variable,
java.util.ArrayList<SupportingDocument> supportingDocumentsToAdd)
|
void |
clear(java.sql.Connection connection)
|
void |
createOntologyTermsForVariablesTable(java.sql.Connection connection)
|
void |
createSourceVariablesTable(java.sql.Connection connection)
stores associations of source variables with derived variables. |
void |
createSupportingDocumentsForVariables(java.sql.Connection connection)
|
void |
createTables(java.sql.Connection connection)
|
void |
deleteDerivedVariables(java.sql.Connection connection,
User user,
java.util.ArrayList<DerivedVariable> derivedVariables)
|
void |
deleteRawVariables(java.sql.Connection connection,
User user,
java.util.ArrayList<RawVariable> rawVariablesToDelete)
|
void |
disassociateOntologyTerms(java.sql.Connection connection,
User user,
Variable variable,
java.util.ArrayList<OntologyTerm> ontologyTerms)
|
void |
disassociateSourceVariables(java.sql.Connection connection,
User user,
DerivedVariable derivedVariable,
java.util.ArrayList<Variable> sourceVariablesToDelete)
|
void |
disassociateSupportingDocuments(java.sql.Connection connection,
User user,
Variable variable,
java.util.ArrayList<SupportingDocument> supportingDocumentsToDelete)
|
Variable |
getAlternativeVariable(java.sql.Connection connection,
User user,
Variable targetVariable)
|
java.util.ArrayList<OntologyTerm> |
getAssociatedOntologyTerms(java.sql.Connection connection,
User user,
java.lang.String variableName)
|
java.util.ArrayList<OntologyTerm> |
getAssociatedOntologyTerms(java.sql.Connection connection,
User user,
Variable variable)
|
java.util.ArrayList<SupportingDocument> |
getAssociatedSupportingDocuments(java.sql.Connection connection,
User user,
java.lang.String variableName)
|
java.util.ArrayList<SupportingDocument> |
getAssociatedSupportingDocuments(java.sql.Connection connection,
User user,
Variable variable)
|
java.util.ArrayList<Category> |
getCategoriesForVariable(java.sql.Connection connection,
java.lang.String variableName)
|
Variable |
getCompleteVariableData(java.sql.Connection connection,
User user,
VariableSummary variableSummary)
|
DerivedVariable |
getDerivedVariable(java.sql.Connection connection,
int variableID)
|
int |
getDerivedVariableIdentifier(java.sql.Connection connection,
User user,
DerivedVariable derivedVariable)
|
Variable |
getOriginalVariable(java.sql.Connection connection,
Variable targetVariable)
|
RawVariable |
getRawVariable(java.sql.Connection connection,
int variableID)
|
int |
getRawVariableIdentifier(java.sql.Connection connection,
User user,
RawVariable rawVariable)
|
java.util.ArrayList<Variable> |
getSourceVariables(java.sql.Connection connection,
User user,
DerivedVariable derivedVariable)
|
java.lang.String[] |
getStudyYears(java.sql.Connection connection)
|
java.util.ArrayList<VariableSummary> |
getSummaryDataForAllVariables(java.sql.Connection connection)
|
Variable |
getVariable(java.sql.Connection connection,
java.lang.String variableName)
|
int |
getVariableIdentifier(java.sql.Connection connection,
User user,
Variable variable)
|
java.lang.String[] |
getVariableNames(java.sql.Connection connection,
User user)
|
java.util.ArrayList<VariableSummary> |
getVariableSummariesForCategory(java.sql.Connection connection,
java.lang.String categoryName)
|
void |
setAlternativeVariable(java.sql.Connection connection,
User user,
Variable targetVariable,
Variable updatedAlternativeVariable)
|
void |
updateDerivedVariable(java.sql.Connection connection,
User user,
DerivedVariable revisedDerivedVariable)
|
void |
updateRawVariable(java.sql.Connection connection,
User user,
RawVariable revisedRawVariable)
|
void |
updateVariable(java.sql.Connection connection,
User user,
Variable revisedVariable)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQLVariableManager
public SQLVariableManager(SQLChangeEventManager changeEventManager,
SQLListChoiceManager listChoiceManager,
SQLOntologyTermManager ontologyTermManager,
SQLSupportingDocumentsManager supportingDocumentsManager)
createTables
public void createTables(java.sql.Connection connection)
throws MacawException
- Throws:
MacawException
createSupportingDocumentsForVariables
public void createSupportingDocumentsForVariables(java.sql.Connection connection)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
createOntologyTermsForVariablesTable
public void createOntologyTermsForVariablesTable(java.sql.Connection connection)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
createSourceVariablesTable
public void createSourceVariablesTable(java.sql.Connection connection)
throws java.sql.SQLException
- stores associations of source variables with derived variables.
These links correspond to these methods in
Variable
:
addSourceVariable(Variable sourceVariable)
removeSourceVariables(ArrayList variablesToDelete);
- ...
- Throws:
java.sql.SQLException
addRawVariable
public void addRawVariable(java.sql.Connection connection,
User user,
RawVariable rawVariable)
throws MacawException
- Throws:
MacawException
addDerivedVariable
public void addDerivedVariable(java.sql.Connection connection,
User user,
DerivedVariable derivedVariable)
throws MacawException
- Throws:
MacawException
deleteRawVariables
public void deleteRawVariables(java.sql.Connection connection,
User user,
java.util.ArrayList<RawVariable> rawVariablesToDelete)
throws MacawException
- Throws:
MacawException
deleteDerivedVariables
public void deleteDerivedVariables(java.sql.Connection connection,
User user,
java.util.ArrayList<DerivedVariable> derivedVariables)
throws MacawException
- Throws:
MacawException
updateRawVariable
public void updateRawVariable(java.sql.Connection connection,
User user,
RawVariable revisedRawVariable)
throws MacawException
- Throws:
MacawException
updateDerivedVariable
public void updateDerivedVariable(java.sql.Connection connection,
User user,
DerivedVariable revisedDerivedVariable)
throws MacawException
- Throws:
MacawException
updateVariable
public void updateVariable(java.sql.Connection connection,
User user,
Variable revisedVariable)
throws MacawException
- Throws:
MacawException
getDerivedVariableIdentifier
public int getDerivedVariableIdentifier(java.sql.Connection connection,
User user,
DerivedVariable derivedVariable)
throws MacawException
- Throws:
MacawException
getRawVariableIdentifier
public int getRawVariableIdentifier(java.sql.Connection connection,
User user,
RawVariable rawVariable)
throws MacawException
- Throws:
MacawException
getVariableIdentifier
public int getVariableIdentifier(java.sql.Connection connection,
User user,
Variable variable)
throws MacawException
- Throws:
MacawException
getCategoriesForVariable
public java.util.ArrayList<Category> getCategoriesForVariable(java.sql.Connection connection,
java.lang.String variableName)
throws MacawException
- Throws:
MacawException
getVariableSummariesForCategory
public java.util.ArrayList<VariableSummary> getVariableSummariesForCategory(java.sql.Connection connection,
java.lang.String categoryName)
throws MacawException
- Throws:
MacawException
getVariable
public Variable getVariable(java.sql.Connection connection,
java.lang.String variableName)
throws MacawException
- Throws:
MacawException
getSourceVariables
public java.util.ArrayList<Variable> getSourceVariables(java.sql.Connection connection,
User user,
DerivedVariable derivedVariable)
throws MacawException
- Throws:
MacawException
associateSourceVariables
public void associateSourceVariables(java.sql.Connection connection,
User user,
DerivedVariable derivedVariable,
java.util.ArrayList<Variable> sourceVariablesToAdd)
throws MacawException
- Throws:
MacawException
disassociateSourceVariables
public void disassociateSourceVariables(java.sql.Connection connection,
User user,
DerivedVariable derivedVariable,
java.util.ArrayList<Variable> sourceVariablesToDelete)
throws MacawException
- Throws:
MacawException
getStudyYears
public java.lang.String[] getStudyYears(java.sql.Connection connection)
throws MacawException
- Throws:
MacawException
getAssociatedSupportingDocuments
public java.util.ArrayList<SupportingDocument> getAssociatedSupportingDocuments(java.sql.Connection connection,
User user,
java.lang.String variableName)
throws MacawException
- Throws:
MacawException
getAssociatedSupportingDocuments
public java.util.ArrayList<SupportingDocument> getAssociatedSupportingDocuments(java.sql.Connection connection,
User user,
Variable variable)
throws MacawException
- Throws:
MacawException
associateSupportingDocuments
public void associateSupportingDocuments(java.sql.Connection connection,
User user,
Variable variable,
java.util.ArrayList<SupportingDocument> supportingDocumentsToAdd)
throws MacawException
- Throws:
MacawException
disassociateSupportingDocuments
public void disassociateSupportingDocuments(java.sql.Connection connection,
User user,
Variable variable,
java.util.ArrayList<SupportingDocument> supportingDocumentsToDelete)
throws MacawException
- Throws:
MacawException
getAssociatedOntologyTerms
public java.util.ArrayList<OntologyTerm> getAssociatedOntologyTerms(java.sql.Connection connection,
User user,
java.lang.String variableName)
throws MacawException
- Throws:
MacawException
getAssociatedOntologyTerms
public java.util.ArrayList<OntologyTerm> getAssociatedOntologyTerms(java.sql.Connection connection,
User user,
Variable variable)
throws MacawException
- Throws:
MacawException
associateOntologyTerms
public void associateOntologyTerms(java.sql.Connection connection,
User user,
Variable variable,
java.util.ArrayList<OntologyTerm> ontologyTermsToAssociate)
throws MacawException
- Throws:
MacawException
disassociateOntologyTerms
public void disassociateOntologyTerms(java.sql.Connection connection,
User user,
Variable variable,
java.util.ArrayList<OntologyTerm> ontologyTerms)
throws MacawException
- Throws:
MacawException
getCompleteVariableData
public Variable getCompleteVariableData(java.sql.Connection connection,
User user,
VariableSummary variableSummary)
throws MacawException
- Throws:
MacawException
getRawVariable
public RawVariable getRawVariable(java.sql.Connection connection,
int variableID)
throws MacawException
- Throws:
MacawException
getDerivedVariable
public DerivedVariable getDerivedVariable(java.sql.Connection connection,
int variableID)
throws MacawException
- Throws:
MacawException
getSummaryDataForAllVariables
public java.util.ArrayList<VariableSummary> getSummaryDataForAllVariables(java.sql.Connection connection)
throws MacawException
- Throws:
MacawException
getVariableNames
public java.lang.String[] getVariableNames(java.sql.Connection connection,
User user)
throws MacawException
- Throws:
MacawException
getOriginalVariable
public Variable getOriginalVariable(java.sql.Connection connection,
Variable targetVariable)
throws MacawException
- Throws:
MacawException
clear
public void clear(java.sql.Connection connection)
throws MacawException
- Throws:
MacawException
getAlternativeVariable
public Variable getAlternativeVariable(java.sql.Connection connection,
User user,
Variable targetVariable)
throws MacawException
- Throws:
MacawException
setAlternativeVariable
public void setAlternativeVariable(java.sql.Connection connection,
User user,
Variable targetVariable,
Variable updatedAlternativeVariable)
throws MacawException
- Throws:
MacawException