|
@@ -8,8 +8,6 @@ |
8 |
8 |
|
import org.litesoft.commonfoundation.base.*; |
9 |
9 |
|
import org.litesoft.commonfoundation.exceptions.*; |
10 |
10 |
|
import org.litesoft.commonfoundation.iterators.*; |
11 |
|
- |
import org.litesoft.commonfoundation.typeutils.Objects; |
12 |
|
- |
import org.litesoft.commonfoundation.typeutils.*; |
13 |
11 |
|
import org.litesoft.core.simpletypes.*; |
14 |
12 |
|
import org.litesoft.core.util.*; |
15 |
13 |
|
import org.litesoft.orsup.base.*; |
|
@@ -36,7 +34,7 @@ |
36 |
34 |
|
@SuppressWarnings({"UnusedDeclaration"}) |
37 |
35 |
|
public PoServerVoDataProvider( VoMetaData<T> pVOMetaData, MetaDataStore pMetaDataStore ) { |
38 |
36 |
|
super( pVOMetaData ); |
39 |
|
- |
String zType = Strings.noEmpty( mVOMetaData.getDerivedFromRegisteredObjectType() ); |
|
37 |
+ |
String zType = ConstrainTo.significantOrNull( mVOMetaData.getDerivedFromRegisteredObjectType() ); |
40 |
38 |
|
if ( zType == null ) { |
41 |
39 |
|
throw new PersistenceException( "ViewObject '" + pVOMetaData.getObjectName() + "' does not indicate Derived From!" ); |
42 |
40 |
|
} |
|
@@ -59,7 +57,7 @@ |
59 |
57 |
|
throw new PersistenceException( "Mismatched column types VO: " + zVoIDtype + " != " + zPoIDtype + " :PO" + this ); |
60 |
58 |
|
} |
61 |
59 |
|
String zRecordVersionAttributeName = mPOMetaData.getRecordVersionAttributeName(); |
62 |
|
- |
if ( Strings.isNotNullOrEmpty( zRecordVersionAttributeName ) ) { |
|
60 |
+ |
if ( Currently.isNotNullOrEmpty( zRecordVersionAttributeName ) ) { |
63 |
61 |
|
mPOrecordVersion = new POrecordVersionImpl( zRecordVersionAttributeName ); |
64 |
62 |
|
} |
65 |
63 |
|
} |
|
@@ -98,7 +96,7 @@ |
98 |
96 |
|
VoAttribute<T> zAttribute = mVOMetaData.getVoAttribute( zAttributeName ); |
99 |
97 |
|
if ( zAttribute.isQueryViewAttribute() || !pOnlyQueryAttributes ) { |
100 |
98 |
|
String zPath = zAttribute.getDerivedFromAttributePath(); |
101 |
|
- |
if ( Strings.isNotNullOrEmpty( zPath ) ) { |
|
99 |
+ |
if ( Currently.isNotNullOrEmpty( zPath ) ) { |
102 |
100 |
|
Object zValueOnPO = getDottedAttributeValue( pPO, zPath ); |
103 |
101 |
|
pVO.setAttributeValue( zAttributeName, zValueOnPO ); |
104 |
102 |
|
} |
|
@@ -111,7 +109,7 @@ |
111 |
109 |
|
for ( String zAttributeName : zAttributeNames ) { |
112 |
110 |
|
VoAttribute<T> zAttribute = mVOMetaData.getVoAttribute( zAttributeName ); |
113 |
111 |
|
String zPath = zAttribute.getDerivedFromAttributePath(); |
114 |
|
- |
if ( Strings.isNotNullOrEmpty( zPath ) ) { |
|
112 |
+ |
if ( Currently.isNotNullOrEmpty( zPath ) ) { |
115 |
113 |
|
Mutability zMutability = zAttribute.getMutability(); |
116 |
114 |
|
if ( Mutability.RW.equals( zMutability ) || (pPO.isNew() && Mutability.AddOnly.equals( zMutability )) ) { |
117 |
115 |
|
setDottedAttributeValue( pPO, zPath, pMember.getAttributeValue( zAttributeName ) ); |
|
@@ -135,7 +133,7 @@ |
135 |
133 |
|
if ( zPO == null ) { |
136 |
134 |
|
throw new ConcurrentPOModificationException( "No Persisted data for '" + pMember + "', it may have been deleted" ); |
137 |
135 |
|
} |
138 |
|
- |
if ( !Objects.areNonArraysEqual( pMember.getRecordVersion(), mPOrecordVersion.get( zPO ) ) ) { |
|
136 |
+ |
if ( !Currently.areEqual( pMember.getRecordVersion(), mPOrecordVersion.get( zPO ) ) ) { |
139 |
137 |
|
throw new ConcurrentPOModificationException( "Persisted data for '" + pMember + "' has been updated, please refresh and try again" ); |
140 |
138 |
|
} |
141 |
139 |
|
return zPO; |