Package com.isomorphic.datasource

# Class RelationFieldInfo

java.lang.Object
com.isomorphic.datasource.RelationFieldInfo

public class RelationFieldInfo extends Object
Holds information about relation field.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RelationFieldInfo(String fieldName, String type, String relatedDSName, String relatedFieldName, boolean objectEncapsulated, boolean multiple)`
  Creates information about relation field.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getFieldName()`
  Returns field name as declared in data source.
  `String`
  `getRelatedDSName()`
  Returns related data source name.
  `String`
  `getRelatedFieldName()`
  Returns field name in related data source.
  `String`
  `getType()`
  Returns field type as declared in data source.
  `boolean`
  `isMultiple()`
  Returns `true` if field holds list of objects or list of primary keys of related objects; `flase` if field holds realted object or primary key of related object.
  `boolean`
  `isObjectEncapsulated()`
  Returns `true` if field encapsulates object or list of objects; `flase` if field holds primary key of related object or list of primary keys of related objects.

- ## Constructor Details

  - ### RelationFieldInfo

    public RelationFieldInfo(String fieldName, String type, String relatedDSName, String relatedFieldName, boolean objectEncapsulated, boolean multiple)
    Creates information about relation field.
    Parameters:
      `fieldName` - `String` Field name.
      `type` - `String` Field type.
      `relatedDSName` - `String` Related data source name.
      `relatedFieldName` - `String` Field name in related data source.
      `objectEncapsulated` - `boolean` Should field encapsulate object or hold primary key reference.
      `multiple` - `boolean` Should field contain list of related objects or refers to single object.

- ## Method Details

  - ### getFieldName

    public String getFieldName()
    Returns field name as declared in data source.
    Returns:
      `String` Field name.

  - ### getType

    public String getType()
    Returns field type as declared in data source.
    Returns:
      `String` Field type.

  - ### getRelatedDSName

    public String getRelatedDSName()
    Returns related data source name.
    Returns:
      `String` Related data source name.

  - ### getRelatedFieldName

    public String getRelatedFieldName()
    Returns field name in related data source.
    Returns:
      `String` Field name in related data source.

  - ### isObjectEncapsulated

    public boolean isObjectEncapsulated()
    Returns `true` if field encapsulates object or list of objects; `flase` if field holds primary key of related object or list of primary keys of related objects.
    Returns:
      `boolean` `true` if field encapsulates object or list of objects; `flase` if field holds primary key of related object or list of primary keys of related objects.

  - ### isMultiple

    public boolean isMultiple()
    Returns `true` if field holds list of objects or list of primary keys of related objects; `flase` if field holds realted object or primary key of related object.
    Returns:
      `boolean` `true` if field holds list of objects or list of primary keys of related objects; `flase` if field holds realted object or primary key of related object.