Package com.orchestranetworks.service.extensions

# Interface Replica

All Known Subinterfaces:
  `ReplicaForList`, `ReplicaTable`

public interface Replica
Represents a replica in a replication unit.

Since:
  5.8.0
See Also:
  - `ReplicationUnit`
  - `ReplicaTable`
  - `ReplicaForList`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getColumnNameInDatabase(SchemaNode aFieldNode)`
  Returns the column name in the database of the specified field.
  `List<String>`
  `getColumnNamesInDatabase(SchemaNode aForeignKeyFieldNode)`
  Returns the columns name in the database of the specified foreign key field.
  `ReplicationUnit`
  `getContainerReplicationUnit()`
  Returns the replication unit that contains this replica.
  `String`
  `getNameInDatabase()`
  Returns the table name in the database of the replica.
  `SchemaNode`
  `getReplicatedNode()`
  Returns the node that is replicated in the database.

- ## Method Details

  - ### getContainerReplicationUnit

    ReplicationUnit getContainerReplicationUnit()
    Returns the replication unit that contains this replica.

  - ### getReplicatedNode

    SchemaNode getReplicatedNode()
    Returns the node that is replicated in the database.

  - ### getNameInDatabase

    String getNameInDatabase()
    Returns the table name in the database of the replica.

  - ### getColumnNameInDatabase

    String getColumnNameInDatabase(SchemaNode aFieldNode)
    Returns the column name in the database of the specified field.

    Returns `null` if the specified node is:

    - computed;
    - not replicated (specifies the property `osd:replication disable = "true"`).
    Throws:
      `IllegalArgumentException` - if the specified node is:
      - `null`;
      - not a table record node;
      - a group;
      - not a descendant of the current replicated node;
      - an aggregated list;
      - a foreign key field (defines `osd:tableRef`).
    See Also:
      - `getReplicatedNode()`
      - `getColumnNamesInDatabase(SchemaNode)`

  - ### getColumnNamesInDatabase

    List<String> getColumnNamesInDatabase(SchemaNode aForeignKeyFieldNode)
    Returns the columns name in the database of the specified foreign key field.

    Returns `null` if the specified node is:

    - computed;
    - not replicated (specifies the property `osd:replication disable = "true"`).
    Throws:
      `IllegalArgumentException` - if the specified node is:
      - `null`;
      - a group;
      - not a table record node;
      - not a descendant of the current replicated node;
      - an aggregated list;
      - not a foreign key field (does not define `osd:tableRef`).
    See Also:
      - `getReplicatedNode()`
      - `getColumnNameInDatabase(SchemaNode)`