ch.agent.crnickl.jdbc
Class ReadMethodsForProperty

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

public class ReadMethodsForProperty
extends JDBCDatabaseMethods

A stateless object with methods providing read access to properties.

Version:
1.0.0
Author:
Jean-Paul Vetterli

Constructor Summary
ReadMethodsForProperty()
           
 
Method Summary
 Collection<ch.agent.crnickl.api.Property<?>> getProperties(ch.agent.crnickl.api.Database database, String pattern)
          Find a collection of properties with names matching a simple pattern.
 ch.agent.crnickl.api.Property<?> getProperty(ch.agent.crnickl.api.Database database, String name)
          Find a property by its name in a database.
 ch.agent.crnickl.api.Property<?> getProperty(ch.agent.crnickl.api.Surrogate surrogate)
          Find a property corresponding to a surrogate.
 
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

ReadMethodsForProperty

public ReadMethodsForProperty()
Method Detail

getProperty

public ch.agent.crnickl.api.Property<?> getProperty(ch.agent.crnickl.api.Database database,
                                                    String name)
                                             throws ch.agent.crnickl.T2DBException
Find a property by its name in a database.

Parameters:
database - a database
name - a string
Returns:
a property or null
Throws:
ch.agent.crnickl.T2DBException

getProperties

public Collection<ch.agent.crnickl.api.Property<?>> getProperties(ch.agent.crnickl.api.Database database,
                                                                  String pattern)
                                                           throws ch.agent.crnickl.T2DBException
Find a collection of properties with names matching a simple pattern.

Parameters:
database - a database
pattern - a simple pattern where "*" stands for zero or more characters
Returns:
a collection of properties, possibly empty, never null
Throws:
ch.agent.crnickl.T2DBException

getProperty

public ch.agent.crnickl.api.Property<?> getProperty(ch.agent.crnickl.api.Surrogate surrogate)
                                             throws ch.agent.crnickl.T2DBException
Find a property corresponding to a surrogate.

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


Copyright © 2012. All Rights Reserved.