Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.query
Class SQLResultSetMapping

    java.lang.Object
      org.apache.cayenne.query.SQLResultSetMapping

    public class SQLResultSetMapping

extends Object

A metadata object that defines how a DataRow can be converted to result objects. This object provides mapping in a JPA-compliant manner, i.e. the DataRow is mapped either to a single Object or an Object[]. Each object (single result object or an array element object) can be a scalar or a Persistent object.

Since:
  3.0
Author:
  Andrus Adamchik

Field Summary
`protected String` | `name`
`protected List<Object>` | `resultDescriptors`

Constructor Summary
`SQLResultSetMapping()`
`SQLResultSetMapping(String name)`

Method Summary
`void` | `addColumnResult(String column)` Adds a result set column name to the mapping.
`void` | `addEntityResult(EntityResult entityResult)`
`String` | `getColumnResult(int position)`
`int[]` | `getColumnResultPositions()`
`EntityResult` | `getEntityResult(int position)`
`int[]` | `getEntityResultPositions()`
`String` | `getName()`
`List<Object>` | `getResultDescriptors()` Returns a list of result descriptors.
`void` | `setName(String name)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### name

    protected String name

### resultDescriptors

    protected List<Object> resultDescriptors

Constructor Detail

### SQLResultSetMapping

    public SQLResultSetMapping()

### SQLResultSetMapping

    public SQLResultSetMapping(String name)

Method Detail

### getName

    public String getName()

### setName

    public void setName(String name)

### getResultDescriptors

    public List<Object> getResultDescriptors()

  Returns a list of result descriptors. Column descriptors are returned as Strings, entity descriptors - as `EntityResult`.

### getEntityResultPositions

    public int[] getEntityResultPositions()

### getColumnResultPositions

    public int[] getColumnResultPositions()

### getEntityResult

    public EntityResult getEntityResult(int position)

### getColumnResult

    public String getColumnResult(int position)

### addEntityResult

    public void addEntityResult(EntityResult entityResult)

### addColumnResult

    public void addColumnResult(String column)

  Adds a result set column name to the mapping.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 Apache Cayenne. All Rights Reserved.