* update model class for ad_column and ad_field

This commit is contained in:
Heng Sin Low 2008-03-08 00:11:33 +00:00
parent 538ddb99d2
commit 9a021a1340
4 changed files with 169 additions and 5 deletions

View File

@ -263,6 +263,19 @@ public interface I_AD_Column
*/
public String getHelp();
/** Column name InfoFactoryClass */
public static final String COLUMNNAME_InfoFactoryClass = "InfoFactoryClass";
/** Set Info Factory Class.
* Fully qualified class name that implements the InfoFactory interface
*/
public void setInfoFactoryClass (String InfoFactoryClass);
/** Get Info Factory Class.
* Fully qualified class name that implements the InfoFactory interface
*/
public String getInfoFactoryClass();
/** Column name IsAlwaysUpdateable */
public static final String COLUMNNAME_IsAlwaysUpdateable = "IsAlwaysUpdateable";

View File

@ -112,6 +112,19 @@ public interface I_AD_Field
*/
public int getAD_Reference_ID();
/** Column name AD_Reference_Value_ID */
public static final String COLUMNNAME_AD_Reference_Value_ID = "AD_Reference_Value_ID";
/** Set Reference Key.
* Required to specify, if data type is Table or List
*/
public void setAD_Reference_Value_ID (int AD_Reference_Value_ID);
/** Get Reference Key.
* Required to specify, if data type is Table or List
*/
public int getAD_Reference_Value_ID();
/** Column name AD_Tab_ID */
public static final String COLUMNNAME_AD_Tab_ID = "AD_Tab_ID";
@ -127,6 +140,21 @@ public interface I_AD_Field
public I_AD_Tab getAD_Tab() throws Exception;
/** Column name AD_Val_Rule_ID */
public static final String COLUMNNAME_AD_Val_Rule_ID = "AD_Val_Rule_ID";
/** Set Dynamic Validation.
* Dynamic Validation Rule
*/
public void setAD_Val_Rule_ID (int AD_Val_Rule_ID);
/** Get Dynamic Validation.
* Dynamic Validation Rule
*/
public int getAD_Val_Rule_ID();
public I_AD_Val_Rule getAD_Val_Rule() throws Exception;
/** Column name DefaultValue */
public static final String COLUMNNAME_DefaultValue = "DefaultValue";
@ -209,6 +237,19 @@ public interface I_AD_Field
*/
public String getHelp();
/** Column name InfoFactoryClass */
public static final String COLUMNNAME_InfoFactoryClass = "InfoFactoryClass";
/** Set Info Factory Class.
* Fully qualified class name that implements the InfoFactory interface
*/
public void setInfoFactoryClass (String InfoFactoryClass);
/** Get Info Factory Class.
* Fully qualified class name that implements the InfoFactory interface
*/
public String getInfoFactoryClass();
/** Column name IsCentrallyMaintained */
public static final String COLUMNNAME_IsCentrallyMaintained = "IsCentrallyMaintained";

View File

@ -176,7 +176,7 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
*/
public void setAD_Process_ID (int AD_Process_ID)
{
if (AD_Process_ID <= 0)
if (AD_Process_ID < 1)
set_Value (COLUMNNAME_AD_Process_ID, null);
else
set_Value (COLUMNNAME_AD_Process_ID, Integer.valueOf(AD_Process_ID));
@ -225,7 +225,7 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
*/
public void setAD_Reference_Value_ID (int AD_Reference_Value_ID)
{
if (AD_Reference_Value_ID <= 0)
if (AD_Reference_Value_ID < 1)
set_Value (COLUMNNAME_AD_Reference_Value_ID, null);
else
set_Value (COLUMNNAME_AD_Reference_Value_ID, Integer.valueOf(AD_Reference_Value_ID));
@ -302,7 +302,7 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
*/
public void setAD_Val_Rule_ID (int AD_Val_Rule_ID)
{
if (AD_Val_Rule_ID <= 0)
if (AD_Val_Rule_ID < 1)
set_Value (COLUMNNAME_AD_Val_Rule_ID, null);
else
set_Value (COLUMNNAME_AD_Val_Rule_ID, Integer.valueOf(AD_Val_Rule_ID));
@ -512,6 +512,29 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
return (String)get_Value(COLUMNNAME_Help);
}
/** Set Info Factory Class.
@param InfoFactoryClass
Fully qualified class name that implements the InfoFactory interface
*/
public void setInfoFactoryClass (String InfoFactoryClass)
{
if (InfoFactoryClass != null && InfoFactoryClass.length() > 255)
{
log.warning("Length > 255 - truncated");
InfoFactoryClass = InfoFactoryClass.substring(0, 255);
}
set_Value (COLUMNNAME_InfoFactoryClass, InfoFactoryClass);
}
/** Get Info Factory Class.
@return Fully qualified class name that implements the InfoFactory interface
*/
public String getInfoFactoryClass ()
{
return (String)get_Value(COLUMNNAME_InfoFactoryClass);
}
/** Set Always Updateable.
@param IsAlwaysUpdateable
The column is always updateable, even if the record is not active or processed

View File

@ -148,7 +148,7 @@ public class X_AD_Field extends PO implements I_AD_Field, I_Persistent
*/
public void setAD_FieldGroup_ID (int AD_FieldGroup_ID)
{
if (AD_FieldGroup_ID <= 0)
if (AD_FieldGroup_ID < 1)
set_Value (COLUMNNAME_AD_FieldGroup_ID, null);
else
set_Value (COLUMNNAME_AD_FieldGroup_ID, Integer.valueOf(AD_FieldGroup_ID));
@ -195,7 +195,7 @@ public class X_AD_Field extends PO implements I_AD_Field, I_Persistent
*/
public void setAD_Reference_ID (int AD_Reference_ID)
{
if (AD_Reference_ID <= 0)
if (AD_Reference_ID < 1)
set_Value (COLUMNNAME_AD_Reference_ID, null);
else
set_Value (COLUMNNAME_AD_Reference_ID, Integer.valueOf(AD_Reference_ID));
@ -212,6 +212,31 @@ public class X_AD_Field extends PO implements I_AD_Field, I_Persistent
return ii.intValue();
}
/** AD_Reference_Value_ID AD_Reference_ID=4 */
public static final int AD_REFERENCE_VALUE_ID_AD_Reference_ID=4;
/** Set Reference Key.
@param AD_Reference_Value_ID
Required to specify, if data type is Table or List
*/
public void setAD_Reference_Value_ID (int AD_Reference_Value_ID)
{
if (AD_Reference_Value_ID < 1)
set_Value (COLUMNNAME_AD_Reference_Value_ID, null);
else
set_Value (COLUMNNAME_AD_Reference_Value_ID, Integer.valueOf(AD_Reference_Value_ID));
}
/** Get Reference Key.
@return Required to specify, if data type is Table or List
*/
public int getAD_Reference_Value_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Reference_Value_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_AD_Tab getAD_Tab() throws Exception
{
Class<?> clazz = MTable.getClass(I_AD_Tab.Table_Name);
@ -250,6 +275,45 @@ public class X_AD_Field extends PO implements I_AD_Field, I_Persistent
return ii.intValue();
}
public I_AD_Val_Rule getAD_Val_Rule() throws Exception
{
Class<?> clazz = MTable.getClass(I_AD_Val_Rule.Table_Name);
I_AD_Val_Rule result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_AD_Val_Rule)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Val_Rule_ID()), get_TrxName()});
} catch (Exception e) {
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
throw e;
}
return result;
}
/** Set Dynamic Validation.
@param AD_Val_Rule_ID
Dynamic Validation Rule
*/
public void setAD_Val_Rule_ID (int AD_Val_Rule_ID)
{
if (AD_Val_Rule_ID < 1)
set_Value (COLUMNNAME_AD_Val_Rule_ID, null);
else
set_Value (COLUMNNAME_AD_Val_Rule_ID, Integer.valueOf(AD_Val_Rule_ID));
}
/** Get Dynamic Validation.
@return Dynamic Validation Rule
*/
public int getAD_Val_Rule_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Val_Rule_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Default Logic.
@param DefaultValue
Default value hierarchy, separated by ;
@ -387,6 +451,29 @@ public class X_AD_Field extends PO implements I_AD_Field, I_Persistent
return (String)get_Value(COLUMNNAME_Help);
}
/** Set Info Factory Class.
@param InfoFactoryClass
Fully qualified class name that implements the InfoFactory interface
*/
public void setInfoFactoryClass (String InfoFactoryClass)
{
if (InfoFactoryClass != null && InfoFactoryClass.length() > 255)
{
log.warning("Length > 255 - truncated");
InfoFactoryClass = InfoFactoryClass.substring(0, 255);
}
set_Value (COLUMNNAME_InfoFactoryClass, InfoFactoryClass);
}
/** Get Info Factory Class.
@return Fully qualified class name that implements the InfoFactory interface
*/
public String getInfoFactoryClass ()
{
return (String)get_Value(COLUMNNAME_InfoFactoryClass);
}
/** Set Centrally maintained.
@param IsCentrallyMaintained
Information maintained in System Element table