You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2010/02/21 00:04:51 UTC

svn commit: r912248 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java

Author: lektran
Date: Sat Feb 20 23:04:51 2010
New Revision: 912248

URL: http://svn.apache.org/viewvc?rev=912248&view=rev
Log:
Reverting r912247, not all methods removed had been deprecated prior to 9.04

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java?rev=912248&r1=912247&r2=912248&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java Sat Feb 20 23:04:51 2010
@@ -465,6 +465,14 @@
         return this.pks.size();
     }
 
+    /**
+     * @deprecated
+     */
+    @Deprecated
+    public ModelField getPk(int index) {
+        return this.pks.get(index);
+    }
+
     public ModelField getOnlyPk() {
         if (this.pks.size() == 1) {
             return this.pks.get(0);
@@ -477,6 +485,16 @@
         return this.pks.iterator();
     }
 
+    /**
+     * @deprecated Use getPkFieldsUnmodifiable instead.
+     */
+    @Deprecated
+    public List<ModelField> getPksCopy() {
+        List<ModelField> newList = FastList.newInstance();
+        newList.addAll(this.pks);
+        return newList;
+    }
+
     public List<ModelField> getPkFieldsUnmodifiable() {
         return Collections.unmodifiableList(this.pks);
     }
@@ -494,6 +512,14 @@
         return this.nopks.size();
     }
 
+    /**
+     * @deprecated
+     */
+    @Deprecated
+    public ModelField getNopk(int index) {
+        return this.nopks.get(index);
+    }
+
     public Iterator<ModelField> getNopksIterator() {
         return this.nopks.iterator();
     }
@@ -508,10 +534,28 @@
         return this.fields.size();
     }
 
+    /**
+     * @deprecated
+     */
+    @Deprecated
+    public ModelField getField(int index) {
+        return this.fields.get(index);
+    }
+
     public Iterator<ModelField> getFieldsIterator() {
         return this.fields.iterator();
     }
 
+    /**
+     * @deprecated Use getFieldsUnmodifiable instead.
+     */
+    @Deprecated
+    public List<ModelField> getFieldsCopy() {
+        List<ModelField> newList = FastList.newInstance();
+        newList.addAll(this.fields);
+        return newList;
+    }
+
     public List<ModelField> getFieldsUnmodifiable() {
         return Collections.unmodifiableList(this.fields);
     }



Re: svn commit: r912248 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java

Posted by Scott Gray <sc...@hotwaxmedia.com>.
On 20/02/2010, at 4:21 PM, Adam Heath wrote:

> lektran@apache.org wrote:
>> Author: lektran
>> Date: Sat Feb 20 23:04:51 2010
>> New Revision: 912248
>> 
>> URL: http://svn.apache.org/viewvc?rev=912248&view=rev
>> Log:
>> Reverting r912247, not all methods removed had been deprecated prior to 9.04
> 
> When deprecation is added, in addition to adding @Deprecated
> annotation and @deprecated javadoc, the javadoc should mention that it
> was done 'after ${lastMajorRelease}', and say what you should do instead.

I was thinking the same thing, it's a pain having to check back on each one.  I was planning to go through and hit them all in one go after I'm done (which won't be anytime soon)

Regards
Scott

Re: svn commit: r912248 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java

Posted by Adam Heath <do...@brainfood.com>.
lektran@apache.org wrote:
> Author: lektran
> Date: Sat Feb 20 23:04:51 2010
> New Revision: 912248
> 
> URL: http://svn.apache.org/viewvc?rev=912248&view=rev
> Log:
> Reverting r912247, not all methods removed had been deprecated prior to 9.04

When deprecation is added, in addition to adding @Deprecated
annotation and @deprecated javadoc, the javadoc should mention that it
was done 'after ${lastMajorRelease}', and say what you should do instead.