58
58
import org .hibernate .pretty .MessageHelper ;
59
59
import org .hibernate .proxy .HibernateProxy ;
60
60
import org .hibernate .proxy .LazyInitializer ;
61
- import org .hibernate .tuple .ElementWrapper ;
62
61
import org .hibernate .type .CollectionType ;
63
62
64
63
import org .jboss .logging .Logger ;
@@ -515,10 +514,6 @@ public boolean containsProxy(Object entity) {
515
514
516
515
@ Override
517
516
public boolean reassociateIfUninitializedProxy (Object value ) throws MappingException {
518
- if ( value instanceof ElementWrapper ) {
519
- value = ( (ElementWrapper ) value ).getElement ();
520
- }
521
-
522
517
if ( !Hibernate .isInitialized ( value ) ) {
523
518
final HibernateProxy proxy = (HibernateProxy ) value ;
524
519
final LazyInitializer li = proxy .getHibernateLazyInitializer ();
@@ -532,10 +527,6 @@ public boolean reassociateIfUninitializedProxy(Object value) throws MappingExcep
532
527
533
528
@ Override
534
529
public void reassociateProxy (Object value , Serializable id ) throws MappingException {
535
- if ( value instanceof ElementWrapper ) {
536
- value = ( (ElementWrapper ) value ).getElement ();
537
- }
538
-
539
530
if ( value instanceof HibernateProxy ) {
540
531
LOG .debugf ( "Setting proxy identifier: %s" , id );
541
532
final HibernateProxy proxy = (HibernateProxy ) value ;
@@ -563,10 +554,6 @@ private void reassociateProxy(LazyInitializer li, HibernateProxy proxy) {
563
554
564
555
@ Override
565
556
public Object unproxy (Object maybeProxy ) throws HibernateException {
566
- if ( maybeProxy instanceof ElementWrapper ) {
567
- maybeProxy = ( (ElementWrapper ) maybeProxy ).getElement ();
568
- }
569
-
570
557
if ( maybeProxy instanceof HibernateProxy ) {
571
558
final HibernateProxy proxy = (HibernateProxy ) maybeProxy ;
572
559
final LazyInitializer li = proxy .getHibernateLazyInitializer ();
@@ -585,10 +572,6 @@ public Object unproxy(Object maybeProxy) throws HibernateException {
585
572
586
573
@ Override
587
574
public Object unproxyAndReassociate (Object maybeProxy ) throws HibernateException {
588
- if ( maybeProxy instanceof ElementWrapper ) {
589
- maybeProxy = ( (ElementWrapper ) maybeProxy ).getElement ();
590
- }
591
-
592
575
if ( maybeProxy instanceof HibernateProxy ) {
593
576
final HibernateProxy proxy = (HibernateProxy ) maybeProxy ;
594
577
final LazyInitializer li = proxy .getHibernateLazyInitializer ();
0 commit comments