public interface DatabaseConnector
Modifier and Type | Interface and Description |
---|---|
static class |
DatabaseConnector.EntityType |
Modifier and Type | Method and Description |
---|---|
boolean |
addModel(java.io.File file,
java.lang.String path,
java.lang.String id,
SingleUser user,
java.lang.String comment)
Add a model to the database
|
int |
addModelVersion(java.io.File f,
java.lang.String id,
SingleUser user,
java.lang.String comment,
java.lang.String date) |
boolean |
addUser(SingleUser user)
Store the given user in the database
|
boolean |
checkConnection()
Check if the connection is alive
|
void |
deleteEntity(DatabaseConnector.EntityType entity,
java.lang.Object[] idValues)
Delete enitities specified by the given entity type and entity id values.
|
void |
deleteModel(java.lang.String modelId)
Delete a model (and all its versions) from the database
|
void |
divestRight(java.lang.String id,
AccessType access,
User u)
Deny access for a specific user to s specific model
|
java.util.Set<java.lang.String> |
getAccessiblePaths(SingleUser user)
Get paths that are accessible by the given user
|
java.util.Set<User> |
getAccessors(java.lang.String id,
AccessType access)
Get a set of users that have a specific type of access to the given model
|
java.util.Set<ProcessObjectComment> |
getComments(java.lang.String modelId,
java.lang.String version,
java.lang.String elementId)
Get all comments for a specific model or modelelement
|
java.lang.String |
getConnectionName()
Get the connection's name
|
java.util.Set<ISLocation> |
getISConnections(SingleUser user)
Retrieve the ISConnections for the given user
|
ProcessModel |
getModel(java.lang.String id,
int version)
Retrieve a specific model version
|
java.util.Map<java.lang.String,AccessType> |
getModelsWithAccess(SingleUser user)
Retrieve a list of models and the respective access for a given user
|
int |
getModelVersionCount(java.lang.String modelId)
Retrieve the number of model versions from the database
|
void |
grantRight(java.lang.String id,
AccessType access,
User u)
Allow access for a specific user to a specific model
|
void |
insertEntity(DatabaseConnector.EntityType entity,
DatabaseSchema.Attribute[] attributes,
java.lang.Object[] values)
Create an entity specified by the given entity type, attributes, and attribute values.
|
java.lang.Object[] |
selectAttributes(DatabaseSchema.Attribute[] attributes,
DatabaseConnector.EntityType entity,
java.lang.Object[] idValues)
Select a set of attributes of an object specified by the gievn entity type and entity id values.
|
java.util.Set<java.lang.Object> |
selectMultiValueSingleAttribute(DatabaseSchema.Attribute attribute,
DatabaseConnector.EntityType entity,
java.lang.Object[] idValues)
Select ALL values for an attribute of an object specified by the given entity type and entity id values.
|
java.util.Set<java.lang.Object> |
selectMultiValueSingleAttributeWithMultipleIDs(DatabaseSchema.Attribute attribute,
DatabaseConnector.EntityType entity,
java.lang.Object[][] idValues)
Select ALL values for an attribute of multiple object specified by the given enitity type and entity ids.
|
java.util.Set<java.lang.Object> |
selectSingleAttribute(DatabaseSchema.Attribute attribute,
DatabaseConnector.EntityType entity)
Select ALL values for an attribute of the given entity type.
|
java.lang.Object |
selectSingleAttribute(DatabaseSchema.Attribute attribute,
DatabaseConnector.EntityType entity,
java.lang.Object[] idValues)
Select a single attribute value of an object specified by the given entity type and entity id values.
|
boolean |
updateAttribute(DatabaseSchema.Attribute attribute,
java.lang.Object value,
DatabaseConnector.EntityType entity,
java.lang.Object[] idValues)
Update an attribute value of an object specified by the gievn entity type and entity id values.
|
java.lang.String getConnectionName()
boolean checkConnection()
java.util.Set<java.lang.Object> selectSingleAttribute(DatabaseSchema.Attribute attribute, DatabaseConnector.EntityType entity)