org.kuali.student.common.ui.server.applicationstate.dao.impl
Class ApplicationStateDaoImpl

java.lang.Object
  extended by org.kuali.student.common.dao.impl.AbstractCrudDaoImpl
      extended by org.kuali.student.common.dao.impl.AbstractSearchableCrudDaoImpl
          extended by org.kuali.student.common.ui.server.applicationstate.dao.impl.ApplicationStateDaoImpl
All Implemented Interfaces:
CrudDao, SearchableDao, ApplicationStateDao

public class ApplicationStateDaoImpl
extends AbstractSearchableCrudDaoImpl
implements ApplicationStateDao

This data access class stores the GUI (page, section, widget, etc.) application states as key value pairs in a database.


Field Summary
private static String DEFAULT_USER_ID
           
 
Fields inherited from class org.kuali.student.common.dao.impl.AbstractCrudDaoImpl
em
 
Constructor Summary
ApplicationStateDaoImpl()
           
 
Method Summary
 ApplicationState createApplicationState(ApplicationState appState)
          Creates and returns an application state.
 List<String> createApplicationState(Collection<ApplicationState> appStates)
          Creates a collection of application states and returns their ids.
 ApplicationState getApplicationState(String applicationId, String referenceKey, String referenceType)
          Gets an application states by applicationId, referenceKey and referenceType.
 ApplicationState getApplicationState(String applicationId, String referenceKey, String referenceType, String userId)
          Gets an application states by applicationId, referenceKey, referenceType and userId.
 void setEm(EntityManager em)
           
 
Methods inherited from class org.kuali.student.common.dao.impl.AbstractSearchableCrudDaoImpl
search
 
Methods inherited from class org.kuali.student.common.dao.impl.AbstractCrudDaoImpl
create, delete, delete, fetch, find, getEm, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.student.common.dao.CrudDao
create, delete, delete, fetch, find, update
 
Methods inherited from interface org.kuali.student.common.dao.SearchableDao
search
 

Field Detail

DEFAULT_USER_ID

private static final String DEFAULT_USER_ID
See Also:
Constant Field Values
Constructor Detail

ApplicationStateDaoImpl

public ApplicationStateDaoImpl()
Method Detail

setEm

public void setEm(EntityManager em)
Overrides:
setEm in class AbstractCrudDaoImpl

getApplicationState

public ApplicationState getApplicationState(String applicationId,
                                            String referenceKey,
                                            String referenceType,
                                            String userId)
                                     throws DoesNotExistException
Gets an application states by applicationId, referenceKey, referenceType and userId.

Specified by:
getApplicationState in interface ApplicationStateDao
Parameters:
applicationId - Application id
referenceKey - Reference key
referenceType - Reference type
userId - User id
Returns:
An application state
Throws:
DoesNotExistException - Thrown if application state does not exist

getApplicationState

public ApplicationState getApplicationState(String applicationId,
                                            String referenceKey,
                                            String referenceType)
                                     throws DoesNotExistException
Gets an application states by applicationId, referenceKey and referenceType.

Specified by:
getApplicationState in interface ApplicationStateDao
Parameters:
applicationId - Application id
referenceKey - Reference key
referenceType - Reference type
Returns:
A list of application states
Throws:
DoesNotExistException - Thrown if application state does not exist

createApplicationState

public ApplicationState createApplicationState(ApplicationState appState)
                                        throws AlreadyExistsException
Creates and returns an application state.

Specified by:
createApplicationState in interface ApplicationStateDao
Parameters:
appState - Application state
Returns:
A new application state
Throws:
AlreadyExistsException - Thrown if application state already exists

createApplicationState

public List<String> createApplicationState(Collection<ApplicationState> appStates)
                                    throws AlreadyExistsException
Creates a collection of application states and returns their ids.

Specified by:
createApplicationState in interface ApplicationStateDao
Parameters:
appStateList - collection of application states
Returns:
A list of newly created application state ids
Throws:
AlreadyExistsException - Thrown if application state already exists


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.