title: Primitive properties for a class in init block - Kotlin
body: <p>I'm defining a Kotlin class with a number of primitive properties:</p>
  
  <pre><code>class Contract (contractEntity : ContractEntity) EntityDao&lt;ContractEntity&gt; {
      var id : Long // &lt;- This is a primitive datatype, needs to be initialized
      var concept : String //&lt;- This also needs to be initialized or declared abstract
  
      init{
          mapFromEntity(contractEntity)
      }
  
      override fun mapFromEntity(entity : ContractEntity){
          id = entity.id
          concept = entity.concept
      }
  }
  </code></pre>
  
  <p>Now, I want those properties to be initialized with the function <code>mapFromEntity()</code> but I'm stuck with the init block because those are not initialized. What could be a good way to achieve what I'm trying?</p>