Class Contract

java.lang.Object
net.tangly.core.MutableEntityExtendedImp
net.tangly.erp.crm.domain.Contract
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.HasLocation, 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, CrmEntity

public class Contract extends net.tangly.core.MutableEntityExtendedImp implements net.tangly.core.MutableEntityExtended, CrmEntity
A legal contract between two parties, one being the seller, and one being the sellee. The properties of the entity define the identifiers of the contract and the time interval.
  • correspondence address used in mail exchange and invoicing
  • bank account used for invoicing
  • amount (without VAT or expenses) of the whole contract
  • seller of the contract
  • selle of the contract
  • The locale of the contract defines the language used to generate invoice documents.
  • The currency of the contract amount and the one used in the invoices
  • Nested Class Summary

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

    net.tangly.core.HasDateRange.RangeFilter<T extends net.tangly.core.HasDateRange>

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

    net.tangly.core.HasLocation.GeoPosition, net.tangly.core.HasLocation.PlusCode
  • 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
    Contract(long oid)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    Optional<net.tangly.core.Address>
     
    void
    address(net.tangly.core.Address address)
     
     
    void
    amountWithoutVat(BigDecimal amountWithoutVat)
     
    net.tangly.core.BankConnection
     
    void
    bankConnection(net.tangly.core.BankConnection bankConnection)
     
     
    void
    budgetInHours(BigDecimal budgetInHours)
     
     
    void
     
     
    void
    currency(Currency currency)
     
    boolean
     
     
    void
    locale(Locale locale)
     
    of(Contract contract)
     
    void
     
     
    void
     
     
    void
     
     
     
    boolean
     

    Methods inherited from class net.tangly.core.MutableEntityExtendedImp

    add, add, clear, comments, comments, hashCode, 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.erp.crm.domain.CrmEntity

    address, address, email, email, im, im, phoneNr, phoneNr, plusCode, position, site, site

    Methods inherited from interface net.tangly.core.HasComments

    comments, findByAuthor, findByTag, findByTime

    Methods inherited from interface net.tangly.core.HasDateRange

    from, isActive, isActive, range, to

    Methods inherited from interface net.tangly.core.HasId

    id

    Methods inherited from interface net.tangly.core.HasLocation

    hasAddress, hasPlusCode, hasPosition

    Methods inherited from interface net.tangly.core.HasMutableComments

    add, addComments, comments, remove

    Methods inherited from interface net.tangly.core.HasMutableDateRange

    from, range, to

    Methods inherited from interface net.tangly.core.HasMutableId

    id

    Methods inherited from interface net.tangly.core.HasMutableName

    name

    Methods inherited from interface net.tangly.core.HasMutableTags

    add, addTags, clear, rawTags, remove, removeTagNamed, tags, update, update

    Methods inherited from interface net.tangly.core.HasMutableText

    text

    Methods inherited from interface net.tangly.core.HasName

    name

    Methods inherited from interface net.tangly.core.HasOid

    oid

    Methods inherited from interface net.tangly.core.HasTags

    containsTag, containsTag, findBy, findBy, findByNamespace, rawTags, tags, value, value

    Methods inherited from interface net.tangly.core.HasText

    text
  • Constructor Details

    • Contract

      public Contract(long oid)
  • Method Details

    • of

      public static ContractSignedEvent of(Contract contract)
    • address

      public Optional<net.tangly.core.Address> address()
      Specified by:
      address in interface net.tangly.core.HasLocation
    • address

      public void address(net.tangly.core.Address address)
    • bankConnection

      public net.tangly.core.BankConnection bankConnection()
    • bankConnection

      public void bankConnection(net.tangly.core.BankConnection bankConnection)
    • amountWithoutVat

      public BigDecimal amountWithoutVat()
    • totalAmountWithoutVat

      public BigDecimal totalAmountWithoutVat()
    • budgetInHours

      public BigDecimal budgetInHours()
    • budgetInHours

      public void budgetInHours(BigDecimal budgetInHours)
    • amountWithoutVat

      public void amountWithoutVat(BigDecimal amountWithoutVat)
    • seller

      public LegalEntity seller()
    • seller

      public void seller(LegalEntity seller)
    • sellee

      public LegalEntity sellee()
    • sellee

      public void sellee(LegalEntity sellee)
    • locale

      public Locale locale()
    • locale

      public void locale(Locale locale)
    • currency

      public Currency currency()
    • currency

      public void currency(Currency currency)
    • add

      public void add(ContractExtension extension)
    • remove

      public void remove(ContractExtension extension)
    • contractExtensions

      public List<ContractExtension> contractExtensions()
    • contractExtensions

      public void contractExtensions(@NotNull @NotNull Iterable<ContractExtension> extensions)
    • validate

      public boolean validate()
      Specified by:
      validate in interface net.tangly.core.Entity
      Specified by:
      validate in interface net.tangly.core.MutableEntity
    • equals

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

      public String toString()
      Overrides:
      toString in class Object