cst.common.persistenceLayer
Class AbstractProductionService

java.lang.Object
  extended by cst.common.persistenceLayer.AbstractProductionService
Direct Known Subclasses:
ProductionAdminService, ProductionLoggingService

public abstract class AbstractProductionService
extends java.lang.Object

base class containing common code used to service the production versions of both LoggingServiceAPI and AdminServiceAPI.


 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
protected  java.lang.String activityChangesTableName
           
protected  ConfigurationManager configurationManager
           
protected  java.lang.String databaseName
           
protected  Log log
           
protected  ProductionServiceConnectionManager productionServiceConnectionManager
           
protected  SessionProperties sessionProperties
           
protected  java.lang.String subjectTableName
           
protected  TrialSubjectModelFactory trialSubjectModelFactory
           
protected  ProductionLoggingToolQueries userQueries
           
protected  java.lang.String userTableName
           
 
Constructor Summary
AbstractProductionService()
           
 
Method Summary
 void checkRepositoryIsSynchronised()
           
static void closeStatements(java.sql.Statement statement, java.sql.ResultSet resultSet)
           
protected  void commitDatabaseChanges(java.sql.Connection connection)
           
 TrialSubjectModel getTrialSubjectModel(User user, java.lang.String trialSubjectIdentifier)
           
 void initialise(SessionProperties sessionProperties)
           
protected  void initialiseConnection(java.sql.Connection connection)
           
protected  void rollBack(java.sql.Connection connection)
           
 void updateTrialActivity(User user, TrialActivityModel trialActivityModel)
           
 void validateUser(User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessionProperties

protected SessionProperties sessionProperties

userQueries

protected ProductionLoggingToolQueries userQueries

productionServiceConnectionManager

protected ProductionServiceConnectionManager productionServiceConnectionManager

log

protected Log log

trialSubjectModelFactory

protected TrialSubjectModelFactory trialSubjectModelFactory

configurationManager

protected ConfigurationManager configurationManager

databaseName

protected java.lang.String databaseName

userTableName

protected java.lang.String userTableName

subjectTableName

protected java.lang.String subjectTableName

activityChangesTableName

protected java.lang.String activityChangesTableName
Constructor Detail

AbstractProductionService

public AbstractProductionService()
Method Detail

initialise

public void initialise(SessionProperties sessionProperties)
                throws CSTException
Throws:
CSTException

getTrialSubjectModel

public TrialSubjectModel getTrialSubjectModel(User user,
                                              java.lang.String trialSubjectIdentifier)
                                       throws CSTException
Throws:
CSTException

validateUser

public void validateUser(User user)
                  throws CSTException
Throws:
CSTException

updateTrialActivity

public void updateTrialActivity(User user,
                                TrialActivityModel trialActivityModel)
                         throws CSTException
Throws:
CSTException

checkRepositoryIsSynchronised

public void checkRepositoryIsSynchronised()
                                   throws CSTException
Throws:
CSTException

closeStatements

public static void closeStatements(java.sql.Statement statement,
                                   java.sql.ResultSet resultSet)
                            throws CSTException
Throws:
CSTException

initialiseConnection

protected void initialiseConnection(java.sql.Connection connection)
                             throws CSTException
Throws:
CSTException

commitDatabaseChanges

protected void commitDatabaseChanges(java.sql.Connection connection)
                              throws CSTException
Throws:
CSTException

rollBack

protected void rollBack(java.sql.Connection connection)
                 throws CSTException
Throws:
CSTException