|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TupleContainer
The TupleContainer interface defines all methods that must be implemented by tuple containers of any kind.
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. |
|
void |
addTupleWithoutHeadingCheck(Tuple tuple)
Adds a Tuple to the container without checking the conformance of the tuple to the declared heading. |
|
void |
clear()
Empties the TupleContainer |
|
boolean |
containsTuple(Tuple t)
Checks whether the given tuple appears in this container |
|
boolean |
containsTuples(TupleContainer tupleContainer)
Checks whether all tuples that appear in the given container also appear in this one |
|
Heading |
getHeading()
Gets the Heading of the tuple container |
|
java.util.Iterator<Tuple> |
iterator()
Gets an iterator over the tuples in 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. |
|
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 |
|
int |
size()
Gets The number of tuples that appear in the relation. |
|
|
toObjectArray(java.lang.Class<C> objectClass)
Deprecated. - Use the replacing DBObjectFactory method instead. |
|
|
toObjectArrayIgnoringMissingSetters(java.lang.Class<C> objectClass)
Deprecated. - Use the replacing DBObjectFactory method instead. |
|
|
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. |
Method Detail |
---|
void addTuplesWithHeadingCheck(TupleContainer tupleContainer)
tupleContainer
- The TupleContainer whose tuples are all to be added to this onevoid addTuplesWithoutHeadingCheck(TupleContainer tupleContainer)
tupleContainer
- The TupleContainer whose tuples are all to be added to this onevoid addTupleWithHeadingCheck(Tuple tuple)
tuple
- The tuple to be added to the containervoid addTupleWithoutHeadingCheck(Tuple tuple)
tuple
- The tuple to be added to the containervoid clear()
boolean containsTuple(Tuple t)
t
- The tuple value to be tested for presence in the container
boolean containsTuples(TupleContainer tupleContainer)
tupleContainer
- The tuple container whose tuples must all be contained in this one for the method to return true
Heading getHeading()
java.util.Iterator<Tuple> iterator()
iterator
in interface java.lang.Iterable<Tuple>
java.lang.String printValueEscapedWithoutTypeNames()
java.lang.String printValueEscapedWithTypeNames()
java.lang.String printValueWithoutTypeNames()
java.lang.String printValueWithTypeNames()
java.lang.String printValueXML()
boolean removeTuple(Tuple t)
t
- The tuple to be removed from the container
int removeTuples(TupleContainer tupleContainer)
tupleContainer
- The tupleContainer holding all the tuples to be removed from the container
int size()
<C> C[] toObjectArray(java.lang.Class<C> objectClass) throws ConstructorMissingException, SettersMissingException, ClassDoesNotImplementDBObjectException
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.
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
SettersMissingException
- if a needed setter is missing in the class denoted by objectClass
ClassDoesNotImplementDBObjectException
- if objectClass does not implement the required DBObject interface<C> C[] toObjectArrayIgnoringMissingSetters(java.lang.Class<C> objectClass) throws ConstructorMissingException, ClassDoesNotImplementDBObjectException
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 interface<C> java.util.Collection<C> toObjectCollection(java.lang.Class<C> objectClass) throws ConstructorMissingException, SettersMissingException, ClassDoesNotImplementDBObjectException
C
- 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.
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
SettersMissingException
- if a needed setter is missing in the class denoted by objectClass
ClassDoesNotImplementDBObjectException
- if objectClass does not implement the required DBObject interface<C> java.util.Collection<C> toObjectCollectionIgnoringMissingSetters(java.lang.Class<C> objectClass) throws ConstructorMissingException, ClassDoesNotImplementDBObjectException
C
- 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 interfacejava.util.Map<java.lang.Class<?>,java.lang.Object>[] toObjectsArray(java.lang.Class<?>[] objectClass) throws ConstructorMissingException, SettersMissingException, ClassDoesNotImplementDBObjectException
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.
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
SettersMissingException
- if some attribute in the heading exists for which no corresponding setter could be found in any of the classes denoted by objectClass[]
ClassDoesNotImplementDBObjectException
- if objectClass does not implement the required DBObject interfacejava.util.Collection<java.util.Map<java.lang.Class<?>,java.lang.Object>> toObjectsCollection(java.lang.Class<?>[] objectClass) throws ConstructorMissingException, SettersMissingException, ClassDoesNotImplementDBObjectException
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.
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
SettersMissingException
- if some attribute in the heading exists for which no corresponding setter could be found in any of the classes denoted by objectClass[]
ClassDoesNotImplementDBObjectException
- if objectClass does not implement the required DBObject interface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |