Class Assignment

java.lang.Object
net.tangly.core.MutableEntityExtendedImp
net.tangly.erp.products.domain.Assignment
All Implemented Interfaces:
net.tangly.core.Entity, net.tangly.core.EntityExtended, net.tangly.core.HasComments, net.tangly.core.HasDateRange, net.tangly.core.HasId, net.tangly.core.HasMutableComments, net.tangly.core.HasMutableDateRange, net.tangly.core.HasMutableId, net.tangly.core.HasMutableName, net.tangly.core.HasMutableTags, net.tangly.core.HasMutableText, net.tangly.core.HasName, net.tangly.core.HasOid, net.tangly.core.HasTags, net.tangly.core.HasText, net.tangly.core.MutableEntity, net.tangly.core.MutableEntityExtended

public class Assignment extends net.tangly.core.MutableEntityExtendedImp
An assignment defines the connection of an employee to a project for a duration. The start date shall be equal or greater to the start date of a project. The end date is optional, if defined, it shall be smaller or equal to the end date of the project.

The collaborator identifier uniquely identifies the natural entity performing the work associated with the assignment. The assumption is that we have a social security number of each collaborator working on a product under our supervision. The collaborator identifier of the assignment is therefore the social security number of a collaborator.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.tangly.core.HasDateRange

    net.tangly.core.HasDateRange.RangeFilter<T extends net.tangly.core.HasDateRange>
  • Field Summary

    Fields inherited from interface net.tangly.core.HasDateRange

    FROM, TO

    Fields inherited from interface net.tangly.core.HasId

    ID

    Fields inherited from interface net.tangly.core.HasMutableName

    NAME

    Fields inherited from interface net.tangly.core.HasName

    NAME

    Fields inherited from interface net.tangly.core.HasOid

    OID, UNDEFINED_OID

    Fields inherited from interface net.tangly.core.HasTags

    TAGS

    Fields inherited from interface net.tangly.core.HasText

    TEXT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Assignment(long oid)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    closedPeriod(LocalDate closedPeriod)
     
     
    void
    collaboratorId(String collaboratorId)
     
    static BigDecimal
    convert(int durationInMinutes, ChronoUnit unit)
     
    boolean
     
    int
     
     
    void
    product(Product product)
     
     
    boolean
     

    Methods inherited from class net.tangly.core.MutableEntityExtendedImp

    add, add, clear, comments, comments, id, id, init, name, name, oid, range, range, remove, remove, tags, tags, text, text

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.tangly.core.HasComments

    findByAuthor, findByTag, findByTime

    Methods inherited from interface net.tangly.core.HasDateRange

    from, isActive, isActive, to

    Methods inherited from interface net.tangly.core.HasMutableComments

    addComments

    Methods inherited from interface net.tangly.core.HasMutableDateRange

    from, to

    Methods inherited from interface net.tangly.core.HasMutableTags

    addTags, rawTags, removeTagNamed, update, update

    Methods inherited from interface net.tangly.core.HasTags

    containsTag, containsTag, findBy, findBy, findByNamespace, rawTags, value, value
  • Constructor Details

    • Assignment

      public Assignment(long oid)
  • Method Details

    • convert

      public static BigDecimal convert(int durationInMinutes, ChronoUnit unit)
    • product

      public Product product()
    • product

      public void product(Product product)
    • collaboratorId

      public String collaboratorId()
    • collaboratorId

      public void collaboratorId(String collaboratorId)
    • closedPeriod

      public LocalDate closedPeriod()
    • closedPeriod

      public void closedPeriod(LocalDate closedPeriod)
    • validate

      public boolean validate()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class net.tangly.core.MutableEntityExtendedImp
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class net.tangly.core.MutableEntityExtendedImp
    • toString

      public String toString()
      Overrides:
      toString in class Object