Subversion Repository Public Repository

litesoft

Diff Revisions 49 vs 151 for /trunk/Java/core/Server/src/org/litesoft/orsup/otherattributeaccessors/AttributeAccessorSCDtoOneVariable.java

Diff revisions: vs.
  @@ -7,8 +7,7 @@
7 7 import org.litesoft.orsup.nonpublic.*;
8 8 import org.litesoft.util.*;
9 9
10 - public abstract class AttributeAccessorSCDtoOneVariable<Owner extends PersistentObjectImpl>
11 - extends AbstractAttributeAccessorSCDtoOne<Owner, PersistentObjectImpl> implements ToVariable
10 + public abstract class AttributeAccessorSCDtoOneVariable<Owner extends PersistentObjectImpl> extends AbstractAttributeAccessorSCDtoOne<Owner, PersistentObjectImpl> implements ToVariable
12 11 {
13 12 protected AttributeAccessorSCDtoOneVariable( String pName, String pColumnName, boolean pRequired, Mutability pMutability )
14 13 {
  @@ -26,9 +25,7 @@
26 25 {
27 26 if ( !(pValue instanceof String) )
28 27 {
29 - throw new IllegalArgumentException(
30 - "Direct setting of a Variable To One relationship is Not Supported for type (" +
31 - Utils.classNameOf( pValue ) + ") w/ value: " + pValue );
28 + throw new IllegalArgumentException( "Direct setting of a Variable To One relationship is Not Supported for type (" + Utils.classNameOf( pValue ) + ") w/ value: " + pValue );
32 29 }
33 30 pValue = new PO_VarURLstringHelper( pValue.toString() );
34 31 }
  @@ -36,21 +33,18 @@
36 33 zNewThem = validateVarURL( pPO, zVarURL );
37 34 zBackRefAttributeNameOnNewThem = zVarURL.getPersistedObjectAttributeName();
38 35 }
39 - PersistentObjectImpl.BackDoor.processLazyLoadMutation( pPO, getValueHolder( pPO ), zNewThem,
40 - zBackRefAttributeNameOnNewThem );
36 + PersistentObjectImpl.BackDoor.processLazyLoadMutation( pPO, getValueHolder( pPO ), zNewThem, zBackRefAttributeNameOnNewThem );
41 37 }
42 38
43 39 private PersistentObjectImpl validateVarURL( Owner pPO, PO_VarURLstringHelper pVarURL )
44 40 {
45 - PersistentObjectURL zURL =
46 - pPO.getFinder().createPersistentObjectURLfrom( pVarURL.getPersistentObjectURL() );
41 + PersistentObjectURL zURL = pPO.getFinder().createPersistentObjectURLfrom( pVarURL.getPersistentObjectURL() );
47 42 String problem = "po";
48 43 PersistentObject<?> them = pPO.getTransaction().findOne( zURL );
49 44 if ( them != null )
50 45 {
51 46 problem += ".attribute";
52 - AttributeAccessorSCD scd =
53 - them.getMetaDataForPO().getAccessorSCDoptional( pVarURL.getPersistedObjectAttributeName() );
47 + AttributeAccessorSCD scd = them.getMetaDataForPO().getAccessorSCDoptional( pVarURL.getPersistedObjectAttributeName() );
54 48 if ( scd != null )
55 49 {
56 50 problem += ".scdVarMany";
  @@ -69,8 +63,7 @@
69 63 }
70 64 }
71 65 }
72 - throw new IllegalArgumentException(
73 - "Variable To One relationship has Invalid references (" + problem + "): " + pVarURL );
66 + throw new IllegalArgumentException( "Variable To One relationship has Invalid references (" + problem + "): " + pVarURL );
74 67 }
75 68
76 69 @Override
  @@ -87,9 +80,7 @@
87 80 {
88 81 if ( !(pValue instanceof String) )
89 82 {
90 - throw new IllegalArgumentException(
91 - "Variable To One relationship is stored as a String, Not type (" + Utils.classNameOf( pValue ) +
92 - ") w/ value: " + pValue );
83 + throw new IllegalArgumentException( "Variable To One relationship is stored as a String, Not type (" + Utils.classNameOf( pValue ) + ") w/ value: " + pValue );
93 84 }
94 85 PO_VarURLstringHelper varURLstring = new PO_VarURLstringHelper( pValue.toString() );
95 86 value = varURLstring.toString();