You should be able to define getters and setters on a Scala class just like
you would in Java and it should work just fine. That's one of the was that
you can set up your entities for JPA, too. For example:

@Entity
class Person  {
  private var id : Long = _
  private var name = ""

  @Id
  def getId() = id
  def setId(nid : Long) { id = nid }

  @Basic{ val optional = false }
  def getName() = name
  def setName(nname : String) { name = nname }
}

Derek

On Tue, May 19, 2009 at 3:07 AM, pravin <[email protected]> wrote:

>
> Hi,
> How to use DTO(data transfer object) in lift.
>
> e.g
> In Java ,i have user defined object i.e Employee with
> name ,address,emp Id, salary,department
> attribute.
>
> i want to display employee details on UI. for that i will make query
> for Db for particular employee.
> Will retrieve all attribute and create new employee object above
> details.
>
> So in scala, can we define such employee class(DTO) with getter setter
> method?
>
> is there any other way for this in scala?
>
>
> Thanks in advance
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to