|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.util.AbstractFeatureBearer | +--gate.persist.JDBCDataStore
Field Summary |
Fields inherited from interface gate.DataStore |
DATASTORE_FEATURE_NAME, LR_ID_FEATURE_NAME |
Method Summary | |
void |
addDatastoreListener(DatastoreListener l)
Registers a new DatastoreListener with this datastore |
LanguageResource |
adopt(LanguageResource lr,
SecurityInfo secInfo)
Adopt a resource for persistence. |
void |
beginTrans()
starts a transaction note that if u're already in transaction context this will not open nested transaction i.e. |
boolean |
canReadLR(Object lrID)
Checks if the user (identified by the sessionID) has read access to the LR |
boolean |
canWriteLR(Object lrID)
Checks if the user (identified by the sessionID) has write access to the LR |
void |
close()
Close the data store. |
void |
commitTrans()
commits transaction note that this will commit all the uncommited calls made so far |
void |
create()
Create a new data store. |
void |
datastoreClosed(CreoleEvent e)
Called when a DataStore has been closed |
void |
datastoreCreated(CreoleEvent e)
Called when a DataStore has been created |
void |
datastoreOpened(CreoleEvent e)
Called when a DataStore has been opened |
void |
delete()
Delete the data store. |
void |
delete(String lrClassName,
Object lrId)
Delete a resource from the data store. |
void |
deleteSince(Long timestamp)
not used |
abstract List |
findLrIds(List constraints)
Get a list of LRs that satisfy some set or restrictions |
abstract List |
findLrIds(List constraints,
String lrType)
Get a list of LRs that satisfy some set or restrictions and are of a particular type |
String |
getComment()
Save: synchonise the in-memory image of the LR with the persistent image. |
String |
getDatabaseID()
--- |
String |
getIconName()
Returns the name of the icon to be used when this datastore is displayed in the GUI |
LanguageResource |
getLr(String lrClassName,
Object lrPersistenceId)
Get a resource from the persistent store. |
List |
getLrIds(String lrType)
Get a list of the IDs of LRs of a particular type that are present. |
String |
getLrName(Object lrId)
Get the name of an LR from its ID. |
List |
getLrNames(String lrType)
Get a list of the names of LRs of a particular type that are present. |
List |
getLrTypes()
Get a list of the types of LR that are present in the data store. |
String |
getName()
Returns the name of this resource |
SecurityInfo |
getSecurityInfo(LanguageResource lr)
get security information for LR . |
Session |
getSession(Session s)
identify user using this datastore |
String |
getStorageUrl()
Get the URL for the underlying storage mechanism. |
boolean |
isAutoSaving()
Get the autosaving behaviour of the LR. |
void |
open()
Open a connection to the data store. |
void |
removeDatastoreListener(DatastoreListener l)
Removes a a previously registered DatastoreListener
from the list listeners for this datastore |
void |
resourceLoaded(CreoleEvent e)
Called when a new Resource has been loaded into the system |
void |
resourceRenamed(Resource resource,
String oldName,
String newName)
Called when the creole register has renamed a resource.1 |
void |
resourceUnloaded(CreoleEvent e)
Called when a Resource has been removed from the system |
void |
rollbackTrans()
rollsback a transaction |
void |
setAutoSaving(boolean autoSaving)
Set method for the autosaving behaviour of the data store. |
void |
setName(String name)
Sets the name of this resource |
void |
setSession(Session s)
identify user using this datastore |
void |
setStorageUrl(String storageUrl)
Set the URL for the underlying storage mechanism. |
void |
sync(LanguageResource lr)
Save: synchonise the in-memory image of the LR with the persistent image. |
Long |
timestamp()
not used |
Methods inherited from class gate.util.AbstractFeatureBearer |
getFeatures, setFeatures |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gate.DataStore |
lockLr, setSecurityInfo, unlockLr |
Methods inherited from interface gate.util.FeatureBearer |
getFeatures, setFeatures |
Method Detail |
public String getComment()
getComment
in interface DataStore
public String getIconName()
getIconName
in interface DataStore
public String getLrName(Object lrId) throws PersistenceException
getLrName
in interface DataStore
PersistenceException
public void setStorageUrl(String storageUrl) throws PersistenceException
setStorageUrl
in interface DataStore
PersistenceException
public String getStorageUrl()
getStorageUrl
in interface DataStore
public void create() throws PersistenceException, UnsupportedOperationException
create
in interface DataStore
PersistenceException
UnsupportedOperationException
public void open() throws PersistenceException
open
in interface DataStore
PersistenceException
public void close() throws PersistenceException
close
in interface DataStore
PersistenceException
public void delete() throws PersistenceException, UnsupportedOperationException
delete
in interface DataStore
PersistenceException
UnsupportedOperationException
public void delete(String lrClassName, Object lrId) throws PersistenceException, SecurityException
delete
in interface DataStore
lrId
- a data-store specific unique identifier for the resourcelrClassName
- class name of the type of resource
PersistenceException
SecurityException
public void sync(LanguageResource lr) throws PersistenceException, SecurityException
sync
in interface DataStore
PersistenceException
SecurityException
public void setAutoSaving(boolean autoSaving) throws UnsupportedOperationException, PersistenceException
setAutoSaving
in interface DataStore
UnsupportedOperationException
PersistenceException
public boolean isAutoSaving()
isAutoSaving
in interface DataStore
public LanguageResource adopt(LanguageResource lr, SecurityInfo secInfo) throws PersistenceException, SecurityException
adopt
in interface DataStore
PersistenceException
SecurityException
public List getLrTypes() throws PersistenceException
getLrTypes
in interface DataStore
PersistenceException
public List getLrIds(String lrType) throws PersistenceException
getLrIds
in interface DataStore
PersistenceException
public List getLrNames(String lrType) throws PersistenceException
getLrNames
in interface DataStore
PersistenceException
public boolean canReadLR(Object lrID) throws PersistenceException, SecurityException
canReadLR
in interface DataStore
PersistenceException
SecurityException
public boolean canWriteLR(Object lrID) throws PersistenceException, SecurityException
canWriteLR
in interface DataStore
PersistenceException
SecurityException
public void beginTrans() throws PersistenceException, UnsupportedOperationException
beginTrans
in interface DatabaseDataStore
PersistenceException
UnsupportedOperationException
public void commitTrans() throws PersistenceException, UnsupportedOperationException
commitTrans
in interface DatabaseDataStore
PersistenceException
UnsupportedOperationException
public void rollbackTrans() throws PersistenceException, UnsupportedOperationException
rollbackTrans
in interface DatabaseDataStore
PersistenceException
UnsupportedOperationException
public Long timestamp() throws PersistenceException
timestamp
in interface DatabaseDataStore
PersistenceException
public void deleteSince(Long timestamp) throws PersistenceException
deleteSince
in interface DatabaseDataStore
PersistenceException
public void setName(String name)
setName
in interface NameBearer
public String getName()
getName
in interface NameBearer
public String getDatabaseID()
getDatabaseID
in interface DatabaseDataStore
public void removeDatastoreListener(DatastoreListener l)
DatastoreListener
from the list listeners for this datastore
removeDatastoreListener
in interface DataStore
public void addDatastoreListener(DatastoreListener l)
DatastoreListener
with this datastore
addDatastoreListener
in interface DataStore
public void resourceLoaded(CreoleEvent e)
CreoleListener
Resource
has been loaded into the system
resourceLoaded
in interface CreoleListener
public void resourceRenamed(Resource resource, String oldName, String newName)
CreoleListener
resourceRenamed
in interface CreoleListener
public void resourceUnloaded(CreoleEvent e)
CreoleListener
Resource
has been removed from the system
resourceUnloaded
in interface CreoleListener
public void datastoreOpened(CreoleEvent e)
CreoleListener
DataStore
has been opened
datastoreOpened
in interface CreoleListener
public void datastoreCreated(CreoleEvent e)
CreoleListener
DataStore
has been created
datastoreCreated
in interface CreoleListener
public void datastoreClosed(CreoleEvent e)
CreoleListener
DataStore
has been closed
datastoreClosed
in interface CreoleListener
public void setSession(Session s) throws SecurityException
setSession
in interface DataStore
SecurityException
public Session getSession(Session s) throws SecurityException
getSession
in interface DataStore
SecurityException
public abstract List findLrIds(List constraints) throws PersistenceException
findLrIds
in interface DataStore
PersistenceException
public abstract List findLrIds(List constraints, String lrType) throws PersistenceException
findLrIds
in interface DataStore
PersistenceException
public SecurityInfo getSecurityInfo(LanguageResource lr) throws PersistenceException
getSecurityInfo
in interface DataStore
PersistenceException
public LanguageResource getLr(String lrClassName, Object lrPersistenceId) throws PersistenceException, SecurityException
getLr
in interface DataStore
PersistenceException
SecurityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |