Results 1 to 4 of 4

Thread: How can I defined the class in ice?

  1. #1
    ren-wei is offline Registered User
    Name: wei ren
    Organization: Hainan Airline
    Project: support external system connect ticketsalesystem
    Join Date
    Jun 2010
    Posts
    21

    How can I defined the class in ice?

    HI,
    if i have two classes (A and B) which are many to many .how can I defined them?
    Class A{
    private long id;
    private Set<B> agentGroups = new HashSet<B>(0)
    }
    Class B{
    private long id;
    private Set<A> agents = new HashSet<A>(0);
    }

  2. #2
    ren-wei is offline Registered User
    Name: wei ren
    Organization: Hainan Airline
    Project: support external system connect ticketsalesystem
    Join Date
    Jun 2010
    Posts
    21
    I use java and ice3.4.1

  3. #3
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    The equivalent Slice definitions would be something like:

    Code:
    module Demo
    {
    
    class A;
    class B;
    
    sequence<A> ASeq;
    sequence<B> BSeq;
    
    class A
    {
       long id;
       BSeq agentGroups;
    };
    
    class B
    {
      long id;
      ASeq agents;
    };
    
    };
    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  4. #4
    ren-wei is offline Registered User
    Name: wei ren
    Organization: Hainan Airline
    Project: support external system connect ticketsalesystem
    Join Date
    Jun 2010
    Posts
    21
    thank you!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP global $ICE variable not always defined
    By panthaloon in forum Help Center
    Replies: 0
    Last Post: 02-22-2010, 02:29 PM
  2. Where is ObjectPrx defined in cpp
    By myrosia in forum Help Center
    Replies: 8
    Last Post: 10-16-2009, 06:21 PM
  3. Replies: 1
    Last Post: 11-29-2007, 07:26 AM
  4. Replies: 1
    Last Post: 07-22-2004, 05:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •