-->
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: Bound/constained property code compile problem
PostPosted: Thu Dec 16, 2004 9:06 am 
Newbie

Joined: Thu Dec 16, 2004 9:00 am
Posts: 5
Hi All,

I am using hbm2java to generate POJOs from a hibernate mapping. It all looks good except for the lines that fire property events. I get two problems:

The code ...

public void setName(String name) throws PropertyVetoException {
Object oldValue = this.name;
vetos.fireVetoableChange("name",
oldValue,
name);
this.name = name;
changes.firePropertyChange("name",
oldValue,
name);
}

... does not compile as the member "vetos" is not declared. A similar problem occurs for change events where "changes" is not declared.

Additionally, there does not seem to be an import line generated for the classes "PropertyChangeListener" and "PropertyVetoException". So they come up as unresolved.

What am I missing? Does your POJO class need to inherit from a specific base class when using this functionality? Does the import line need adding manually? Both these options are potential solutions, but I'd like to think there is a better solution before I do this ...

Thanks in advance

Ian


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.