-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Extending class mapping
PostPosted: Mon Nov 27, 2006 5:22 pm 
Beginner
Beginner

Joined: Sun Oct 22, 2006 12:06 pm
Posts: 39
Hi! I'm trying to figure out how to handle this situation:

I have a customer entity and customer has orders, some orders are open, some orders are late. So can anyone help me to figure out how should I mapp this, If I want to extend the class and use the filter criteria in extending.
Code:
class Customer
{
   String Name
   {
   get...
   set...
   };

   IList<OpenInvoice> openInvoices
   {
   get...
   set...
   }   

   IList<UnpayedInvoice> unpayedInvoices
   {
   get...
   set...
   }   
}

class Invoices
{
      DateTime invoicingDate{
   get...
   set...
      }
}

class OpenInvoice:Invoices
{
   // if invoice date<=due date
   Double openSum{
      get...
      set...
   }
}

class UnpayedInvoice:Invoices
{
   // if invoice date>due date
   Double unpayedSum{
      get...
      set...
   }
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.