Search Results

Search found 3 results on 1 pages for 'chandni'.

Page 1/1 | 1 

  • Hibernate -using Table per subclass - how to link an existing superclass object to a sibclass object

    - by Chandni
    Hi, I have a User hibernate class, Clerk class and Consumer class. All these maps to their own tables in database. The User PK also acts as Clerk's and Consumer's PK. So now my problem is that if a user is initially a Clerk, he has a record in Users table and Clerks table. If that user wants to become a consumer, I want to link that User's record to the new Consumer's record. So even if I pass the userId to the consumer's record, it treats it as a new User to be persisted and gives a duplicate_key exception. How do I tell Hiernate to link the same user object with this new Consumer object. Thanks in advance, -Chandni

    Read the article

  • Java & android: Help linking an item in a listView to its correct view, but not the way i know of.

    - by Capsud
    Hi, i'm developing an android app, and what i have is a String array of restaurants in one class... static final String[] AtoZ = new String[] { "Ananda", "Brambles Cafe", "Brannigans", "Buona Sera", "Cafe Mao", "Cafe Mimo", "Dante", "Eddie Rockets", "Frango's World Cuisine", "Nando's", "Overends Restaurant @ Airfield House", "Pizza Hut", "Roly Saul", "Siam Thai","Smokey Joes","Sohag Tandoori", "TGI Friday","The Rockfield Lounge", "Winters Bar", "Al Boschetto","Baan Thai", "Bella Cuba", "Bellamys","Bianconis","Canal Bank Cafe", "Canalettos Restaurant","Chandni Restaurant", "Chill Out Cafe", "Crowes", "Da Vincenzo", "Druids", "Dylan", "Epic Restaurant", "Jewel in the Crown", "Juniors", "Kanum Thai","Kites", "Koishi","Maia Restaurant", "Mangetu Restaurant", "Millers Pizza Kitchens", "O'Connells Restaurant", "Ocras Restaurant", "Orchid Szechuan Restaurant", "Roly's Bistro", "Ryans Beggars Bush", }; i have created a view for each of these restaurants aswell in my layouts folder. so this array is going to be displayed in a listView in my android app. What i want to know is what is the quickest way of linking the item clicked to its correct view, without having to type out each position in the array and have a serious of if statements which would take a year with this! i dont want to be doing something like this if(position == 1){ setContentView(R.layout.bentleys); as it would take a year doing that for each one... Please help. thanks alot.

    Read the article

1