jrunx.persistence
Class PersistenceStoreFactory

java.lang.Object
  |
  +--jrunx.persistence.PersistenceStoreFactory
All Implemented Interfaces:
Constants
Direct Known Subclasses:
ContainerPersistenceStoreFactory

public class PersistenceStoreFactory
extends java.lang.Object
implements Constants

Factory used to create PersistenceStore objects. Initially, only FilePersistenceStores might be created through this class

Author:
Enrique Duvos

Fields inherited from interface jrunx.persistence.Constants
CMP20_STORE_MANAGER, CREATE_SQL, CREATE_TABLE_SQL, DEFAULT_CACHE_SIZE, DELETE_TABLE_SQL, FILE_NAME, FILE_STORE, FIND_BY_PRIMARY_KEY_SQL, JDBC_STORE, LOAD_SQL, REMOVE_SQL, STORE_SQL, TEMP_DIRECTORY
 
Constructor Summary
PersistenceStoreFactory()
           
 
Method Summary
static PersistenceStore createFilePersistenceStore(java.lang.String path, java.lang.String name, boolean transactable, int cache, ServiceAdapter adapter)
          Creates a new FilePersistenceStore.
static PersistenceStore createJDBCPersistenceStore()
          Creates a new JDBCPersistenceStore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceStoreFactory

public PersistenceStoreFactory()
Method Detail

createFilePersistenceStore

public static PersistenceStore createFilePersistenceStore(java.lang.String path,
                                                          java.lang.String name,
                                                          boolean transactable,
                                                          int cache,
                                                          ServiceAdapter adapter)
                                                   throws java.lang.Exception
Creates a new FilePersistenceStore.
Parameters:
path - the complete directory path
name - the name of the PersistenceStore
transactable - true if a transactable store is desired( not functional yet)
cache - the size of the cache if a CacheFilePersistenceStore is desired, 0 otherwise
adapter - the ServiceAdapter used for shutdown hook, or null for self registration
Returns:
the PersistenceStore with a SerializableFileStoreManager associated with it

createJDBCPersistenceStore

public static PersistenceStore createJDBCPersistenceStore()
                                                   throws java.lang.Exception
Creates a new JDBCPersistenceStore.
Returns:
the PersistenceStore with no StoreManager associated with it


Copyright � 2002 Macromedia Corporation. All Rights Reserved.