[ 1797661 ] Extend EntityType Length

- Increase EntityType length to 40.
- Fixed a minor substring bug in ModelClassGenerator.
- Hide the not functional classpath and register extension field from the EntityType window.
This commit is contained in:
Heng Sin Low 2007-10-15 05:05:56 +00:00
parent 92973704be
commit ff3e3c4cf8
37 changed files with 107 additions and 105 deletions

View File

@ -562,7 +562,7 @@ public class ModelClassGenerator
sb.append(columnName).append(".length() > ").append(fieldLength).append(")").append(NL)
.append("\t\t{").append(NL)
.append("\t\t\tlog.warning(\"Length > ").append(fieldLength).append(" - truncated\");").append(NL)
.append("\t\t\t").append(columnName).append(" = ").append(columnName).append(".substring(0, ").append(fieldLength-1).append(");").append(NL)
.append("\t\t\t").append(columnName).append(" = ").append(columnName).append(".substring(0, ").append(fieldLength).append(");").append(NL)
.append("\t\t}").append(NL)
;
}

View File

@ -241,6 +241,7 @@ public class MEntityType extends X_AD_EntityType
}
else // new
{
/*
setEntityType(getEntityType().toUpperCase()); // upper case
if (getEntityType().trim().length() < 4)
{
@ -260,6 +261,7 @@ public class MEntityType extends X_AD_EntityType
+ " - Must be ASCII Letter or Digit");
return false;
}
*/
setAD_EntityType_ID();
} // new
s_entityTypes = null; // reset

View File

@ -425,10 +425,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -160,10 +160,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -147,10 +147,10 @@ public class X_AD_EntityType extends PO implements I_AD_EntityType, I_Persistent
{
if (EntityType == null)
throw new IllegalArgumentException ("EntityType is mandatory.");
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_ValueNoCheck (COLUMNNAME_EntityType, EntityType);
}

View File

@ -325,10 +325,10 @@ public class X_AD_Field extends PO implements I_AD_Field, I_Persistent
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -104,10 +104,10 @@ public class X_AD_FieldGroup extends PO implements I_AD_FieldGroup, I_Persistent
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -180,10 +180,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -143,10 +143,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -232,10 +232,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -166,10 +166,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -389,10 +389,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -107,10 +107,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -127,10 +127,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_ValueNoCheck (COLUMNNAME_EntityType, EntityType);
}

View File

@ -297,10 +297,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -347,10 +347,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -166,10 +166,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -213,10 +213,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -127,10 +127,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -126,10 +126,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -190,10 +190,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -165,10 +165,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -423,10 +423,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -263,10 +263,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -160,10 +160,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -149,10 +149,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -213,10 +213,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -739,10 +739,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -200,10 +200,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -251,10 +251,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -190,10 +190,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -208,10 +208,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -195,10 +195,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -301,10 +301,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -422,10 +422,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -204,10 +204,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}

View File

@ -198,10 +198,10 @@ public static final int ENTITYTYPE_AD_Reference_ID=389;
*/
public void setEntityType (String EntityType)
{
if (EntityType.length() > 4)
if (EntityType.length() > 40)
{
log.warning("Length > 4 - truncated");
EntityType = EntityType.substring(0, 3);
log.warning("Length > 40 - truncated");
EntityType = EntityType.substring(0, 40);
}
set_Value (COLUMNNAME_EntityType, EntityType);
}