-->
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: Interface as datatype
PostPosted: Mon Oct 06, 2008 3:46 pm 
Beginner
Beginner

Joined: Fri Nov 11, 2005 4:35 pm
Posts: 23
Hibernate version:3.2.4.sp1
Hibernate annotations version: 3.3.0.GA

Hi,

I'm building a unique layer for all our business applications. For performance issue I’m using foreign keys to tables where the corresponding class is not in my unique layer project.

--------------- CODE in my package ---------

@Entity
@Table…..

Public class person{
….

@ManyToOne(optional=false, fetch=FetchType.LAZY)
Private Bankaccount primaryBankAccount;

@ManyToOne(optional=false, fetch=FetchType.LAZY)
Private Bankaccount ensuranceBankAccount;

}


/**
* dummy interface
**/
Public interface Bankaccount{

}


------------- CODE outsite may unqiue layer project ------

@Entity
Public class Fortis implements Bankaccount{

private Person person;

....

}

@Entity
Public class ABNAnro implements Bankaccount{
private Person person;

...

}

Thank in advance,
Pieter


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.