-->
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: one-to-one bidirectional association between two classes
PostPosted: Sat Jan 22, 2011 7:17 pm 
Newbie

Joined: Fri Jan 21, 2011 9:29 pm
Posts: 2
How do I define a bidirectional one to one association between an abstract class and a persistent class? Please help.
eg. there is an abstractClassA which has an one to one association with a persistent class.
/******** PersistentClass *********/
public class PersistentClass extends TestObject {
@XmlElement
private AbstractClass abstract1 = null; public PersistentClass() {super();
abstract1 = (AbstractClass) new TextAbstractClass(); } public IAbstractClass getAbstract1 () {return abstract1 ; }
public void setAbstract1(DisguiseRuleProcessing ruleProcessing) { this.ruleProcessing = ruleProcessing;}
=================================================================
/***** AbstractClass ******/

public abstract class AbstractClass implements IAbstractClass {
public static enum AbstractProcessingType {TEXT, NUMERIC, DATE, CUSTOM, OVERLOADED }
private AbstractProcessingType abstractProcessingType;
private PersistentClass persistentClass;
public PersistentClass getPersistentClass() {return persistentClass;} public void setParentDataElement(PersistentClass persistentClass){this.persistentClass = persistentClass;}


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.