edu.stanford.smi.protege.storage.database
Class AbstractDatabaseFrameDb
java.lang.Object
edu.stanford.smi.protege.storage.database.AbstractDatabaseFrameDb
- All Implemented Interfaces:
- NarrowFrameStore, DatabaseFrameDb
- Direct Known Subclasses:
- DefaultDatabaseFrameDb
public abstract class AbstractDatabaseFrameDb
- extends Object
- implements DatabaseFrameDb
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.stanford.smi.protege.model.framestore.NarrowFrameStore |
addValues, deleteFrame, getClosure, getClsCount, getDelegate, getFacetCount, getFrame, getFrameCount, getFrames, getFrames, getFramesWithAnyValue, getMatchingFrames, getMatchingReferences, getReferences, getSimpleInstanceCount, getSlotCount, getValues, getValuesCount, moveValue, reinitialize, replaceFrame, replaceFrame, setCaching, setValues |
log
public static Logger log
SLOW_QUERY_PROPERTY
public static final String SLOW_QUERY_PROPERTY
- See Also:
- Constant Field Values
_connections
protected final Map<RemoteSession,RobustConnection> _connections
_driver
protected String _driver
_frameFactory
protected FrameFactory _frameFactory
_isInclude
protected boolean _isInclude
_password
protected String _password
_table
protected String _table
_url
protected String _url
_user
protected String _user
AbstractDatabaseFrameDb
public AbstractDatabaseFrameDb()
executeQuery
protected static ResultSet executeQuery(PreparedStatement stmt)
throws SQLException
- Throws:
SQLException
executeUpdate
protected static int executeUpdate(PreparedStatement stmt)
throws SQLException
- Throws:
SQLException
isNullValue
protected static boolean isNullValue(Object o)
beginTransaction
public boolean beginTransaction(String name)
- Specified by:
beginTransaction
in interface NarrowFrameStore
close
public void close()
- Specified by:
close
in interface NarrowFrameStore
- Specified by:
close
in interface DatabaseFrameDb
commitTransaction
public boolean commitTransaction()
- Specified by:
commitTransaction
in interface NarrowFrameStore
createConnection
protected RobustConnection createConnection()
throws SQLException
- Throws:
SQLException
createRuntimeException
protected RuntimeException createRuntimeException(SQLException e)
getCurrentConnection
public RobustConnection getCurrentConnection()
throws SQLException
- Throws:
SQLException
getFrameFactory
public FrameFactory getFrameFactory()
getName
public String getName()
- Description copied from interface:
NarrowFrameStore
- The Narrow Frame store has a standard set/get name interface.
One of the purposes of this interface is to allow the MergingNarrowFrameStore
match names of the narrow frame stores of including and included
projects. For this purpose the name of the narrow frame store
is the string representation of the uri for the project.
- Specified by:
getName
in interface NarrowFrameStore
- Returns:
- the name of this narrow frame store.
getTransactionStatusMonitor
public TransactionMonitor getTransactionStatusMonitor()
- Description copied from interface:
NarrowFrameStore
- Retrieves a transaction status monitor for transactions. If this call returns null
then it means that transactions are not supported.
- Specified by:
getTransactionStatusMonitor
in interface NarrowFrameStore
- Specified by:
getTransactionStatusMonitor
in interface DatabaseFrameDb
- Returns:
- A TransactionMonitor object that tracks the status of transactions.
initialize
public void initialize(FrameFactory factory,
String driver,
String url,
String user,
String pass,
String table,
boolean isInclude)
- Specified by:
initialize
in interface DatabaseFrameDb
rollbackTransaction
public boolean rollbackTransaction()
- Specified by:
rollbackTransaction
in interface NarrowFrameStore
setName
public void setName(String name)
- Description copied from interface:
NarrowFrameStore
- The Narrow Frame store has a standard set/get name interface.
One of the purposes of this interface is to allow the MergingNarrowFrameStore
match names of the narrow frame stores of including and included
projects. For this purpose the name of the narrow frame store
is the string representation of the uri for the project.
- Specified by:
setName
in interface NarrowFrameStore
- Parameters:
name
- - the name of the Narrow Frame Store.
getTableName
public String getTableName()
- Specified by:
getTableName
in interface DatabaseFrameDb
executeQuery
protected ResultSet executeQuery(String text)
throws SQLException
- Throws:
SQLException
executeQuery
protected ResultSet executeQuery(String text,
int maxRows)
throws SQLException
- Throws:
SQLException
executeUpdate
protected int executeUpdate(String text)
throws SQLException
- Throws:
SQLException
executeQuery
public void executeQuery(Query query,
QueryCallback callback)
- Description copied from interface:
NarrowFrameStore
- The executeQuery method allows for complex queries. It is asynchronous
so that in server-client mode the server knowledge base lock will not be
held for an excessive amount of time.
The contract specifies that the implementor must call one of the
QueryCallback methods in a separate thread. This makes it possible
for the caller to know how to retrieve the results in a synchronous way
without worrying about deadlock.
- Specified by:
executeQuery
in interface NarrowFrameStore
Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2011 Stanford University.