com.mysema.query
Interface Tuple

All Known Implementing Classes:
JDOTuple

public interface Tuple

Tuple defines an interface for generic query result projection

Author:
tiwe

Method Summary
 boolean equals(Object o)
          All Tuples should override equals and hashCode.
<T> T
get(Expression<T> expr)
          Get a tuple element by expression
<T> T
get(int index, Class<T> type)
          Get a Tuple element by index
 int hashCode()
          All Tuples should override equals and hashCode.
 Object[] toArray()
          Get the content as an Object array
 

Method Detail

get

@Nullable
<T> T get(int index,
                   Class<T> type)
Get a Tuple element by index

Type Parameters:
T -
Parameters:
index -
type -
Returns:

get

@Nullable
<T> T get(Expression<T> expr)
Get a tuple element by expression

Type Parameters:
T -
Parameters:
expr -
Returns:

toArray

Object[] toArray()
Get the content as an Object array

Returns:

equals

boolean equals(Object o)
All Tuples should override equals and hashCode. For compatibility across different Tuple implementations, equality check should use Arrays.equals(Object[], Object[]) with toArray() as parameters.

Overrides:
equals in class Object
See Also:
Object.equals(Object)

hashCode

int hashCode()
All Tuples should override equals and hashCode. For compatibility across different Tuple implementations, hashCode should use Arrays.hashCode(Object[]) with toArray() as parameter.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()


Copyright © 2007-2012 Mysema Ltd. All Rights Reserved.