-->
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: Class instance from interface
PostPosted: Thu Apr 15, 2004 5:53 pm 
Newbie

Joined: Fri Apr 02, 2004 4:01 pm
Posts: 2
Hi,

We are using MapProxyfactory and its methods creates Map & new instance class from interface.

Now when we are using Hibernate save method is it possible to use converted class instance from interface. Or is it possible in ways to convert Map to class instance, which is required by hibernate.

I know the generated class file which hibernate use as 3 methods some thing like this.

public String toString() {
return new ToStringBuilder(this)
.append("acctId", getAcctId())
.toString();
}

public boolean equals(Object other) {
if ( !(other instanceof Account) ) return false;
Account castOther = (Account) other;
return new EqualsBuilder()
.append(this.getAcctId(), castOther.getAcctId())
.isEquals();
}

public int hashCode() {
return new HashCodeBuilder()
.append(getAcctId())
.toHashCode();
}


when I convert interface to class instance I won't see these extra methods and I will be getting exception.

Caused by: net.sf.hibernate.MappingException: No persister for: $Proxy34
at net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.java:345)


Could any one have any idea about this.

Thanks
Srinivas


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.