org.hibernate.metamodel.relational
Class Tuple

java.lang.Object
  extended by org.hibernate.metamodel.relational.Tuple
All Implemented Interfaces:
Loggable, Value, ValueContainer

public class Tuple
extends Object
implements Value, ValueContainer, Loggable

Models a compound value (a tuple or row-value-constructor is SQL terms). It is both a Value and a ValueContainer simultaneously.

IMPL NOTE : in terms of the tables themselves, SQL has no notion of a tuple/compound-value. We simply model it this way because:


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hibernate.metamodel.relational.Value
Value.JdbcCodes
 
Constructor Summary
Tuple(TableSpecification table, String name)
           
 
Method Summary
 void addValue(SimpleValue value)
           
 String getLoggableValueQualifier()
          Get a qualifier which can be used to qualify values belonging to this container in their logging.
 TableSpecification getTable()
          Retrieve the table that owns this value.
 String toLoggableString()
          Obtain the string representation of this value usable in log statements.
 void validateJdbcTypes(Value.JdbcCodes typeCodes)
          Validate the value against the incoming JDBC type code array, both in terms of number of types and compatibility of types.
 Iterable<SimpleValue> values()
          Obtain an iterator over this containers current set of value definitions.
 int valuesSpan()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tuple

public Tuple(TableSpecification table,
             String name)
Method Detail

getTable

public TableSpecification getTable()
Description copied from interface: Value
Retrieve the table that owns this value.

Specified by:
getTable in interface Value
Returns:
The owning table.

valuesSpan

public int valuesSpan()

values

public Iterable<SimpleValue> values()
Description copied from interface: ValueContainer
Obtain an iterator over this containers current set of value definitions.

Specified by:
values in interface ValueContainer
Returns:
Iterator over value definitions.

addValue

public void addValue(SimpleValue value)

getLoggableValueQualifier

public String getLoggableValueQualifier()
Description copied from interface: ValueContainer
Get a qualifier which can be used to qualify values belonging to this container in their logging.

Specified by:
getLoggableValueQualifier in interface ValueContainer
Returns:
The qualifier

toLoggableString

public String toLoggableString()
Description copied from interface: Value
Obtain the string representation of this value usable in log statements.

Specified by:
toLoggableString in interface Loggable
Specified by:
toLoggableString in interface Value
Returns:
The loggable representation

validateJdbcTypes

public void validateJdbcTypes(Value.JdbcCodes typeCodes)
Description copied from interface: Value
Validate the value against the incoming JDBC type code array, both in terms of number of types and compatibility of types.

Specified by:
validateJdbcTypes in interface Value
Parameters:
typeCodes - The type codes.


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.