|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.objectstore.intermine.DatabaseSchema
public class DatabaseSchema
An object that represents the mapping of a Model onto a relational database. This handles the complications of truncated class trees.
| Nested Class Summary | |
|---|---|
static class |
DatabaseSchema.Fields
Inner class to hold information on Attributes and References. |
| Constructor Summary | |
|---|---|
DatabaseSchema(Model model,
java.util.List<ClassDescriptor> truncated,
boolean noNotXml,
java.util.Set<java.lang.String> missingTables,
int version,
boolean hasBioSeg)
Returns an instance of DatabaseSchema, for the given Model and and List of truncated classes. |
|
| Method Summary | |
|---|---|
java.util.Set<java.lang.String> |
getMissingTables()
Returns the Set of table names which are tables missing from the database. |
Model |
getModel()
Returns the model. |
DatabaseSchema.Fields |
getTableFields(ClassDescriptor cld)
Returns a Fields object of FieldDescriptors in the given table-mastering ClassDescriptor. |
ClassDescriptor |
getTableMaster(ClassDescriptor cld)
Returns the name of the table in which to store a row for the given ClassDescriptor. |
int |
getVersion()
Returns the database format version. |
boolean |
hasBioSeg()
Returns true if the database has the bioseg type installed. |
boolean |
isFetchFromInterMineObject()
Returns true if ProxyReferences can be fetched from the InterMineObject table. |
boolean |
isFlatMode(java.lang.Class<?> c)
Returns true if the ObjectStore needs to run in flat mode for this Class - if notXml is missing and the InterMineObject table is missing (or if the class is not a subclass of InterMineObject). |
boolean |
isMissingNotXml()
Returns true if NotXML should be omitted from all tables except the InterMineObject table, and the InterMineObject table is present. |
boolean |
isTruncated(ClassDescriptor cld)
Returns true if a query using the given table-mastering ClassDescriptor would require a constraint on the className field. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DatabaseSchema(Model model,
java.util.List<ClassDescriptor> truncated,
boolean noNotXml,
java.util.Set<java.lang.String> missingTables,
int version,
boolean hasBioSeg)
model - a Modeltruncated - a List of ClassDescriptors representing the truncated classes, in order of
decreasing priority.noNotXml - true if NotXML data should be omitted from every table except InterMineObjectmissingTables - a Set of lowercase table names which are missingversion - the version number in the databasehasBioSeg - true if the database has the bioseg type installed
java.lang.IllegalArgumentException - if the truncated class list does not make sense| Method Detail |
|---|
public ClassDescriptor getTableMaster(ClassDescriptor cld)
cld - the ClassDescriptor from the Model
public boolean isTruncated(ClassDescriptor cld)
cld - the ClassDescriptor
public Model getModel()
public boolean isMissingNotXml()
public boolean isFlatMode(java.lang.Class<?> c)
c - a Class
public boolean isFetchFromInterMineObject()
public int getVersion()
public java.util.Set<java.lang.String> getMissingTables()
public boolean hasBioSeg()
public DatabaseSchema.Fields getTableFields(ClassDescriptor cld)
throws ObjectStoreException
cld - the ClassDescriptor
ObjectStoreException - if two similar-named fields are found of different types
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||