Simple Methods

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Simple Methods

Mahima
 <simple-method method-name="createPartyRole" short-description="Create Party Role">
        <entity-one entity-name="PartyRole" value-field="partyRole"/>
        <if-empty field="partyRole">
            <make-value entity-name="PartyRole" value-field="newEntity"/>
            <set-pk-fields map="parameters" value-field="newEntity"/>
            <create-value value-field="newEntity"/>
        </if-empty>
    </simple-method>
   
here what is value-field???
Please give replay fast as soon as possible....
Reply | Threaded
Open this post in threaded view
|

Re: Simple Methods

Robert Gan
Hey Mahima,

maybe it is better, when you directly start to use a known editor like eclipse (http://www.eclipse.org/downloads/). With that, you just can hover over the xml declarations and get an explanation (not only for xml, also for all other languages).

In this case, the entity-one tag makes a lookup in database with the primary key within the entity-name (databas table name) "PartyRole" and puts the results to the value-field "partyRole"
Reply | Threaded
Open this post in threaded view
|

Re: Simple Methods

Robert Gan
In reply to this post by Mahima
and the make-value tag prepares a new data base entry. The resulting generic value is put into the value-field "newEntity". than it is modified like setting the primary key values from service inputs (parameters) and than the create tag inserts the new generiv  value to database
Reply | Threaded
Open this post in threaded view
|

Re: Simple Methods

Mahima
Thanks Robert G... ")
Reply | Threaded
Open this post in threaded view
|

Re: Simple Methods

Trenton Perceval
In reply to this post by Mahima
value-field is some kind of a temporary variable.
In Java code you usually create some object instance, set its propeties and then you save it to the database.
Here is the same, but this object with some values is called value-field.