|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectch.agent.crnickl.impl.DatabaseMethodsImpl
ch.agent.crnickl.mongodb.MongoDatabaseMethods
ch.agent.crnickl.mongodb.ReadMethodsForSchema
ch.agent.crnickl.mongodb.WriteMethodsForSchema
public class WriteMethodsForSchema
A stateless object with methods providing write access to schemas.
A schema in MongoDB is stored as:
Note that attribute and series definitions are not keyed, because they do not always have a name (erasing). The position inside the array is independent of number. When erasing is present, it is true, and all other fields except number are absent. When erasing is absent, the presence of other fields denotes overriding behavior. When present, the base field identifies the base schema. The attribs and series arrays can be empty but are present.{ _id : OID, name : STRING, base? : OID, attribs : [ { number : NUMBER, erasing? : BOOLEAN prop? : OID, value? : STRING }, ... ] series : [ { number : NUMBER, erasing? : BOOLEAN description? : STRING, attribs : [ ... ] }, ... ] }
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ch.agent.crnickl.mongodb.MongoDatabaseMethods |
|---|
MongoDatabaseMethods.Operator |
| Constructor Summary | |
|---|---|
WriteMethodsForSchema()
|
|
| Method Summary | |
|---|---|
void |
createSchema(ch.agent.crnickl.api.UpdatableSchema schema)
Create an empty schema in the database. |
void |
deleteSchema(ch.agent.crnickl.api.UpdatableSchema schema,
ch.agent.crnickl.impl.SchemaUpdatePolicy policy)
Delete a schema from the database. |
ch.agent.crnickl.api.Surrogate |
findChronicle(ch.agent.crnickl.api.Property<?> property,
ch.agent.crnickl.api.Schema schema)
Find a chronicle with an explicit attribute value for a given property and schemas. |
ch.agent.crnickl.api.Surrogate |
findChronicle(ch.agent.crnickl.api.Schema schema)
Find a chronicle referencing one of the schemas. |
ch.agent.crnickl.api.Surrogate |
findChronicle(ch.agent.crnickl.api.SeriesDefinition ss,
ch.agent.crnickl.api.Schema schema)
Find a chronicle with a given series in a collection of schemas. |
boolean |
updateSchema(ch.agent.crnickl.api.UpdatableSchema schema,
ch.agent.crnickl.impl.SchemaUpdatePolicy policy)
Update the basic schema setup in the database. |
| Methods inherited from class ch.agent.crnickl.mongodb.ReadMethodsForSchema |
|---|
getSchema, getSchemaSurrogateList |
| Methods inherited from class ch.agent.crnickl.mongodb.MongoDatabaseMethods |
|---|
addOperation, asQuery, compositeName, extractRegexp, getId, getId, getIdOrZero, getMongoDB, getMongoDB, getMongoDB, getObject, getObjectId, makeSurrogate, mongoObject, operation |
| Methods inherited from class ch.agent.crnickl.impl.DatabaseMethodsImpl |
|---|
check, check, check, check, checkIntegrity, makeSurrogate, makeSurrogate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WriteMethodsForSchema()
| Method Detail |
|---|
public void createSchema(ch.agent.crnickl.api.UpdatableSchema schema)
throws ch.agent.crnickl.T2DBException
schema - a schema
ch.agent.crnickl.T2DBException
public void deleteSchema(ch.agent.crnickl.api.UpdatableSchema schema,
ch.agent.crnickl.impl.SchemaUpdatePolicy policy)
throws ch.agent.crnickl.T2DBException
schema - a schemapolicy - a schema udpdating policy
ch.agent.crnickl.T2DBException
public boolean updateSchema(ch.agent.crnickl.api.UpdatableSchema schema,
ch.agent.crnickl.impl.SchemaUpdatePolicy policy)
throws ch.agent.crnickl.T2DBException
schema - a schemapolicy -
ch.agent.crnickl.T2DBException
public ch.agent.crnickl.api.Surrogate findChronicle(ch.agent.crnickl.api.Schema schema)
throws ch.agent.crnickl.T2DBException
schema - a schema
ch.agent.crnickl.T2DBException
public ch.agent.crnickl.api.Surrogate findChronicle(ch.agent.crnickl.api.Property<?> property,
ch.agent.crnickl.api.Schema schema)
throws ch.agent.crnickl.T2DBException
property - a propertyschema - a schema
ch.agent.crnickl.T2DBException
public ch.agent.crnickl.api.Surrogate findChronicle(ch.agent.crnickl.api.SeriesDefinition ss,
ch.agent.crnickl.api.Schema schema)
throws ch.agent.crnickl.T2DBException
ss - a series definitionschema - a schema
ch.agent.crnickl.T2DBException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||