# Class DefaultEntityResultSegment

java.lang.Object
org.apache.cayenne.map.DefaultEntityResultSegment

All Implemented Interfaces:
  `EntityResultSegment`

public class DefaultEntityResultSegment extends Object implements EntityResultSegment

Since:
  3.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultEntityResultSegment(ClassDescriptor classDescriptor, Map<String,String> fields, int offset)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ClassDescriptor`
  `getClassDescriptor()`
  `int`
  `getColumnOffset()`
  Returns a zero-based column index of the first column of this segment in the ResultSet.
  `String`
  `getColumnPath(String resultSetLabel)`
  Performs a reverse lookup of the column path for a given ResultSet label.
  `Map<String,String>`
  `getFields()`
  Returns a map of ResultSet labels keyed by column paths.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DefaultEntityResultSegment

    public DefaultEntityResultSegment(ClassDescriptor classDescriptor, Map<String,String> fields, int offset)

- ## Method Details

  - ### getClassDescriptor

    public ClassDescriptor getClassDescriptor()
    Specified by:
      `getClassDescriptor` in interface `EntityResultSegment`

  - ### getFields

    public Map<String,String> getFields()
    Description copied from interface: `EntityResultSegment`
    Returns a map of ResultSet labels keyed by column paths. Note that ordering of fields in the returned map is generally undefined and should not be relied upon when processing query result sets.
    Specified by:
      `getFields` in interface `EntityResultSegment`

  - ### getColumnOffset

    public int getColumnOffset()
    Description copied from interface: `EntityResultSegment`
    Returns a zero-based column index of the first column of this segment in the ResultSet.
    Specified by:
      `getColumnOffset` in interface `EntityResultSegment`

  - ### getColumnPath

    public String getColumnPath(String resultSetLabel)
    Description copied from interface: `EntityResultSegment`
    Performs a reverse lookup of the column path for a given ResultSet label.
    Specified by:
      `getColumnPath` in interface `EntityResultSegment`