Subversion Repository Public Repository

litesoft

Diff Revisions 768 vs 769 for /trunk/Java/core/Anywhere/src/org/litesoft/memobeansupport/AbstractMemoBean.java

Diff revisions: vs.
  @@ -1,6 +1,9 @@
1 1 package org.litesoft.memobeansupport;
2 2
3 + import org.litesoft.codec.*;
4 + import org.litesoft.core.annotations.*;
3 5 import org.litesoft.core.simpletypes.nonpublic.*;
6 + import org.litesoft.core.util.*;
4 7
5 8 public abstract class AbstractMemoBean<CT extends AbstractMemoBean> implements Cloneable,
6 9 Memoable<CT>
  @@ -89,4 +92,31 @@
89 92 }
90 93 return hash;
91 94 }
95 +
96 + @Override
97 + public void toMemo( @NotNull StringBuilder pStringBuilder )
98 + {
99 + for ( AbstractAttributeProxy zProxy : mAttributeProxies )
100 + {
101 + if ( zProxy.isLegacyMemoAttribute() )
102 + {
103 + pStringBuilder.append( Codec.NULL_AS_CHAR );
104 + }
105 + else
106 + {
107 + zProxy.toMemo( pStringBuilder );
108 + }
109 + }
110 + }
111 +
112 + @Override
113 + public CT fromMemo( @NotNull CharSource pToMemoValue )
114 + {
115 + CT zClone = clone();
116 + for ( int i = 0; i < mAttributeProxies.length; i++ )
117 + {
118 + mAttributeProxies[i] = getProxy( i ).fromMemo( pToMemoValue );
119 + }
120 + return zClone;
121 + }
92 122 }