facet classafBeanUtils::BeanId

sys::Obj
  afBeanUtils::BeanId : sys::Facet

@Serializable

Place on fields to mark them as being important to the object's identity.

Sample usage:

class User {
  @BeanId Int? id
  @BeanId Str? name
          Str? notUsed 

  override Int hash() {
    BeanIdentity.beanHash(this)
  }
  
  override Bool equals(Obj? obj) {
    BeanIdentity.beanEquals(this, obj)
  }
  
  override Str toStr() {
    BeanIdentity.beanToStr(this)
  }
}

@see BeanIdentity

useInEquals

Source

const Bool useInEquals := true

useInHash

Source

const Bool useInHash := true

useInToStr

Source

const Bool useInToStr := true