macaw.persistenceLayer.production
Class SQLListChoiceManager

java.lang.Object
  extended by macaw.persistenceLayer.production.SQLCurationConceptManager
      extended by macaw.persistenceLayer.production.SQLListChoiceManager

public class SQLListChoiceManager
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)

Field Summary
 
Fields inherited from class macaw.persistenceLayer.production.SQLCurationConceptManager
log
 
Constructor Summary
SQLListChoiceManager(SQLChangeEventManager changeEventManager)
           
 
Method Summary
 void addAliasFilePath(java.sql.Connection connection, AliasFilePath aliasFilePath)
           
 void addAvailabilityState(java.sql.Connection connection, User user, AvailabilityState availabilityState)
           
 void addCategory(java.sql.Connection connection, User user, Category category)
           
 void addCleaningState(java.sql.Connection connection, CleaningState cleaningState)
           
 void clear(java.sql.Connection connection)
           
 void createTables(java.sql.Connection connection)
           
 void deleteAliasFilePaths(java.sql.Connection connection, java.util.ArrayList<AliasFilePath> aliasFilePathsToDelete)
           
 void deleteAvailabilityStates(java.sql.Connection connection, java.util.ArrayList<AvailabilityState> availabilityStatesToDelete)
           
 void deleteCategories(java.sql.Connection connection, User user, java.util.ArrayList<Category> categoriesToDelete)
           
 void deleteCleaningStates(java.sql.Connection connection, java.util.ArrayList<CleaningState> cleaningStatesToDelete)
           
 AliasFilePath getAliasFilePath(java.sql.Connection connection, java.lang.String cardNumber)
           
 int getAliasFilePathIdentifier(java.sql.Connection connection, Variable variable, AliasFilePath aliasFilePath)
           
 java.lang.String getAliasFilePathName(java.sql.Connection connection, Variable variable, int dataLibraryID)
           
 java.util.ArrayList<AliasFilePath> getAliasFilePaths(java.sql.Connection connection)
           
 java.util.ArrayList<AliasFilePath> getAliasFilePathsMatchingName(java.sql.Connection connection, java.lang.String cardNumberExpression)
           
 int getAvailabilityStateIdentifier(java.sql.Connection connection, Variable variable, AvailabilityState availabilityState)
           
 java.lang.String getAvailabilityStateName(java.sql.Connection connection, Variable variable, int availabilityStateID)
           
 java.util.ArrayList<AvailabilityState> getAvailabilityStates(java.sql.Connection connection)
           
 java.util.ArrayList<Category> getCategories(java.sql.Connection connection, User user)
           
 int getCategoryIdentifier(java.sql.Connection connection, Variable variable, Category category)
           
 java.lang.String getCategoryName(java.sql.Connection connection, Variable variable, int categoryID)
           
 int getCleaningStateIdentifier(java.sql.Connection connection, Variable variable, CleaningState cleaningState)
           
 java.lang.String getCleaningStateName(java.sql.Connection connection, Variable variable, int cleaningStateID)
           
 java.util.ArrayList<CleaningState> getCleaningStates(java.sql.Connection connection, User user)
           
 java.lang.String getFilePathFromAlias(java.sql.Connection connection, java.lang.String currentAlias)
           
 int getIdentifierFromName(java.sql.Connection connection, Variable variable, macaw.persistenceLayer.production.SQLListChoiceManager.ListChoiceType listChoiceType, java.lang.String query, java.lang.String name)
           
 AliasFilePath getOriginalAliasFilePath(java.sql.Connection connection, AliasFilePath revisedAliasFilePath)
           
 AvailabilityState getOriginalAvailabilityState(java.sql.Connection connection, AvailabilityState revisedAvailabilityState)
           
 Category getOriginalCategory(java.sql.Connection connection, Category revisedCategory)
           
 CleaningState getOriginalCleaningState(java.sql.Connection connection, CleaningState revisedCleaningState)
           
 void updateAliasFilePath(java.sql.Connection connection, User user, AliasFilePath revisedAliasFilePath)
           
 void updateAvailabilityState(java.sql.Connection connection, AvailabilityState revisedAvailabilityState)
           
 void updateCategory(java.sql.Connection connection, User user, Category revisedCategory)
           
 void updateCleaningState(java.sql.Connection connection, User user, CleaningState revisedCleaningState)
           
 
Methods inherited from class macaw.persistenceLayer.production.SQLCurationConceptManager
registerChangeEvent, registerChangeEvents, setLog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLListChoiceManager

public SQLListChoiceManager(SQLChangeEventManager changeEventManager)
Method Detail

createTables

public void createTables(java.sql.Connection connection)
                  throws MacawException
Throws:
MacawException

getCategoryName

public java.lang.String getCategoryName(java.sql.Connection connection,
                                        Variable variable,
                                        int categoryID)
                                 throws MacawException
Throws:
MacawException

getCategories

public java.util.ArrayList<Category> getCategories(java.sql.Connection connection,
                                                   User user)
                                            throws MacawException
Throws:
MacawException

addCategory

public void addCategory(java.sql.Connection connection,
                        User user,
                        Category category)
                 throws MacawException
Throws:
MacawException

updateCategory

public void updateCategory(java.sql.Connection connection,
                           User user,
                           Category revisedCategory)
                    throws MacawException
Throws:
MacawException

deleteCategories

public void deleteCategories(java.sql.Connection connection,
                             User user,
                             java.util.ArrayList<Category> categoriesToDelete)
                      throws MacawException
Throws:
MacawException

getCleaningStateName

public java.lang.String getCleaningStateName(java.sql.Connection connection,
                                             Variable variable,
                                             int cleaningStateID)
                                      throws MacawException
Throws:
MacawException

getCleaningStates

public java.util.ArrayList<CleaningState> getCleaningStates(java.sql.Connection connection,
                                                            User user)
                                                     throws MacawException
Throws:
MacawException

addCleaningState

public void addCleaningState(java.sql.Connection connection,
                             CleaningState cleaningState)
                      throws MacawException
Throws:
MacawException

updateCleaningState

public void updateCleaningState(java.sql.Connection connection,
                                User user,
                                CleaningState revisedCleaningState)
                         throws MacawException
Throws:
MacawException

deleteCleaningStates

public void deleteCleaningStates(java.sql.Connection connection,
                                 java.util.ArrayList<CleaningState> cleaningStatesToDelete)
                          throws MacawException
Throws:
MacawException

getAvailabilityStateName

public java.lang.String getAvailabilityStateName(java.sql.Connection connection,
                                                 Variable variable,
                                                 int availabilityStateID)
                                          throws MacawException
Throws:
MacawException

getAvailabilityStates

public java.util.ArrayList<AvailabilityState> getAvailabilityStates(java.sql.Connection connection)
                                                             throws MacawException
Throws:
MacawException

addAvailabilityState

public void addAvailabilityState(java.sql.Connection connection,
                                 User user,
                                 AvailabilityState availabilityState)
                          throws MacawException
Throws:
MacawException

updateAvailabilityState

public void updateAvailabilityState(java.sql.Connection connection,
                                    AvailabilityState revisedAvailabilityState)
                             throws MacawException
Throws:
MacawException

deleteAvailabilityStates

public void deleteAvailabilityStates(java.sql.Connection connection,
                                     java.util.ArrayList<AvailabilityState> availabilityStatesToDelete)
                              throws MacawException
Throws:
MacawException

getAliasFilePathName

public java.lang.String getAliasFilePathName(java.sql.Connection connection,
                                             Variable variable,
                                             int dataLibraryID)
                                      throws MacawException
Throws:
MacawException

getAliasFilePaths

public java.util.ArrayList<AliasFilePath> getAliasFilePaths(java.sql.Connection connection)
                                                     throws MacawException
Throws:
MacawException

getAliasFilePath

public AliasFilePath getAliasFilePath(java.sql.Connection connection,
                                      java.lang.String cardNumber)
                               throws MacawException
Throws:
MacawException

getAliasFilePathsMatchingName

public java.util.ArrayList<AliasFilePath> getAliasFilePathsMatchingName(java.sql.Connection connection,
                                                                        java.lang.String cardNumberExpression)
                                                                 throws MacawException
Throws:
MacawException

addAliasFilePath

public void addAliasFilePath(java.sql.Connection connection,
                             AliasFilePath aliasFilePath)
                      throws MacawException
Throws:
MacawException

updateAliasFilePath

public void updateAliasFilePath(java.sql.Connection connection,
                                User user,
                                AliasFilePath revisedAliasFilePath)
                         throws MacawException
Throws:
MacawException

deleteAliasFilePaths

public void deleteAliasFilePaths(java.sql.Connection connection,
                                 java.util.ArrayList<AliasFilePath> aliasFilePathsToDelete)
                          throws MacawException
Throws:
MacawException

getAvailabilityStateIdentifier

public int getAvailabilityStateIdentifier(java.sql.Connection connection,
                                          Variable variable,
                                          AvailabilityState availabilityState)
                                   throws MacawException
Throws:
MacawException

getCategoryIdentifier

public int getCategoryIdentifier(java.sql.Connection connection,
                                 Variable variable,
                                 Category category)
                          throws MacawException
Throws:
MacawException

getCleaningStateIdentifier

public int getCleaningStateIdentifier(java.sql.Connection connection,
                                      Variable variable,
                                      CleaningState cleaningState)
                               throws MacawException
Throws:
MacawException

getAliasFilePathIdentifier

public int getAliasFilePathIdentifier(java.sql.Connection connection,
                                      Variable variable,
                                      AliasFilePath aliasFilePath)
                               throws MacawException
Throws:
MacawException

getIdentifierFromName

public int getIdentifierFromName(java.sql.Connection connection,
                                 Variable variable,
                                 macaw.persistenceLayer.production.SQLListChoiceManager.ListChoiceType listChoiceType,
                                 java.lang.String query,
                                 java.lang.String name)
                          throws java.sql.SQLException,
                                 MacawException
Throws:
java.sql.SQLException
MacawException

getOriginalCategory

public Category getOriginalCategory(java.sql.Connection connection,
                                    Category revisedCategory)
                             throws MacawException
Throws:
MacawException

getOriginalCleaningState

public CleaningState getOriginalCleaningState(java.sql.Connection connection,
                                              CleaningState revisedCleaningState)
                                       throws MacawException
Throws:
MacawException

getOriginalAvailabilityState

public AvailabilityState getOriginalAvailabilityState(java.sql.Connection connection,
                                                      AvailabilityState revisedAvailabilityState)
                                               throws MacawException
Throws:
MacawException

getOriginalAliasFilePath

public AliasFilePath getOriginalAliasFilePath(java.sql.Connection connection,
                                              AliasFilePath revisedAliasFilePath)
                                       throws MacawException
Throws:
MacawException

getFilePathFromAlias

public java.lang.String getFilePathFromAlias(java.sql.Connection connection,
                                             java.lang.String currentAlias)
                                      throws MacawException
Throws:
MacawException

clear

public void clear(java.sql.Connection connection)
           throws MacawException
Throws:
MacawException