• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLyBird Controller Question

 
Alan W Morgan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,

Doing URLyBird 1.1.3 and having some trouble with controller.
My controller has a bookRecord method.
As part of this I update the record with the customer number.
This means that I need to update the last element in the array of Strings that make up the record.
I know this is element 6. In my Data class its referred to as a constant.
I was thinking of simply doing record[Data.OWNER] until I realised that I am dealing with the interface DB and not Data directly.

I could just put constants in controller class but do I really want the controller worrying about this ?

I could also add these constants to my interface but to be honest I want to avoid changing the sacred interface if I can.

Any thoughts ?

Thanks,
Alan.
 
Ta Ri Ki Sun
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Record class, which has Columns, and a Room which is a Record. I refer to that column as Room.OWNER when working with the String[], else it's room.setOwner(owner)
 
Alan W Morgan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ta Ri Ki Sun:
I have a Record class, which has Columns, and a Room which is a Record. I refer to that column as Room.OWNER when working with the String[], else it's room.setOwner(owner)


Ok when you say "I refer to that column" which class is this in ?

Do you have a book method and if so where is it ?
 
Ta Ri Ki Sun
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Alan W Morgan:


Ok when you say "I refer to that column" which class is this in ?

I meant I user the constant called OWNER(short 7 in my case) when working with the String[], so if for some reason I don't have a Room object to work with and I needed to reference any particular column number, ie 0 for the deleted column, I would use the constant found in Room. If I misunderstood you try to explain again cos I'm not sure I follow.

Do you have a book method and if so where is it ?


I have DataFacade interface which has the bookRoom method, implemented by DataFacadeImpl.
I also have a remote interface, and an adapter that really just calls DataFacade's bookRoom except it calls lock and unlock as well
 
Alan W Morgan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I get you now.

I think my design is slightly different so I'm not sure your way makes sense for me.

By the way is there an advantage to not locking when running in local mode.
I was gonna lock regardless of mode for simplicity ?
 
Ta Ri Ki Sun
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Alan W Morgan:
Ok I get you now.

I think my design is slightly different so I'm not sure your way makes sense for me.


By the way is there an advantage to not locking when running in local mode.
I was gonna lock regardless of mode for simplicity ?

The additional overhead, it's of no use in local mode, but then simplicity can score points as well. The choice is yours
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic