Package com.plannaplan.entities

# Class Assignment

java.lang.Object
com.plannaplan.entities.Assignment

    @Entity
    public class Assignment
    extends java.lang.Object

Entity of Assignment grouping of state associated about group_id and commision_id

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`Assignment()` |
`Assignment​(Groups group, Commision commision)` | Assignment
`Assignment​(Groups group, Commision commision, boolean isPastAssignment)` | Assignment

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`Commision` | `getCommision()` | Getter of commision
`Groups` | `getGroup()` | getGroup
`java.lang.Long` | `getId()` | Id getter
`static Assignment` | `getNewFromAssignment​(Assignment oldAssignment, Commision newCommision)` |
`boolean` | `isAccepted()` | If it returns trues it mesans u are assigned to group accepted by algorythm
`boolean` | `isPastAssignment()` | isPastAssignment getter
`void` | `setCommision​(Commision commision)` |
`void` | `setPastAssignment​(boolean isPastAssignment)` | setter isPastAssignment

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

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

## Constructor Details

### Assignment

public Assignment​(Groups group, Commision commision, boolean isPastAssignment)
Assignment

Parameters:
  `group` - group we would like to assign
  `commision` - commision that assignment belongs to
  `isPastAssignment` - is assignment past or no

### Assignment

public Assignment​(Groups group, Commision commision)
Assignment

Parameters:
  `group` - group we would like to assign
  `commision` - commision that assignment belongs to

### Assignment

public Assignment()

## Method Details

### getNewFromAssignment

public static Assignment getNewFromAssignment​(Assignment oldAssignment, Commision newCommision)

Parameters:
  `oldAssignment` - old assignment that we want to move to new commision
  `newCommision` - commsion to move assiongment

### isAccepted

public boolean isAccepted()
If it returns trues it mesans u are assigned to group accepted by algorythm

Returns:
  boolean isAccepted

### getCommision

public Commision getCommision()
Getter of commision

Returns:
  Commision Commision of given assignments

### setCommision

public void setCommision​(Commision commision)

Parameters:
  `commision` - commision to set

### getId

public java.lang.Long getId()
Id getter

Returns:
  id id of assignment

### getGroup

public Groups getGroup()
getGroup

Returns:
  group

### isPastAssignment

public boolean isPastAssignment()
isPastAssignment getter

Returns:
  isPastAssignment

### setPastAssignment

public void setPastAssignment​(boolean isPastAssignment)
setter isPastAssignment

Parameters:
  `isPastAssignment` - is assignment past or not