|
||||||||
| 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.ReadMethodsForChroniclesAndSeries
public class ReadMethodsForChroniclesAndSeries
A stateless object with methods providing read access to chronicles and series.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ch.agent.crnickl.mongodb.MongoDatabaseMethods |
|---|
MongoDatabaseMethods.Operator |
| Constructor Summary | |
|---|---|
ReadMethodsForChroniclesAndSeries()
|
|
| Method Summary | ||
|---|---|---|
boolean |
getAttributeValue(List<ch.agent.crnickl.api.Chronicle> chronicles,
ch.agent.crnickl.api.Attribute<?> attribute)
The method completes the attribute with the value found for one of the entities in the list and returns true. |
|
ch.agent.crnickl.api.Chronicle |
getChronicle(ch.agent.crnickl.api.Surrogate s)
Find a chronicle corresponding to a surrogate. |
|
ch.agent.crnickl.api.Chronicle |
getChronicleOrNull(ch.agent.crnickl.api.Chronicle parent,
String name)
Find a chronicle with a given parent and name. |
|
|
getChroniclesByAttributeValue(ch.agent.crnickl.api.Property<T> property,
T value,
int maxSize)
Return a list of chronicles with a given value for a given property. |
|
Collection<ch.agent.crnickl.api.Chronicle> |
getChroniclesByParent(ch.agent.crnickl.api.Chronicle parent)
|
|
|
getSeries(ch.agent.crnickl.api.Chronicle chronicle,
String[] names,
int[] numbers)
Return array of series in the positions corresponding to the requested numbers. |
|
|
getSeries(ch.agent.crnickl.api.Surrogate s)
Find a series corresponding to a surrogate. |
|
| 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 ReadMethodsForChroniclesAndSeries()
| Method Detail |
|---|
public ch.agent.crnickl.api.Chronicle getChronicle(ch.agent.crnickl.api.Surrogate s)
throws ch.agent.crnickl.T2DBException
s - a surrogate
ch.agent.crnickl.T2DBException
public ch.agent.crnickl.api.Chronicle getChronicleOrNull(ch.agent.crnickl.api.Chronicle parent,
String name)
throws ch.agent.crnickl.T2DBException
parent - a chroniclename - a string
ch.agent.crnickl.T2DBException
public Collection<ch.agent.crnickl.api.Chronicle> getChroniclesByParent(ch.agent.crnickl.api.Chronicle parent)
throws ch.agent.crnickl.T2DBException
ch.agent.crnickl.T2DBException
public boolean getAttributeValue(List<ch.agent.crnickl.api.Chronicle> chronicles,
ch.agent.crnickl.api.Attribute<?> attribute)
throws ch.agent.crnickl.T2DBException
chronicles - a list of chroniclesattribute - an attribute
ch.agent.crnickl.T2DBException
public <T> List<ch.agent.crnickl.api.Chronicle> getChroniclesByAttributeValue(ch.agent.crnickl.api.Property<T> property,
T value,
int maxSize)
throws ch.agent.crnickl.T2DBException
property - a propertyvalue - a valuemaxSize - the maximum size of the result or 0 for no limit
ch.agent.crnickl.T2DBException
public <T> ch.agent.crnickl.api.Series<T> getSeries(ch.agent.crnickl.api.Surrogate s)
throws ch.agent.crnickl.T2DBException
s - a surrogate
ch.agent.crnickl.T2DBException
public <T> ch.agent.crnickl.api.Series<T>[] getSeries(ch.agent.crnickl.api.Chronicle chronicle,
String[] names,
int[] numbers)
throws ch.agent.crnickl.T2DBException
Note. There is no exception if the chronicle does not exist. This behavior makes it easier to implement the wishful transaction protocol (i.e. testing again if it was okay to delete a chronicle after it was deleted).
chronicle - a chroniclenames - an array of simple names to plug into the seriesnumbers - an array of numbers
ch.agent.crnickl.T2DBException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||