ch.agent.crnickl.mongodb
Class ReadMethodsForSchema

java.lang.Object
  extended by ch.agent.crnickl.impl.DatabaseMethodsImpl
      extended by ch.agent.crnickl.mongodb.MongoDatabaseMethods
          extended by ch.agent.crnickl.mongodb.ReadMethodsForSchema
All Implemented Interfaces:
ch.agent.crnickl.impl.DatabaseMethods, ch.agent.crnickl.impl.PermissionChecker
Direct Known Subclasses:
WriteMethodsForSchema

public class ReadMethodsForSchema
extends MongoDatabaseMethods

A stateless object with methods providing read access to schemas.

Author:
Jean-Paul Vetterli

Nested Class Summary
 
Nested classes/interfaces inherited from class ch.agent.crnickl.mongodb.MongoDatabaseMethods
MongoDatabaseMethods.Operator
 
Constructor Summary
ReadMethodsForSchema()
           
 
Method Summary
 ch.agent.crnickl.api.UpdatableSchema getSchema(ch.agent.crnickl.api.Surrogate surrogate)
          Find a schema corresponding to a surrogate.
 Collection<ch.agent.crnickl.api.Surrogate> getSchemaSurrogateList(ch.agent.crnickl.api.Database db, String pattern)
          Find a collection of schema surrogates with labels matching a pattern.
 
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

ReadMethodsForSchema

public ReadMethodsForSchema()
Method Detail

getSchema

public ch.agent.crnickl.api.UpdatableSchema getSchema(ch.agent.crnickl.api.Surrogate surrogate)
                                               throws ch.agent.crnickl.T2DBException
Find a schema corresponding to a surrogate.

Parameters:
surrogate - a surrogate
Returns:
a schema or null
Throws:
ch.agent.crnickl.T2DBException

getSchemaSurrogateList

public Collection<ch.agent.crnickl.api.Surrogate> getSchemaSurrogateList(ch.agent.crnickl.api.Database db,
                                                                         String pattern)
                                                                  throws ch.agent.crnickl.T2DBException
Find a collection of schema surrogates with labels matching a pattern.

Parameters:
db - a database
pattern - a simple pattern where "*" stands for zero or more characters
Returns:
a collection of schema surrogates
Throws:
ch.agent.crnickl.T2DBException


Copyright © 2013. All Rights Reserved.