CRUD Operations

The CRUD operations refer to Create, Retrieve, Update, and Delete operations. These are the most common operations that are performed on a repository.

The following sample depicts the requests for all four operations for the Phone repository:

  • Add/Create
    • Identified by ID and/or IDExt
    • Exception: Record already added
      <ns:AddPersonRequest>
        <!--Optional:-->
        <ns:UserInfo>
          <ns:UserName>admin</ns:UserName>
          <ns:Password>admin</ns:Password>
          <ns:Enterprise>rbs</ns:Enterprise>
        </ns:UserInfo>
        <!--Optional:-->
        <ns:Context>
          <!--Optional:-->
          <ns:Validation>true</ns:Validation>
          <!--Optional:-->
          <ns:Process>true</ns:Process>
          <!--Optional:-->
          <ns:SystemAttributeReturn>false</ns:SystemAttributeReturn>
          <!--Optional:-->
          <ns:ReturnFileAsAttachment>false</ns:ReturnFileAsAttachment>
          <!--Optional:-->
          <ns:EffectiveDateSearchOption>E</ns:EffectiveDateSearchOption>
          <!--Optional:-->
          <ns:DeleteAllRelationships>false</ns:DeleteAllRelationships>
          <!--Optional:-->
          <ns:DeleteAllRelatedRecords>false</ns:DeleteAllRelatedRecords         </ns:Context>
          <ns:Person>
            <ns:ID>wt3</ns:ID>
            <!--Optional:-->
            <ns:IDEXT>333</ns:IDEXT>
            <!--Optional:-->
            <ns:CONTAINS>asdf</ns:CONTAINS>
            <!--Optional:-->
            <ns:firstName>user</ns:firstName>
            <!--Optional:-->
            <ns:lastName>wthree</ns:lastName>
            <!--Optional:-->
            <ns:DOB>2000-01-01</ns:DOB>
            <!--Optional:-->
            <ns:phoneNumber>7772121111</ns:phoneNumber>
            <!--Optional:-->
            <ns:PersonToAddressList>
              <!--1 or more repetitions:-->
              <ns:PersonToAddress>
                <ns:IsPrimary>true</ns:IsPrimary>
                <ns:Address>
                  <ns:ID>wa3</ns:ID>
                  <!--Optional:-->
                  <ns:IDEXT>333</ns:IDEXT>
                  <!--Optional:-->
                  <ns:CONTAINS>sdsd</ns:CONTAINS>
                  <!--Optional:-->
                  <ns:Name>user, wthree</ns:Name>
                  <!--Optional:-->
                  <ns:streetAddress>222, street address</ns:streetAddress>
                  <!--Optional:-->
                  <ns:city>this city</ns:city>
                  <!--Optional:-->
                  <ns:zipCode>11111</ns:zipCode>
                </ns:Address>
              </ns:PersonToAddress>
            </ns:PersonToAddressList>
          </ns:Person>
        </ns:AddPersonRequest>
  • Modify/Update
    • Identified by ID and/or IDExt
    • Exception: Record not found
      <ns:UpdatePersonRequest>
        <!--Optional:-->
        <ns:UserInfo>
          <ns:UserName>admin</ns:UserName>
          <ns:Password>admin</ns:Password>
          <ns:Enterprise>rbs</ns:Enterprise>
        </ns:UserInfo>
        <!--Optional:-->
        <ns:Context>
          <!--Optional:-->
          <ns:Validation>true</ns:Validation>
          <!--Optional:-->
          <ns:Process>true</ns:Process>
          <!--Optional:-->
          <ns:SystemAttributeReturn>false</ns:SystemAttributeReturn>
          <!--Optional:-->
          <ns:ReturnFileAsAttachment>false</ns:ReturnFileAsAttachment>
          <!--Optional:-->
          <ns:EffectiveDateSearchOption>E</ns:EffectiveDateSearchOption>
          <!--Optional:-->
          <ns:DeleteAllRelationships>false</ns:DeleteAllRelationships>
          <!--Optional:-->
          <ns:DeleteAllRelatedRecords>false</ns:DeleteAllRelatedRecords>
        </ns:Context>
        <ns:Person>
          <ns:ID>wt3</ns:ID>
          <!--Optional:-->
          <ns:IDEXT>333</ns:IDEXT>
          <!--Optional:-->
          <ns:CONTAINS>asdf</ns:CONTAINS>
          <!--Optional:-->
          <ns:firstName>user</ns:firstName>
          <!--Optional:-->
          <ns:lastName>w3th</ns:lastName>
          <!--Optional:-->
          <ns:DOB>1978-01-01</ns:DOB>
          <!--Optional:-->
          <ns:phoneNumber></ns:phoneNumber>
          <!--Optional:-->
          <ns:PersonToAddressList>
            <!--1 or more repetitions:-->
            <ns:PersonToAddress>
              <ns:IsPrimary>true</ns:IsPrimary>
              <ns:Address>
                <ns:ID>aw3</ns:ID>
                <!--Optional:-->
                <ns:IDEXT>333</ns:IDEXT>
                <!--Optional:-->
                <ns:CONTAINS></ns:CONTAINS>
                <!--Optional:-->
                <ns:Name>user, dummy</ns:Name>
                <!--Optional:-->
                <ns:streetAddress>111, dummy street</ns:streetAddress>
                <!--Optional:-->
                <ns:city>this city</ns:city>
                <!--Optional:-->
                <ns:zipCode>11221</ns:zipCode>
              </ns:Address>
            </ns:PersonToAddress>
          </ns:PersonToAddressList>
        </ns:Person>
      </ns:UpdatePersonRequest>
  • Delete
    • Identified by ID and/or IDExt
    • Exception: Record not found
      <ns:DeletePersonRequest>
        <!--Optional:-->
        <ns:UserInfo>
          <ns:UserName>?</ns:UserName>
          <ns:Password>?</ns:Password>
          <ns:Enterprise>?</ns:Enterprise>
        </ns:UserInfo>
        <!--Optional:-->
        <ns:Context>
          <!--Optional:-->
          <ns:Validation>?</ns:Validation>
          <!--Optional:-->
          <ns:Process>?</ns:Process>
          <!--Optional:-->
          <ns:SystemAttributeReturn>?</ns:SystemAttributeReturn>
          <!--Optional:-->
          <ns:ReturnFileAsAttachment>?</ns:ReturnFileAsAttachment>
          <!--Optional:-->
          <ns:EffectiveDateSearchOption>?</ns:EffectiveDateSearchOption>
          <!--Optional:-->
          <ns:DeleteAllRelationships>?</ns:DeleteAllRelationships>
          <!--Optional:-->
          <ns:DeleteAllRelatedRecords>?</ns:DeleteAllRelatedRecords>
        </ns:Context>
        <ns:Person>
          <ns:ID>?</ns:ID>
          <!--Optional:-->
          <ns:IDEXT>?</ns:IDEXT>
          <!--Optional:-->
          <ns:CONTAINS>?</ns:CONTAINS>
          <!--Optional:-->
          <ns:firstName>?</ns:firstName>
          <!--Optional:-->
          <ns:lastName>?</ns:lastName>
          <!--Optional:-->
          <ns:DOB>?</ns:DOB>
          <!--Optional:-->
          <ns:phoneNumber>?</ns:phoneNumber>
          <!--Optional:-->
          <ns:PersonToAddressList>
            <!--1 or more repetitions:-->
            <ns:PersonToAddress>
              <ns:IsPrimary>?</ns:IsPrimary>
              <ns:Address>
                <ns:ID>?</ns:ID>
                <!--Optional:-->
                <ns:IDEXT>?</ns:IDEXT>
                <!--Optional:-->
                <ns:CONTAINS>?</ns:CONTAINS>
                <!--Optional:-->
                <ns:Name>?</ns:Name>
                <!--Optional:-->
                <ns:streetAddress>?</ns:streetAddress>
                <!--Optional:-->
                <ns:city>?</ns:city>
                <!--Optional:-->
                <ns:zipCode>?</ns:zipCode>
              </ns:Address>
            </ns:PersonToAddress>
          </ns:PersonToAddressList>
        </ns:Person>
      </ns:DeletePersonRequest>
  • Find/Retrieve
    • Unique mode: ID and IDExt.
    • Specified > Single record return
      <ns:FindPersonRequest>
        <!--Optional:-->
        <ns:UserInfo>
          <ns:UserName>admin</ns:UserName>
          <ns:Password>admin</ns:Password>
          <ns:Enterprise>rbs</ns:Enterprise>
        </ns:UserInfo>
        <!--Optional:-->
        <ns:Context>
          <!--Optional:-->
          <ns:Validation></ns:Validation>
          <!--Optional:-->
          <ns:Process></ns:Process>
          <!--Optional:-->
          <ns:SystemAttributeReturn></ns:SystemAttributeReturn>
          <!--Optional:-->
          <ns:ReturnFileAsAttachment>false</ns:ReturnFileAsAttachment>
          <!--Optional:-->
          <ns:EffectiveDateSearchOption></ns:EffectiveDateSearchOption>
          <!--Optional:-->
          <ns:DeleteAllRelationships></ns:DeleteAllRelationships>
          <!--Optional:-->
          <ns:DeleteAllRelatedRecords></ns:DeleteAllRelatedRecords>
        </ns:Context>
        <!--1 or more repetitions:-->
        <ns:FindPersonID>
          <ns:ID>wt3</ns:ID>
          <!--Optional:-->
          <ns:IDEXT>333</ns:IDEXT>
        </ns:FindPersonID>
      </ns:FindPersonRequest>