hi adithi,
well you have asked lots of question.....i am trying to answer them one by one.

<entity-one entity-name="Example" value-name="example"/>
this tag fetches generic value object for entity Example from database and put it in a 
value-name"example".This tag is used when we make service implementation for 
updating or deleting.we get single generic value object of entity to be deleted or 
updated.

for example look at this :
<simple-method method-name="updatePracticeParty" short-description="update a 
Party">
       <entity-one entity-name="Party" value-name="lookedUpValue"/>
       <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
       <store-value value-name="lookedUpValue"/>
       <log level="info" message="=======Party record updated for 
partyId=====${lookedUpValue.partyId}"/>
   </simple-method>

here single generic value object of Party entity is fetched from database and placed in 
"lookedupvalue".then all non primary key we give from forms are stored in "lookedupvalue".that 
means "lookedupvalue" contains field which we wanted to update and other fields which are updated on.And 
then <store-value> tag store this fields in database.

Thanks And Regards
Divesh Dutta
Hotwax Media Pvt Ltd.




adithi agarwal wrote:
 Hi all,
Iam trying to create a  user(ie store the data of a user). I have questions 
regarding this....please I would be obliged if someone clears my doubts
I have an entity in entitymodel.xml.
That entity has four fields in it.(There is no primary key in it for now....)
In data dir I guess there should be a xml file starting with 
entity-engine-xml--What exactly is the use of this file and what data do we 
write in it and what is seed data(is it the data we see in our dropdown lists?)
Is entitygroup.xml mantatory or optional.
Iam refering the "example" application for this..
What does entity-one tag means ...
<entity-one entity-name="Example" value-name="example"/>
What does:
use-when="example==null" mean?
when example is null it targets to"createExample" in controller.xml
and createExample in controller points to service name=createExample in  
services.xml which is:

<service name="createExample" default-entity-name="Example" engine="entity-auto" 
invoke="create" auth="true">
        <description>Create a Example</description>
        <permission-service service-name="exampleGenericPermission" 
main-action="CREATE"/>
        <auto-attributes include="pk" mode="OUT" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="exampleTypeId" optional="false"/>
        <override name="statusId" optional="false"/>
        <override name="exampleName" optional="false"/>
    </service>

Iam not clear with this service can someone explain this in detail please

Thankyou very much..


Reply via email to