Interface DbFactory<T extends DbObject>
- Type Parameters:
T- the type of database object
- All Known Implementing Classes:
CodeManager.CodeUnitFactory, DebuggerFactoryAdapter
public interface DbFactory<T extends DbObject>
Interface for Factories that create
DbObjects. Required by the DbCache
NOTE: This factory is used to instantiate dbObject instances that are already backed by records in the database. In general, these methods should only be used by the DbCache class to insure that the objects aren't already cached if they are created using this factor, they are added to the cache in a thread safe way.
-
Method Summary
Modifier and TypeMethodDescriptioninstantiate(long key) Creates a new DatabaseObject of type T for the given key.instantiate(DBRecord record) Creates a new DatabaseObject of type T for the given record.
-
Method Details
-
instantiate
Creates a new DatabaseObject of type T for the given key. It is expected that a record for this object already exists in the database. This method is simply creating the unique instance that is associated with that record.- Parameters:
key- the database key the database key- Returns:
- the newly created instance of type T or null if no record found
-
instantiate
-