ch.agent.crnickl.jdbc
Class ReadMethodsForSchema

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

public class ReadMethodsForSchema
extends JDBCDatabaseMethods

A stateless object with methods providing read access to schemas.

Version:
1.0.0
Author:
Jean-Paul Vetterli

Nested Class Summary
protected  class ReadMethodsForSchema.RawSchema
          A raw schema object keeps track of the id, the name and the parent of a schema.
 
Constructor Summary
ReadMethodsForSchema()
           
 
Method Summary
protected  ReadMethodsForSchema.RawSchema getRawSchema(ch.agent.crnickl.api.Surrogate surrogate)
          Find a raw schema corresponding to a surrogate.
 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 database, String pattern)
          Find a collection of schema surrogates with labels matching a pattern.
 
Methods inherited from class ch.agent.crnickl.jdbc.JDBCDatabaseMethods
close, executeAndGetNewId, open, open, open
 
Methods inherited from class ch.agent.crnickl.impl.DatabaseMethodsImpl
check, check, check, check, getId, getId, getIdOrZero, 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 database,
                                                                         String pattern)
                                                                  throws ch.agent.crnickl.T2DBException
Find a collection of schema surrogates with labels matching a pattern.

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

getRawSchema

protected ReadMethodsForSchema.RawSchema getRawSchema(ch.agent.crnickl.api.Surrogate surrogate)
                                               throws ch.agent.crnickl.T2DBException
Find a raw schema corresponding to a surrogate.

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


Copyright © 2012. All Rights Reserved.