litesoft
Diff Revisions
916
vs
917
for /trunk/Java/core/Server/src/org/litesoft/orsup/nonpublic/PersistentObjectImpl.java
|
@@ -9,6 +9,7 @@ |
9 |
9 |
|
import org.litesoft.changemanagement.ServerStateChange.*; |
10 |
10 |
|
import org.litesoft.core.*; |
11 |
11 |
|
import org.litesoft.core.typeutils.*; |
|
12 |
+ |
import org.litesoft.core.typeutils.Objects; |
12 |
13 |
|
import org.litesoft.core.util.*; |
13 |
14 |
|
import org.litesoft.db.*; |
14 |
15 |
|
import org.litesoft.encryption.symmetric.*; |
|
@@ -542,22 +543,19 @@ |
542 |
543 |
|
PersistentObject existing = (pTransaction == getTransaction()) ? this : pTransaction.getPersistentObjectFromIdentityMap( getPersistentObjectURL() ); |
543 |
544 |
|
if ( existing != null ) |
544 |
545 |
|
{ |
545 |
|
- |
//noinspection unchecked |
546 |
|
- |
return (T) existing; |
|
546 |
+ |
return Cast.it( existing ); |
547 |
547 |
|
} |
548 |
548 |
|
// todo: What if !new and in another Transaction & changed ???? |
549 |
549 |
|
MetaDataForPOinternalExtension helper = (MetaDataForPOinternalExtension) getMetaDataForPO(); |
550 |
|
- |
//noinspection unchecked |
551 |
|
- |
T them = (T) helper.createPOfromFinder(); |
|
550 |
+ |
PersistentObjectImpl them = Cast.it( helper.createPOfromFinder() ); |
552 |
551 |
|
for ( AttributeAccessorSCD acd : helper.getPersistingAccessorSCDs() ) |
553 |
552 |
|
{ |
554 |
553 |
|
//noinspection unchecked |
555 |
554 |
|
acd.db_setValueOnPO( them, acd.db_getValueOnPO( this ) ); |
556 |
555 |
|
} |
557 |
|
- |
//noinspection unchecked |
558 |
|
- |
them = (T) them.rehydrationComplete( pTransaction ); |
|
556 |
+ |
them = them.rehydrationComplete( pTransaction ); |
559 |
557 |
|
them.mNew = this.mNew; |
560 |
|
- |
return them; |
|
558 |
+ |
return Cast.it( them ); |
561 |
559 |
|
} |
562 |
560 |
|
|
563 |
561 |
|
/** |
|
@@ -1410,8 +1408,8 @@ |
1410 |
1408 |
|
|
1411 |
1409 |
|
public static <T extends PersistentObjectImpl> T rehydrationComplete( T pPersistentObject, Finder pFinder ) |
1412 |
1410 |
|
{ |
1413 |
|
- |
//noinspection unchecked |
1414 |
|
- |
return (T) pPersistentObject.rehydrationComplete( pFinder ); |
|
1411 |
+ |
PersistentObjectImpl zPOI = pPersistentObject; |
|
1412 |
+ |
return Cast.it( zPOI.rehydrationComplete( pFinder ) ); |
1415 |
1413 |
|
} |
1416 |
1414 |
|
|
1417 |
1415 |
|
public static void processLazyLoadMutation( PersistentObjectImpl pPersistentObject, LazyLoadToOneVariable pValueHolder, // |