Sometimes we have to set some same(default) values for each new row for this we use literal value option in EntityObject XML file or we can set that value in EO(EntityObject) Impl class.
EOImpl Class has a method named
You can set default values there
For this we have to create Entity Impl class of EntityObject , Open EntityObject and select Java tab and click on edit icon
Check Accessors and Create Method checkbox
Now set values using accessors like this -
or can set in Literal Value of EO xml file
This is how you can set default values in Entity Object
EOImpl Class has a method named
protected void create(AttributeList attributeList) {
super.create(attributeList);
}
You can set default values there
For this we have to create Entity Impl class of EntityObject , Open EntityObject and select Java tab and click on edit icon
Check Accessors and Create Method checkbox
Now set values using accessors like this -
/** * Add attribute defaulting logic in this method. * @param attributeList list of attribute names/values to initialize the row */ protected void create(AttributeList attributeList) { //Setting default values setEmail("example@gmail.com"); setPhoneNumber("99999999"); super.create(attributeList); }
or can set in Literal Value of EO xml file
This is how you can set default values in Entity Object