|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.SIRAPRISE.client.AbstractTupleContainer
public abstract class AbstractTupleContainer
Abstract implementation of the TupleContainer interface
Constructor Summary | |
---|---|
AbstractTupleContainer(Heading heading)
Creates the container, setting the intended heading for the tuples |
Method Summary | ||
---|---|---|
void |
addTuplesWithHeadingCheck(TupleContainer tupleContainer)
Adds all tuples of the given TupleContainer to this one. |
|
void |
addTuplesWithoutHeadingCheck(TupleContainer tupleContainer)
Adds all tuples of the given TupleContainer to this one. |
|
void |
addTupleWithHeadingCheck(Tuple tuple)
Adds a Tuple to the container. |
|
abstract void |
addTupleWithoutHeadingCheck(Tuple tuple)
Adds a Tuple to the container without checking the conformance of the tuple to the declared heading. |
|
Heading |
getHeading()
Gets The heading for tuple container. |
|
abstract java.util.Iterator<Tuple> |
iterator()
Gets an iterator over the tuples in the container |
|
java.lang.String |
printBodyEscapedWithBodyHeaderWithoutTypeNames()
Gets the relation body in text |
|
java.lang.String |
printBodyEscapedWithBodyHeaderWithTypeNames()
Gets the relation body in text |
|
java.lang.String |
printBodyEscapedWithoutBodyHeaderWithoutTypeNames()
Gets the relation body in text EXCLUDING the BODY( ) container |
|
java.lang.String |
printBodyEscapedWithoutBodyHeaderWithTypeNames()
Gets the relation body in text EXCLUDING the BODY( ) container |
|
java.lang.String |
printBodyWithBodyHeaderWithoutTypeNames()
Gets a relation body in text |
|
java.lang.String |
printBodyWithBodyHeaderWithTypeNames()
Gets a relation body in text |
|
java.lang.String |
printBodyWithoutBodyHeaderWithoutTypeNames()
Gets the relation body in text EXCLUDING the BODY( ) container |
|
java.lang.String |
printBodyWithoutBodyHeaderWithTypeNames()
Gets the relation body in text EXCLUDING the BODY( ) container |
|
java.lang.String |
printBodyXMLWithBodyHeader()
Gets the relation body in XML-style text |
|
java.lang.String |
printBodyXMLWithoutBodyHeader()
Gets the relation body in XML-style text EXCLUDING the container |
|
java.lang.String |
printValueEscapedWithoutTypeNames()
Gets this relation value in SIRAPRISE syntactical format (i.e. including the SIRA_PRISE escape token preceding any appearance of the tokens '(', ')' and '\' in scalar attribute values in the relation. |
|
java.lang.String |
printValueEscapedWithTypeNames()
Gets this relation value in SIRAPRISE syntactical format (i.e. including the SIRA_PRISE escape token preceding any appearance of the tokens '(', ')' and '\' in scalar attribute values in the relation. |
|
java.lang.String |
printValueWithoutTypeNames()
Gets this relation value in 'plain text' format (i.e. if a scalar attribute value includes any of the tokens '(', ')' or '\', these will appear 'as is' in the string value and will not be replaced by the appropriate SIRA_PRISE escape sequence. |
|
java.lang.String |
printValueWithTypeNames()
Gets this relation value in 'plain text' format (i.e. if a scalar attribute value includes any of the tokens '(', ')' or '\', these will appear 'as is' in the string value and will not be replaced by the appropriate SIRA_PRISE escape sequence. |
|
java.lang.String |
printValueXML()
Gets this relation value in 'XML text' format. |
|
abstract boolean |
removeTuple(Tuple t)
Removes the given tuple from this container if that tuple appears there |
|
int |
removeTuples(TupleContainer tupleContainer)
Removes all tuples appearing in the given tupleContainer from this tupleContainer if that tuple appears there |
|
abstract int |
size()
Gets The number of tuples that appear in the relation. |
|
|
toObjectArray(java.lang.Class<C> objectClass)
Get an array of objects holding the same information as that which is held in this TupleContainer. |
|
|
toObjectArrayIgnoringMissingSetters(java.lang.Class<C> objectClass)
Get an array of objects holding a (potentially proper) subset of the information held in this TupleContainer. |
|
|
toObjectCollection(java.lang.Class<C> objectClass)
Get a collection of objects holding the same information as that which is held in this TupleContainer. |
|
|
toObjectCollectionIgnoringMissingSetters(java.lang.Class<C> objectClass)
Get a collection of objects holding a (potentially proper) subset of the information held in this TupleContainer. |
|
java.util.Map<java.lang.Class<?>,java.lang.Object>[] |
toObjectsArray(java.lang.Class<?>[] objectClass)
Get an array of Maps of objects holding the same information as that which is held in this TupleContainer. |
|
java.util.Collection<java.util.Map<java.lang.Class<?>,java.lang.Object>> |
toObjectsCollection(java.lang.Class<?>[] objectClass)
Get a collection of Maps of objects holding the same information as that which is held in this TupleContainer. |
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface be.SIRAPRISE.client.TupleContainer |
---|
clear, containsTuple, containsTuples |
Constructor Detail |
---|
public AbstractTupleContainer(Heading heading)
heading
- The heading for tuple container.Method Detail |
---|
public final void addTuplesWithHeadingCheck(TupleContainer tupleContainer)
addTuplesWithHeadingCheck
in interface TupleContainer
tupleContainer
- The TupleContainer whose tuples are all to be added to this onepublic final void addTuplesWithoutHeadingCheck(TupleContainer tupleContainer)
addTuplesWithoutHeadingCheck
in interface TupleContainer
tupleContainer
- The TupleContainer whose tuples are all to be added to this onepublic final void addTupleWithHeadingCheck(Tuple tuple)
addTupleWithHeadingCheck
in interface TupleContainer
tuple
- The tuple to be added to the containerpublic abstract void addTupleWithoutHeadingCheck(Tuple tuple)
addTupleWithoutHeadingCheck
in interface TupleContainer
tuple
- The tuple to be added to the containerpublic final Heading getHeading()
getHeading
in interface TupleContainer
public abstract java.util.Iterator<Tuple> iterator()
iterator
in interface TupleContainer
iterator
in interface java.lang.Iterable<Tuple>
public final java.lang.String printBodyEscapedWithBodyHeaderWithoutTypeNames()
public final java.lang.String printBodyEscapedWithBodyHeaderWithTypeNames()
public final java.lang.String printBodyEscapedWithoutBodyHeaderWithoutTypeNames()
public final java.lang.String printBodyEscapedWithoutBodyHeaderWithTypeNames()
public final java.lang.String printBodyWithBodyHeaderWithoutTypeNames()
public final java.lang.String printBodyWithBodyHeaderWithTypeNames()
public final java.lang.String printBodyWithoutBodyHeaderWithoutTypeNames()
public final java.lang.String printBodyWithoutBodyHeaderWithTypeNames()
public final java.lang.String printBodyXMLWithBodyHeader()
public final java.lang.String printBodyXMLWithoutBodyHeader()
public final java.lang.String printValueEscapedWithoutTypeNames()
TupleContainer
printValueEscapedWithoutTypeNames
in interface TupleContainer
public final java.lang.String printValueEscapedWithTypeNames()
TupleContainer
printValueEscapedWithTypeNames
in interface TupleContainer
public final java.lang.String printValueWithoutTypeNames()
TupleContainer
printValueWithoutTypeNames
in interface TupleContainer
public final java.lang.String printValueWithTypeNames()
TupleContainer
printValueWithTypeNames
in interface TupleContainer
public final java.lang.String printValueXML()
TupleContainer
printValueXML
in interface TupleContainer
public abstract boolean removeTuple(Tuple t)
TupleContainer
removeTuple
in interface TupleContainer
t
- The tuple to be removed from the container
public final int removeTuples(TupleContainer tupleContainer)
TupleContainer
removeTuples
in interface TupleContainer
tupleContainer
- The tupleContainer holding all the tuples to be removed from the container
public abstract int size()
TupleContainer
size
in interface TupleContainer
public final <C> C[] toObjectArray(java.lang.Class<C> objectClass) throws SettersMissingException, ConstructorMissingException, ClassDoesNotImplementDBObjectException
TupleContainer
toObjectArray
in interface TupleContainer
C
- The name of the objectClass, also naming the class/object type of the objects making up the returned arrayobjectClass
- A Class object denoting the class of the objects to be returned. objectClass must denote a public, non-abstract class that has a public no-arg constructor, and that has a unique setter method for each attribute in the heading. The name of this unique method must be the concatenation of the word "set" (all lowercase), followed by the uppercased attribute name (i.e. first character uppercase, all others lowercase), followed by "FromDB". The argument list of this setter method must consist of excatly one java.lang.String argument.
SettersMissingException
- if a needed setter is missing in the class denoted by objectClass
ConstructorMissingException
- if objectClass does not denote a public class, or it denotes an abstract class, or the class does not have a public no-arg constructor
ClassDoesNotImplementDBObjectException
- if objectClass does not implement the required DBObject interfacepublic final <C> C[] toObjectArrayIgnoringMissingSetters(java.lang.Class<C> objectClass) throws ConstructorMissingException, ClassDoesNotImplementDBObjectException
TupleContainer
toObjectArrayIgnoringMissingSetters
in interface TupleContainer
C
- The name of the objectClass, also naming the class/object type of the objects making up the returned arrayobjectClass
- A Class object denoting the class of the objects to be returned. objectClass must denote a public, non-abstract class that has a public no-arg constructor, and that has at most one unique setter method for each attribute in the heading. The name of this unique method must be the concatenation of the word "set" (all lowercase), followed by the uppercased attribute name (i.e. first character uppercase, all others lowercase), followed by "FromDB". The argument list of this setter method must consist of excatly one java.lang.String argument.
ConstructorMissingException
- if objectClass does not denote a public class, or it denotes an abstract class, or the class does not have a public no-arg constructor
ClassDoesNotImplementDBObjectException
- if objectClass does not implement the required DBObject interfacepublic final <C> java.util.Collection<C> toObjectCollection(java.lang.Class<C> objectClass) throws SettersMissingException, ConstructorMissingException, ClassDoesNotImplementDBObjectException
TupleContainer
toObjectCollection
in interface TupleContainer
objectClass
- A Class object denoting the class of the objects to be returned. objectClass must denote a public, non-abstract class that has a public no-arg constructor, and that has a unique setter method for each attribute in the heading. The name of this unique method must be the concatenation of the word "set" (all lowercase), followed by the uppercased attribute name (i.e. first character uppercase, all others lowercase), followed by "FromDB". The argument list of this setter method must consist of excatly one java.lang.String argument.
SettersMissingException
- if a needed setter is missing in the class denoted by objectClass
ConstructorMissingException
- if objectClass does not denote a public class, or it denotes an abstract class, or the class does not have a public no-arg constructor
ClassDoesNotImplementDBObjectException
- if objectClass does not implement the required DBObject interfacepublic final <C> java.util.Collection<C> toObjectCollectionIgnoringMissingSetters(java.lang.Class<C> objectClass) throws ConstructorMissingException, ClassDoesNotImplementDBObjectException
TupleContainer
toObjectCollectionIgnoringMissingSetters
in interface TupleContainer
objectClass
- A Class object denoting the class of the objects to be returned. objectClass must denote a public, non-abstract class that has a public no-arg constructor, and that has at most one unique setter method for each attribute in the heading. The name of this unique method must be the concatenation of the word "set" (all lowercase), followed by the uppercased attribute name (i.e. first character uppercase, all others lowercase), followed by "FromDB". The argument list of this setter method must consist of excatly one java.lang.String argument.
ConstructorMissingException
- if objectClass does not denote a public class, or it denotes an abstract class, or the class does not have a public no-arg constructor
ClassDoesNotImplementDBObjectException
- if objectClass does not implement the required DBObject interfacepublic final java.util.Map<java.lang.Class<?>,java.lang.Object>[] toObjectsArray(java.lang.Class<?>[] objectClass) throws SettersMissingException, ConstructorMissingException, ClassDoesNotImplementDBObjectException
TupleContainer
toObjectsArray
in interface TupleContainer
objectClass
- An array of Class objects denoting the classes of the objects to be returned for each tuple. Each objectClass must denote a public, non-abstract class that has a public no-arg constructor, and that has a unique setter method for some attribute in the heading. The name of this unique method must be the concatenation of the word "set" (all lowercase), followed by the uppercased attribute name (i.e. first character uppercase, all others lowercase), followed by "FromDB". The argument list of this setter method must consist of excatly one java.lang.String argument.
SettersMissingException
- if some attribute in the heading exists for which no corresponding setter could be found in any of the classes denoted by objectClass[]
ConstructorMissingException
- if some objectClass does not denote a public class, or it denotes an abstract class, ordenotes a class that does not have a public no-arg constructor
ClassDoesNotImplementDBObjectException
- if objectClass does not implement the required DBObject interfacepublic final java.util.Collection<java.util.Map<java.lang.Class<?>,java.lang.Object>> toObjectsCollection(java.lang.Class<?>[] objectClass) throws SettersMissingException, ConstructorMissingException, ClassDoesNotImplementDBObjectException
TupleContainer
toObjectsCollection
in interface TupleContainer
objectClass
- An array of Class objects denoting the classes of the objects to be returned for each tuple. Each objectClass must denote a public, non-abstract class that has a public no-arg constructor, and that has a unique setter method for some attribute in the heading. The name of this unique method must be the concatenation of the word "set" (all lowercase), followed by the uppercased attribute name (i.e. first character uppercase, all others lowercase), followed by "FromDB". The argument list of this setter method must consist of excatly one java.lang.String argument.
SettersMissingException
- if some attribute in the heading exists for which no corresponding setter could be found in any of the classes denoted by objectClass[]
ConstructorMissingException
- if some objectClass does not denote a public class, or it denotes an abstract class, ordenotes a class that does not have a public no-arg constructor
ClassDoesNotImplementDBObjectException
- if objectClass does not implement the required DBObject interfacepublic final java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |