Package com.plannaplan.entities

# Class Exchange

java.lang.Object
com.plannaplan.entities.Exchange

    @Entity
    public class Exchange
    extends java.lang.Object

Entity that keeps user exchange offer.

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`Exchange()` |
`Exchange​(Assignment ownedAssignment, Groups desiredAssignment)` |

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`java.sql.Timestamp` | `getDataExchange()` |
`Groups` | `getDesiredAssignment()` |
`java.lang.Long` | `getId()` |
`Assignment` | `getOwnedAssignment()` |
`java.lang.Long` | `getOwnerId()` |
`void` | `setDesiredAssignment​(Groups desiredAssignment)` |
`void` | `setOwnedAssignment​(Assignment ownedAssignment)` |
`void` | `setOwnerId​(java.lang.Long ownerId)` |

### Methods inherited from class java.lang.Object

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

## Constructor Details

### Exchange

public Exchange()

### Exchange

public Exchange​(Assignment ownedAssignment, Groups desiredAssignment)

Parameters:
  `ownedAssignment` - Assignment which owner would like to trade
  `desiredAssignment` - Groups instance that trader wants

## Method Details

### getOwnerId

public java.lang.Long getOwnerId()

Returns:
  Long ID of exchange trader

### setOwnerId

public void setOwnerId​(java.lang.Long ownerId)

Parameters:
  `ownerId` - ID of exchange trader

### getDataExchange

public java.sql.Timestamp getDataExchange()

### getId

public java.lang.Long getId()

Returns:
  Long ID in database

### getDesiredAssignment

public Groups getDesiredAssignment()

Returns:
  Groups Target group

### setDesiredAssignment

public void setDesiredAssignment​(Groups desiredAssignment)

Parameters:
  `desiredAssignment` - Target group

### getOwnedAssignment

public Assignment getOwnedAssignment()

Returns:
  Assignment Owned assignment

### setOwnedAssignment

public void setOwnedAssignment​(Assignment ownedAssignment)

Parameters:
  `ownedAssignment` - Owned assignment