Creating a Media Object Published Value Object

The business service development tools provide a value object wizard that helps you create Media Object value object classes that follow the methodology rules for published value objects. The Media Object Value Object Class Wizard creates objects based on Media Object data structures. When the wizard generates member variables for the published value object class, it uses the metadata of the data dictionary item in the Media Object data structure.

You use the standard JDeveloper wizard to generate the getter and setter methods for the variables because the Media Object Value Object Class Wizard does not generate these methods. To successfully generate and deploy web services, you must use J2EE standards for naming the getter and setter methods.

The Media Object Value Object Class Wizard generates two java classes: one is the actual value object and the other is a value object that by default is named MOItem_Publish.java. The actual value object contains the properties from the Media Object data structure and the reference to the array of default value objects in order to hold multiple media objects.

The default value object, MOItem_Publish.java, contains the Media Object properties such as moname, seqno, and motype, as well as the attachment. Do not change the name of the default value object.

Below is the sample code for the actual value object created for Media Object data structure ABGT using the Media Object Value Object Class Wizard:

public class ABGT extends ValueObject implements Serializable {
    /**
     * Media Object Array <br>
     */
    private MOItem_Publish[] moItems = null;
 
    /**
     * Address Number
     * <p>
     * TODO: Description using Glossary Text from EnterpriseOne if appropriate.
     * </p>
     * EnterpriseOne Key Field: false <br>
     * EnterpriseOne Alias: AN8 <br>
     * EnterpriseOne field length:  8 <br>
     * EnterpriseOne decimal places: 0 <br>
     */
    private Integer mnAddressNumber = null;
 
    /**
     * TODO: Default public constructor for instantiating: ABGT
     */
    public ABGT() {
    }
}
 
Below is the sample code for Default value Object (MOItem_Publish.java) created using the Media Object valueobject Wizard.
 
public class MOItem_Publish extends ValueObject implements Serializable {
    /**
     * Media Object Attachment Type <br>
     */
    private String szMoType = null;
 
    /**
     * Media Object Attachment File Name <br>
     */
    private String szItemName = null;
 
    /**
     * Media Object Sequence Number <br>
     */
    private int moSeqNo = 0;
 
    /**
     * Media Object Data <br>
     */
    private DataHandler szData = null;
 
    /**
     * TODO: Default public constructor for instantiating: MOItem_Publish
     */
    public MOItem_Publish() {
    }
}