Author: deepak
Date: Thu Aug 3 18:11:45 2017 New Revision: 1804031 URL: http://svn.apache.org/viewvc?rev=1804031&view=rev Log: Improved: Remove unnecessary field types (OFBIZ-9351) Applied patch from jira issue, also removed -ne field refereces from code. Thanks Aditya Sharma for your contribution. Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeadvantage.xml ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeaxion.xml ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypedaffodil.xml ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypederby.xml ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypefirebird.xml ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypehsql.xml ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypemssql.xml ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypemysql.xml ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeoracle.xml ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypepostgres.xml ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypesapdb.xml ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypesybase.xml ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntityChecker.java ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormFieldBuilder.java Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeadvantage.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeadvantage.xml?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeadvantage.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeadvantage.xml Thu Aug 3 18:11:45 2017 @@ -60,8 +60,5 @@ under the License. <field-type-def type="credit-card-date" sql-type="Char(7)" java-type="String"/> <field-type-def type="email" sql-type="Char(320)" java-type="String"/> <field-type-def type="url" sql-type="Char(2000)" java-type="String"/> - <field-type-def type="id-ne" sql-type="Char(20)" java-type="String"/> - <field-type-def type="id-long-ne" sql-type="Char(60)" java-type="String"/> - <field-type-def type="id-vlong-ne" sql-type="Char(255)" java-type="String"/> <field-type-def type="tel-number" sql-type="Char(60)" java-type="String"/> </fieldtypemodel> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeaxion.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeaxion.xml?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeaxion.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeaxion.xml Thu Aug 3 18:11:45 2017 @@ -56,9 +56,6 @@ under the License. <field-type-def type="credit-card-date" sql-type="VARCHAR(7)" java-type="String"/> <field-type-def type="email" sql-type="VARCHAR(320)" java-type="String"/> <field-type-def type="url" sql-type="VARCHAR(2000)" java-type="String"/> - <field-type-def type="id-ne" sql-type="VARCHAR(20)" java-type="String"/> - <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" java-type="String"/> - <field-type-def type="id-vlong-ne" sql-type="VARCHAR(255)" java-type="String"/> <field-type-def type="tel-number" sql-type="VARCHAR(60)" java-type="String"/> </fieldtypemodel> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypedaffodil.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypedaffodil.xml?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypedaffodil.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypedaffodil.xml Thu Aug 3 18:11:45 2017 @@ -56,8 +56,5 @@ under the License. <field-type-def type="credit-card-date" sql-type="VARCHAR2(7)" java-type="String"/> <field-type-def type="email" sql-type="VARCHAR2(320)" java-type="String"/> <field-type-def type="url" sql-type="VARCHAR2(2000)" java-type="String"/> - <field-type-def type="id-ne" sql-type="VARCHAR2(20)" java-type="String"/> - <field-type-def type="id-long-ne" sql-type="VARCHAR2(60)" java-type="String"/> - <field-type-def type="id-vlong-ne" sql-type="VARCHAR2(255)" java-type="String"/> <field-type-def type="tel-number" sql-type="VARCHAR2(60)" java-type="String"/> </fieldtypemodel> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypederby.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypederby.xml?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypederby.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypederby.xml Thu Aug 3 18:11:45 2017 @@ -56,8 +56,5 @@ under the License. <field-type-def type="credit-card-date" sql-type="VARCHAR(7)" java-type="String"/> <field-type-def type="email" sql-type="VARCHAR(320)" java-type="String"/> <field-type-def type="url" sql-type="VARCHAR(2000)" java-type="String"/> - <field-type-def type="id-ne" sql-type="VARCHAR(20)" java-type="String"/> - <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" java-type="String"/> - <field-type-def type="id-vlong-ne" sql-type="VARCHAR(255)" java-type="String"/> <field-type-def type="tel-number" sql-type="VARCHAR(60)" java-type="String"/> </fieldtypemodel> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypefirebird.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypefirebird.xml?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypefirebird.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypefirebird.xml Thu Aug 3 18:11:45 2017 @@ -56,9 +56,6 @@ under the License. <field-type-def type="credit-card-date" sql-type="VARCHAR(7)" java-type="String"/> <field-type-def type="email" sql-type="VARCHAR(320)" java-type="String"/> <field-type-def type="url" sql-type="VARCHAR(2000)" java-type="String"/> - <field-type-def type="id-ne" sql-type="VARCHAR(20)" java-type="String"/> - <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" java-type="String"/> - <field-type-def type="id-vlong-ne" sql-type="VARCHAR(255)" java-type="String"/> <field-type-def type="tel-number" sql-type="VARCHAR(60)" java-type="String"/> </fieldtypemodel> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypehsql.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypehsql.xml?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypehsql.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypehsql.xml Thu Aug 3 18:11:45 2017 @@ -56,8 +56,5 @@ under the License. <field-type-def type="credit-card-date" sql-type="VARCHAR(7)" java-type="String"/> <field-type-def type="email" sql-type="VARCHAR(320)" java-type="String"/> <field-type-def type="url" sql-type="VARCHAR(2000)" java-type="String"/> - <field-type-def type="id-ne" sql-type="VARCHAR(20)" java-type="String"/> - <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" java-type="String"/> - <field-type-def type="id-vlong-ne" sql-type="VARCHAR(255)" java-type="String"/> <field-type-def type="tel-number" sql-type="VARCHAR(60)" java-type="String"/> </fieldtypemodel> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypemssql.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypemssql.xml?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypemssql.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypemssql.xml Thu Aug 3 18:11:45 2017 @@ -56,8 +56,5 @@ under the License. <field-type-def type="credit-card-date" sql-type="VARCHAR(7)" java-type="String"/> <field-type-def type="email" sql-type="VARCHAR(320)" java-type="String"/> <field-type-def type="url" sql-type="VARCHAR(2000)" java-type="String"/> - <field-type-def type="id-ne" sql-type="VARCHAR(20)" java-type="String"/> - <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" java-type="String"/> - <field-type-def type="id-vlong-ne" sql-type="VARCHAR(250)" java-type="String"/> <field-type-def type="tel-number" sql-type="VARCHAR(60)" java-type="String"/> </fieldtypemodel> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypemysql.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypemysql.xml?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypemysql.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypemysql.xml Thu Aug 3 18:11:45 2017 @@ -56,8 +56,5 @@ under the License. <field-type-def type="credit-card-date" sql-type="VARCHAR(7)" java-type="String"/> <field-type-def type="email" sql-type="VARCHAR(320)" java-type="String"/> <field-type-def type="url" sql-type="VARCHAR(2000)" java-type="String"/> - <field-type-def type="id-ne" sql-type="VARCHAR(20)" java-type="String"/> - <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" java-type="String"/> - <field-type-def type="id-vlong-ne" sql-type="VARCHAR(250)" java-type="String"/> <field-type-def type="tel-number" sql-type="VARCHAR(60)" java-type="String"/> </fieldtypemodel> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeoracle.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeoracle.xml?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeoracle.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypeoracle.xml Thu Aug 3 18:11:45 2017 @@ -70,8 +70,5 @@ under the License. <field-type-def type="credit-card-date" sql-type="VARCHAR2(7)" java-type="String"/> <field-type-def type="email" sql-type="VARCHAR2(320)" java-type="String"/> <field-type-def type="url" sql-type="VARCHAR2(2000)" java-type="String"/> - <field-type-def type="id-ne" sql-type="VARCHAR2(20)" java-type="String"/> - <field-type-def type="id-long-ne" sql-type="VARCHAR2(60)" java-type="String"/> - <field-type-def type="id-vlong-ne" sql-type="VARCHAR2(255)" java-type="String"/> <field-type-def type="tel-number" sql-type="VARCHAR2(60)" java-type="String"/> </fieldtypemodel> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypepostgres.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypepostgres.xml?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypepostgres.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypepostgres.xml Thu Aug 3 18:11:45 2017 @@ -56,8 +56,5 @@ under the License. <field-type-def type="credit-card-date" sql-type="VARCHAR(7)" java-type="String"/> <field-type-def type="email" sql-type="VARCHAR(320)" java-type="String"/> <field-type-def type="url" sql-type="VARCHAR(2000)" java-type="String"/> - <field-type-def type="id-ne" sql-type="VARCHAR(20)" java-type="String"/> - <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" java-type="String"/> - <field-type-def type="id-vlong-ne" sql-type="VARCHAR(255)" java-type="String"/> <field-type-def type="tel-number" sql-type="VARCHAR(60)" java-type="String"/> </fieldtypemodel> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypesapdb.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypesapdb.xml?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypesapdb.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypesapdb.xml Thu Aug 3 18:11:45 2017 @@ -56,9 +56,6 @@ under the License. <field-type-def type="credit-card-date" sql-type="VARCHAR(7) UNICODE" sql-type-alias="VARCHAR() UNICODE" java-type="String"/> <field-type-def type="email" sql-type="VARCHAR(320) UNICODE" sql-type-alias="VARCHAR() UNICODE" java-type="String"/> <field-type-def type="url" sql-type="VARCHAR(2000) UNICODE" sql-type-alias="VARCHAR() UNICODE" java-type="String"/> - <field-type-def type="id-ne" sql-type="VARCHAR(20) UNICODE" sql-type-alias="VARCHAR() UNICODE" java-type="String"/> - <field-type-def type="id-long-ne" sql-type="VARCHAR(60) UNICODE" sql-type-alias="VARCHAR() UNICODE" java-type="String"/> - <field-type-def type="id-vlong-ne" sql-type="VARCHAR(255) UNICODE" sql-type-alias="VARCHAR() UNICODE" java-type="String"/> <field-type-def type="tel-number" sql-type="VARCHAR(60) UNICODE" sql-type-alias="VARCHAR() UNICODE" java-type="String"/> </fieldtypemodel> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypesybase.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypesybase.xml?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypesybase.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/fieldtype/fieldtypesybase.xml Thu Aug 3 18:11:45 2017 @@ -56,8 +56,5 @@ under the License. <field-type-def type="credit-card-date" sql-type="VARCHAR(7)" java-type="String"/> <field-type-def type="email" sql-type="VARCHAR(320)" java-type="String"/> <field-type-def type="url" sql-type="VARCHAR(2000)" java-type="String"/> - <field-type-def type="id-ne" sql-type="VARCHAR(20)" java-type="String"/> - <field-type-def type="id-long-ne" sql-type="VARCHAR(60)" java-type="String"/> - <field-type-def type="id-vlong-ne" sql-type="VARCHAR(255)" java-type="String"/> <field-type-def type="tel-number" sql-type="VARCHAR(60)" java-type="String"/> </fieldtypemodel> Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntityChecker.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntityChecker.java?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntityChecker.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntityChecker.java Thu Aug 3 18:11:45 2017 @@ -270,7 +270,7 @@ public class ModelEntityChecker { // && // !rfield.getType().startsWith(field.getType())) // { - if (!field.getType().equals(rfield.getType()) && !field.getType().equals(rfield.getType() + "-ne") && !rfield.getType().equals(field.getType() + "-ne")) { + if (!field.getType().equals(rfield.getType())) { warningList.add("[RelationFieldTypesDifferent] The field type ("+ field.getType() + ") of " + field.getName() + " of entity " + entity.getEntityName() + " is not the same as field type (" + rfield.getType() + ") of " Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormFieldBuilder.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormFieldBuilder.java?rev=1804031&r1=1804030&r2=1804031&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormFieldBuilder.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormFieldBuilder.java Thu Aug 3 18:11:45 2017 @@ -506,15 +506,15 @@ public class ModelFormFieldBuilder { this.entityName = modelEntity.getEntityName(); this.fieldName = modelField.getName(); if ("find".equals(defaultFieldType)) { - if ("id".equals(modelField.getType()) || "id-ne".equals(modelField.getType())) { + if ("id".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(FieldInfo.SOURCE_AUTO_ENTITY, 20, Integer.valueOf(20), null); this.setFieldInfo(textField); - } else if ("id-long".equals(modelField.getType()) || "id-long-ne".equals(modelField.getType())) { + } else if ("id-long".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(FieldInfo.SOURCE_AUTO_ENTITY, 40, Integer.valueOf(60), null); this.setFieldInfo(textField); - } else if ("id-vlong".equals(modelField.getType()) || "id-vlong-ne".equals(modelField.getType())) { + } else if ("id-vlong".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(FieldInfo.SOURCE_AUTO_ENTITY, 60, Integer.valueOf(250), null); this.setFieldInfo(textField); @@ -555,15 +555,15 @@ public class ModelFormFieldBuilder { ModelFormField.HiddenField hiddenField = new ModelFormField.HiddenField(FieldInfo.SOURCE_AUTO_SERVICE, null); this.setFieldInfo(hiddenField); } else { - if ("id".equals(modelField.getType()) || "id-ne".equals(modelField.getType())) { + if ("id".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(FieldInfo.SOURCE_AUTO_ENTITY, 20, Integer.valueOf(20), null); this.setFieldInfo(textField); - } else if ("id-long".equals(modelField.getType()) || "id-long-ne".equals(modelField.getType())) { + } else if ("id-long".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(FieldInfo.SOURCE_AUTO_ENTITY, 40, Integer.valueOf(60), null); this.setFieldInfo(textField); - } else if ("id-vlong".equals(modelField.getType()) || "id-vlong-ne".equals(modelField.getType())) { + } else if ("id-vlong".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(FieldInfo.SOURCE_AUTO_ENTITY, 60, Integer.valueOf(250), null); this.setFieldInfo(textField); |
Free forum by Nabble | Edit this page |