|
Modified: ofbiz/site/dtds/simple-methods-v2.xsd URL: http://svn.apache.org/viewvc/ofbiz/site/dtds/simple-methods-v2.xsd?rev=1345654&r1=1345653&r2=1345654&view=diff ============================================================================== --- ofbiz/site/dtds/simple-methods-v2.xsd (original) +++ ofbiz/site/dtds/simple-methods-v2.xsd Sun Jun 3 11:18:16 2012 @@ -128,9 +128,9 @@ under the License. <xs:documentation> The comparison operator. The operator describes the l-value compared to the r-value. <br/><br/> - The "contains" operator returns true if the l-value contains the r-value. + The "contains" operator returns true if the l-value contains the r-value. This operator does not perform type conversions. - The l-value must be a collection type or a String. A null l-value returns false. + The l-value must be a collection type or a String. A null l-value evaluates to false. <br/><br/> Required. Attribute type: constant. </xs:documentation> @@ -155,11 +155,11 @@ under the License. <xs:documentation> The comparison operator. The operator describes the l-value compared to the r-value. <br/><br/> - The "contains" operator returns true if the l-value contains the r-value. - This operator does not perform type conversions - the "type" attribute will be ignored. + The "contains" operator returns true if the l-value contains the r-value. + This operator does not perform type conversions. The l-value must be a collection type or a String. A null l-value evaluates to false. <br/><br/> - The "is-null", "is-not-null", and "is-empty" operators + The "is-null", "is-not-null", and "is-empty" operators do not require an r-value. Any r-values will be ignored. <br/><br/> Required. Attribute type: constant. @@ -206,6 +206,81 @@ under the License. </xs:simpleType> </xs:attribute> + <xs:attributeGroup name="attlist.entityFindOperations"> + <xs:attribute name="entity-name" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + Name of the entity to search in. + <br/><br/> + Required. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="list" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + Name of the list where to put results. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="filter-by-date" default="false"> + <xs:annotation> + <xs:documentation> + Look for from-date and through-date fields in the list of results coming back + and filters by the current date and time if set to true. + Defaults to "false". + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + <xs:enumeration value="by-name" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="distinct" default="false"> + <xs:annotation> + <xs:documentation> + Filter the results making sure that all of them are unique. + Defaults to "false". + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true"/> + <xs:enumeration value="false"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="use-cache" type="xs:string" default="false"> + <xs:annotation> + <xs:documentation> + Specifies whether or not the delegator's cache should be searched before going to the database. + This results in much faster retrieval times, but can return stale data that is not the most current in the database. + Must be "true" or "false", defaults to "false". + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="delegator-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + Overrides the delegator by specifying a delegator name. + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + <!-- ELEMENTS start here --> <xs:element name="field"> <xs:annotation> @@ -587,7 +662,7 @@ under the License. <xs:documentation> Name of the service to call. <br/><br/> - Required. Attribute type: constant, expression. + Required. Attribute type: constant, ${expression}. </xs:documentation> </xs:annotation> </xs:attribute> @@ -906,7 +981,7 @@ under the License. <xs:documentation> Name of the service to call. <br/><br/> - Required. Attribute type: constant, expression. + Required. Attribute type: constant, ${expression}. </xs:documentation> </xs:annotation> </xs:attribute> @@ -1809,336 +1884,320 @@ under the License. <xs:element name="sequenced-id" substitutionGroup="EntityMiscOperations"> <xs:annotation> <xs:documentation> - The sequenced-id tag gets a sequenced ID from the Entity Engine (through the delegator) and puts it in the specified method environment field. - The object will be a java.lang.Long, but can of course be converted to a String. + Generates a unique numeric sequence value. Sequence values are unique per sequence name. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.sequenced-id"/> + <xs:attribute type="xs:string" name="sequence-name" use="required"> + <xs:annotation> + <xs:documentation> + The sequence name. In most cases, this is the name of the entity the sequence value + will be used in, but any name can be used. + <br/><br/> + Required. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute ref="field" /> + <xs:attribute type="xs:string" name="stagger-max"> + <xs:annotation> + <xs:documentation> + Sequence stagger maximum. If set to "1" the sequence value will be incremented by 1, + otherwise the sequence value will be incremented by an amount between 1 and the + stagger maximum. Defaults to "1". + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="get-long-only"> + <xs:annotation> + <xs:documentation> + Preserve the sequence type - a numeric long. If set to "false" the sequence + value will be converted to a string. Defaults to "false". + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="false" /> + <xs:enumeration value="true" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.sequenced-id"> - <xs:attribute type="xs:string" name="sequence-name" use="required"> - <xs:annotation> - <xs:documentation> - The name of the sequence to pass to the delegator. - The same name must always be used for sequenced IDs that will be used for a certain entity field otherwise non-unique keys may result. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="field" use="required"> - <xs:annotation> - <xs:documentation> - The name of the method environment field the sequenced ID will be put in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="get-long-only" default="false"> - <xs:annotation> - <xs:documentation> - Get a numerical long value and put it there, so it does not do that by default. - By default getlong-only is false. If you want it to just get a long number - then you can set that to true. That's in there for supporting lower level functionality, - but that's not the typical pattern used in OFBiz as we do use strings for sequencing. - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute type="xs:string" name="stagger-max"> - <xs:annotation> - <xs:documentation> - By default this is one. But if you want to have sequenced Ids that are staggered, instead - of consecutive, then you can set this to something like twenty. And then it will do a random staggering for - each sequenced id; instead of picking the next value all the time it will pick something between the next value - and twenty away from the next value, if stagger-max is set to twenty. - So that can be used to make the sequenced Ids more difficult to guess. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="make-next-seq-id" substitutionGroup="EntityMiscOperations"> <xs:annotation> <xs:documentation> - sequenced-id is the primary key sequencer. - Make-next-seq-id is the secondary key sequencer. So - this would be something like an orderId for example, - where we're sequencing an orderId automatically. And - this would be something like an orderItemSequenceId, - where we have a sub-sequence that varies for order - item records related back to an orderHeader. So all of - them will have the same orderId. + Generates a sequence string and uses it to update the specified entity value. + The sequence is generated by scanning all similar values in the entity and adding + an increment amount to the highest sequence value found. + <br/><br/> + This element is typically used to generate sequences for the child entity in a + parent-child relationship - like order items or invoice items. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.make-next-seq-id"/> + <xs:attribute type="xs:string" name="value-field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that contains the entity value to update. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="seq-field-name" use="required"> + <xs:annotation> + <xs:documentation> + The entity value field that will receive the sub-sequenced value. + <br/><br/> + Required. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="numeric-padding"> + <xs:annotation> + <xs:documentation> + Left-pad the sequence string with the specified number of zeros. + Defaults to "5". + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="increment-by"> + <xs:annotation> + <xs:documentation> + Sequence increment amount. Defaults to "1". + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.make-next-seq-id"> - <xs:attribute type="xs:string" name="value-field" use="required"> - <xs:annotation> - <xs:documentation> - Specify the name of the entity for a sequenced-id preparing the primarySequencedId. - The name of the entity is typically what we use for the sequenced name, but you can use anything - you want if you want to have different sets of sequences. - - The risk of course of many different sets of sequences - for the same entity is unless you somehow prefix or - suffix the value, you could have a key conflict. So we - just use the entity name for these primary sequences. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="seq-field-name" use="required"> - <xs:annotation> - <xs:documentation> - The field that will have the sub-sequenced value. - We use the seqId suffix on the field names in the OFBiz - data model to denote that that field is a secondary sequenced ID - and should therefore be maintained for this sort of operation. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="numeric-padding" default="5"> - <xs:annotation> - <xs:documentation> - Since these are eventually strings we do numeric-padding so that the sort is consistent, - By default we pad it with five positions. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="increment-by" default="1"> - <xs:annotation> - <xs:documentation> - Default to 1. - If you want to leave some space in the sub-sequence you - can use a greater increment. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="entity-data" substitutionGroup="EntityMiscOperations"> <xs:annotation> <xs:documentation> - Specify the location of an XML file that should be in the same format as any - of the entity engine XML files, or the entity engine transformed - XML files. And what this will do is either load or - assert that file depending on the mode. - - If it finds the record but any of the fields are different, - this is in the assert mode still, it will report any field - that's different in a message on the error list. So that's - basically what you can in essence assert, that a certain - set of data exists in the database. + Load or assert an entity data XML file. The operation can be used in two modes: + "load" or "assert". The "load" mode will load the XML entity data into the database. + The "assert" mode will compare the XML entity data with the database - + any mismatched or missing data will be logged in the error message list. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.entity-data"/> + <xs:attribute type="xs:string" name="location" use="required"> + <xs:annotation> + <xs:documentation> + Specify the location of an XML file to load in database or verify in assert mode. + <br/><br/> + Required. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="mode" default="load"> + <xs:annotation> + <xs:documentation> + Operation mode: "load" or "assert". Defaults to "load". + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="load" /> + <xs:enumeration value="assert" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute type="xs:integer" name="timeout"> + <xs:annotation> + <xs:documentation> + Override the timeout to start a new transaction and load the data with a longer timeout. + Used only when mode="load". + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute ref="error-list-name" /> + <xs:attribute type="xs:string" name="delegator-name"> + <xs:annotation> + <xs:documentation> + Overrides the delegator by specifying a delegator name. + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.entity-data"> - <xs:attribute type="xs:string" name="location" use="required"> - <xs:annotation> - <xs:documentation> - Specify the location of an XML file to load in database or verify in assert mode. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="delegator-name" use="optional"> - <xs:annotation> - <xs:documentation> - Overrides the delegator or default context by specifying a delegator-name. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:integer" name="timeout" default="-1"> - <xs:annotation> - <xs:documentation> - Override the timeout to start a new transaction and load the data with a longer timeout. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="error-list-name" default="error_list"> - <xs:annotation> - <xs:documentation> - The name of the list in the method environment to check for error messages. - Defaults to "error_list". - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="mode" default="load"> - <xs:annotation> - <xs:documentation> - "load" or "assert". Default to "load". - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="load"> - <xs:annotation> - <xs:documentation> - Load the file into the database. - </xs:documentation> - </xs:annotation> - </xs:enumeration> - <xs:enumeration value="assert"> - <xs:annotation> - <xs:documentation> - Go through each row in the file, each record, and it - will look that up by primary key. If it does not find it, it'll - add a message to the error list about not having found it. - </xs:documentation> - </xs:annotation> - </xs:enumeration> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:attributeGroup> <xs:element name="find-by-primary-key" substitutionGroup="EntityFindOperations"> <xs:annotation> <xs:documentation> - The find-by-primary-key tag uses the delegator to find an entity value by its primary key. - The resulting GenericValue object will be placed in the method environment using the specified value-field. + Returns a single entity value that is retrieved from the database by using the primary key. + The primary key used for the search is contained in a map. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.find-by-primary-key"/> - </xs:complexType> - </xs:element> - <xs:attributeGroup name="attlist.find-by-primary-key"> - <xs:attribute type="xs:string" name="entity-name" use="optional"> - <xs:annotation> - <xs:documentation> - The name of the entity to find an instance of. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="map" use="required"> - <xs:annotation> - <xs:documentation> - The name of a map in the method environment that will be used for the entity fields. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="value-field" use="required"> - <xs:annotation> - <xs:documentation> - The name of the method environment field that will contain the GenericValue object. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="use-cache" default="false"> - <xs:annotation> - <xs:documentation> - Specifies whether or not the delegator's cache should be searched before going to the database. - This results in much faster retrieval times, but can return stale data that is not the most current in the database. - Must be "true" or "false", defaults to "false". - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="fields-to-select-list"> - <xs:annotation> - <xs:documentation> - List containing name of fields to select, if empty defaults to all entity fields. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="delegator-name"> - <xs:annotation> - <xs:documentation> - By default this operation is done using the delegator that is part of the simple-method calling context. - This allows you to override the default delegator by naming an alternate delegator. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> + <xs:attribute type="xs:string" name="entity-name"> + <xs:annotation> + <xs:documentation> + The name of the entity to search in. If the primary key map is an entity value, + then the value's entity name can be used instead of this attribute. + <br/><br/> + Optional if the entity name comes from the primary key map. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="value-field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that will contain the entity value. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="map" use="required"> + <xs:annotation> + <xs:documentation> + The name of a map in the method environment that will be used for the entity fields. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="fields-to-select-list"> + <xs:annotation> + <xs:documentation> + List containing name of fields to select, if empty defaults to all entity fields. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="use-cache"> + <xs:annotation> + <xs:documentation> + Specifies whether or not the delegator's cache should be searched before going to the database. + This results in much faster retrieval times, but can return stale data that is not the most current in the database. + Must be "true" or "false", defaults to "false". + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="delegator-name"> + <xs:annotation> + <xs:documentation> + Overrides the delegator by specifying a delegator name. + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> <xs:element name="find-by-and" substitutionGroup="EntityFindOperations"> <xs:annotation> <xs:documentation> - The find-by-and tag uses the delegator to find entity values by anding the fields passed in the map. - The resulting GenericValue objects will be placed in the method environment using the specified list-name. + Does a find-by-and, returns a list of entity values if any are found, otherwise returns an empty list. + Uses a map of name/value pairs that will be combined using a boolean AND. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.find-by-and"/> + <xs:attribute type="xs:string" name="entity-name" use="required"> + <xs:annotation> + <xs:documentation> + The name of the entity to search in. + <br/><br/> + Required. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="list" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that will contain the list of entity values. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="map" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field containing a map that will be used for the search. + The map name/value pairs will be combined using a boolean AND. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="order-by-list"> + <xs:annotation> + <xs:documentation> + The name of the field containing a list that contains field names that you want the find operation to order the results by. + Each entry in the list is a field name. The field name can be preceded by a plus or a minus sign to specify an + ascending or descending sort for that field. The default is ascending sort. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="use-cache"> + <xs:annotation> + <xs:documentation> + Specifies whether or not the delegator's cache should be searched before going to the database. + This results in much faster retrieval times, but can return stale data that is not the most current in the database. + Must be "true" or "false", defaults to "false". + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="use-iterator"> + <xs:annotation> + <xs:documentation> + Specifies whether or not to use the EntityListIterator when doing the query. + This is much more efficient for large data sets because the results are read incrementaly instead of all at once. + Note that when using this the use-cache setting will be ignored. + Also note that an EntityListIterator must be closed when you are finished, but this is done automatically by the iterate operation. + Must be "true" or "false", defaults to "false". + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="false" /> + <xs:enumeration value="true" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute type="xs:string" name="delegator-name"> + <xs:annotation> + <xs:documentation> + By default this operation is done using the delegator that is part of the simple-method calling context. + This allows you to override the default delegator by naming an alternate delegator. + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.find-by-and"> - <xs:attribute type="xs:string" name="entity-name" use="required"> - <xs:annotation> - <xs:documentation> - The name of the entity to find instances of. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="map" use="required"> - <xs:annotation> - <xs:documentation> - The name of a map in the method environment that will be used for the entity fields. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="order-by-list"> - <xs:annotation> - <xs:documentation> - This will be a list sitting in the context that has string entries in it for each field that you want it to order by/ - Each field in the list, or each entry in the list, will just be a string with a field name. - It can be preceded by a plus or a minus to specify an ascending or descending sort for that. - The default is ascending sort, so you just put a minus in front of the field-name if you want it to be descending. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="delegator-name"> - <xs:annotation> - <xs:documentation> - By default this operation is done using the delegator that is part of the simple-method calling context. - This allows you to override the default delegator by naming an alternate delegator. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="use-cache" default="false"> - <xs:annotation> - <xs:documentation> - Specifies whether or not the delegator's cache should be searched before going to the database. - This results in much faster retrieval times, but can return stale data that is not the most current in the database. - Must be "true" or "false", defaults to "false". - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="use-iterator" default="false"> - <xs:annotation> - <xs:documentation> - Specifies whether or not to use the EntityListIterator when doing the query. - This is much more efficient for large data sets because the results are read incrementaly instead of all at once. - Note that when using this the use-cache setting will be ignored. - Also note that an EntityListIterator must be closed when you are finished, but this is done automatically by the iterate operation. - Must be "true" or "false", defaults to "false". - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute type="xs:string" name="list" use="required"> - <xs:annotation> - <xs:documentation> - The name of the method environment field that will contain the list of GenericValue objects. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="entity-one" substitutionGroup="EntityFindOperations"> <xs:annotation> <xs:documentation> - Does a find-by-primarykey, always returns a single generic value object if it's found, otherwise returns null. + Returns a single entity value that is retrieved from the database by using the primary key. + The primary key can be specified in the field-map child elements, or if they are absent, + the primary key will be constructed from matching environment fields. </xs:documentation> </xs:annotation> <xs:complexType> @@ -2158,120 +2217,89 @@ under the License. </xs:annotation> </xs:element> </xs:sequence> - <xs:attributeGroup ref="attlist.entity-one"/> + <xs:attribute name="entity-name" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + Name of the entity to search in. + <br/><br/> + Required. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="value-field" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + Name of the target field to put the entity value in. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="use-cache"> + <xs:annotation> + <xs:documentation> + Specifies whether or not the delegator's cache should be searched before going to the database. + This results in much faster retrieval times, but can return stale data that is not the most current in the database. + Must be "true" or "false", defaults to "false". + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="auto-field-map"> + <xs:annotation> + <xs:documentation> + When "true", the operation looks for all primary key field names in the current context as well as in the parameters map. + Defaults to "true". + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.entity-one"> - <xs:attribute name="entity-name" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation> - Name of the entity to query on. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="value-field" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation> - Name of the variable to put result record in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="use-cache" default="false"> - <xs:annotation> - <xs:documentation> - Specifies whether or not the delegator's cache should be searched before going to the database. - This results in much faster retrieval times, but can return stale data that is not the most current in the database. - Must be "true" or "false", defaults to "false". - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="auto-field-map" default="true"> - <xs:annotation> - <xs:documentation> - Looks for all primary key field names in the current context as well as in the parameters map or not. - Defaults to true. - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:attributeGroup> <xs:element name="entity-and" substitutionGroup="EntityFindOperations"> <xs:annotation> <xs:documentation> - Does a find-by-and, returns a list of GenericValues if any are found, otherwise returns an empty list. + Does a find-by-and, returns a list of entity values if any are found, otherwise returns an empty list. Uses name/value pairs, that will be used for the query and will all be "anded" together. - The result-set-type by default is scroll which is flexible so you can go forward. + The result-set-type by default is scroll which is flexible so you can go + forward. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> - <xs:element maxOccurs="unbounded" ref="field-map"/> + <xs:element maxOccurs="unbounded" ref="field-map" /> <xs:element minOccurs="0" maxOccurs="unbounded" ref="select-field"> - <xs:annotation><xs:documentation>Specify fields to select, otherwise all fields will be selected.</xs:documentation></xs:annotation> + <xs:annotation> + <xs:documentation>Specify fields to select, otherwise all fields will be selected.</xs:documentation> + </xs:annotation> </xs:element> <xs:element minOccurs="0" maxOccurs="unbounded" ref="order-by"> - <xs:annotation><xs:documentation>Defines fields to order list by.</xs:documentation></xs:annotation> + <xs:annotation> + <xs:documentation>Defines fields to order list by.</xs:documentation> + </xs:annotation> </xs:element> <xs:choice minOccurs="0"> - <xs:element ref="limit-range"/> - <xs:element ref="limit-view"/> - <xs:element ref="use-iterator"/> + <xs:element ref="limit-range" /> + <xs:element ref="limit-view" /> + <xs:element ref="use-iterator" /> </xs:choice> </xs:sequence> - <xs:attributeGroup ref="attlist.entity-and"/> + <xs:attributeGroup ref="attlist.entityFindOperations"/> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.entity-and"> - <xs:attribute name="entity-name" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation> - Name of entity to search in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="use-cache" type="xs:string" default="false"> - <xs:annotation> - <xs:documentation> - Specifies whether or not the delegator's cache should be searched before going to the database. - This results in much faster retrieval times, but can return stale data that is not the most current in the database. - Must be "true" or "false", defaults to "false". - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="filter-by-date" default="false"> - <xs:annotation> - <xs:documentation> - Look for from-date and through-date fields in the list of results coming back - and filters by the current date and time if set to true. - Defaults to false. - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - <xs:enumeration value="by-name"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="list" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation> - Name of the list where to put results. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="entity-condition" substitutionGroup="EntityFindOperations"> <xs:annotation> <xs:documentation> - Like entity-and returns a list of Generic values if any are found, otherwise returns an empty list. + Returns a list of entity values based on a condition expression, otherwise returns an empty list. Uses any of condition-expression, condition-list and condition-object. </xs:documentation> </xs:annotation> @@ -2297,72 +2325,9 @@ under the License. <xs:element ref="use-iterator"/> </xs:choice> </xs:sequence> - <xs:attributeGroup ref="attlist.entity-condition"/> + <xs:attributeGroup ref="attlist.entityFindOperations"/> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.entity-condition"> - <xs:attribute name="entity-name" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation> - Name of entity to search in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="use-cache" default="false"> - <xs:annotation> - <xs:documentation> - Specifies whether or not the delegator's cache should be searched before going to the database. - This results in much faster retrieval times, but can return stale data that is not the most current in the database. - Must be "true" or "false", defaults to "false". - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="filter-by-date" default="false"> - <xs:annotation> - <xs:documentation> - Look for from date and through date fields in the list of results coming back - and filters by the current date and time if set to true. - Defaults to false. - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - <xs:enumeration value="by-name"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="distinct" default="false"> - <xs:annotation> - <xs:documentation> - Filter the results making sure that all of them are unique. - Defaults to false. - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="delegator-name" type="xs:string"> - <xs:annotation> - <xs:documentation> - Name of a delegator to use. - By default uses the delegator associated with that instance of the service engine. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="list" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation> - Name of the list where to put results. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="condition-list"> <xs:annotation> <xs:documentation> @@ -2696,416 +2661,428 @@ under the License. <xs:element name="entity-count" substitutionGroup="EntityFindOperations"> <xs:annotation> <xs:documentation> - Returns a long presenting the number of results found matching the specified condition. - The entity-count is very similar to the entity-condition. + Returns a numeric value representing the number of entity values matching the specified condition. + The entity-count element is very similar to the entity-condition element. Specify the entity-name, optionally the delgator-name if you want to override that, - and then the name of the variable to put the count in. + and then the name of the variable to put the count value in. You can do the same condition-expr (condition expression) or condition-list which can have condition-expr and other condition-lists underneath it for a tree of conditions that can be arbitrarily complex. - You can also use the have-in-condition-list, this is the same as on the entity-condition. - What this will do basically is, rather than doing a query and getting the results back, - it will just count the results and put that number in the context in the variable named by the count-name. + You can also use the have-in-condition-list element, this is the same as the entity-condition. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:choice> - <xs:element ref="condition-expr"/> - <xs:element ref="condition-list"/> - <xs:element ref="condition-object"/> + <xs:element ref="condition-expr" /> + <xs:element ref="condition-list" /> + <xs:element ref="condition-object" /> </xs:choice> - <xs:element minOccurs="0" ref="having-condition-list"/> + <xs:element minOccurs="0" ref="having-condition-list" /> </xs:sequence> - <xs:attributeGroup ref="attlist.entity-count"/> + <xs:attribute name="entity-name" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + Name of entity to count in. + <br/><br/> + Required. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="count-field" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + Name of the field (variable) to put result of the count in. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="delegator-name" type="xs:string"> + <xs:annotation> + <xs:documentation> + Name of a delegator to use. + By default uses the delegator associated with that instance of the service engine. + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.entity-count"> - <xs:attribute name="entity-name" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation> - Name of entity to search in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="delegator-name" type="xs:string"> - <xs:annotation> - <xs:documentation> - Name of a delegator to use. - By default uses the delegator associated with that instance of the service engine. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="count-field" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation> - Name of the field (variable) to put result of the count in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="get-related-one" substitutionGroup="EntityFindOperations"> <xs:annotation> <xs:documentation> - If you have a generic value object sitting in the context and you want to get a related entity - following one of the type one relationships in the data model, then you can specify the name of the value - here, the relation-name, the name of the relationship between the two entities, and the to-value where it - should put the result, and you can tell it to use-cache or not, by default it doesn't. + Finds an entity value that is related to an existing entity value. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.get-related-one"/> + <xs:attribute name="value-field" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field containing the entity value. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="relation-name" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + The name of the entity value relation to use. + <br/><br/> + Required. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="to-value-field" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that will contain the related entity value. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="use-cache" type="xs:string" default="false"> + <xs:annotation> + <xs:documentation> + Specifies whether or not the delegator's cache should be searched before going to the database. + This results in much faster retrieval times, but can return stale data that is not the most current in the database. + Must be "true" or "false", defaults to "false". + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.get-related-one"> - <xs:attribute name="value-field" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation> - Name of a generic value sitting in the context from where you want to get a related-one generic value. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="relation-name" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation> - Name of the one-relation to use to relate generic value in value-field to generic value in to-value. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="use-cache" type="xs:string" default="false"> - <xs:annotation> - <xs:documentation> - Specifies whether or not the delegator's cache should be searched before going to the database. - This results in much faster retrieval times, but can return stale data that is not the most current in the database. - Must be "true" or "false", defaults to "false". - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="to-value-field" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation> - Name of a generic value where to put the result. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="get-related" substitutionGroup="EntityFindOperations"> <xs:annotation> <xs:documentation> - Get-related is just like get-related-one, - except that instead of getting a single value back to put in the to-value, - it gets a full list back. - - You start with the the value object, specify the name of the relationship. - You can specify the name of a map that will restrain the query further, - beyond the field mappings and their relationship. - - You can also specify how you want to order it. - - Use-cache true or false, list-name for the output. + Finds entity values that are related to an existing entity value. Returns an empty list + if no related entity values are found. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.get-related"/> + <xs:attribute type="xs:string" name="value-field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field containing the entity value. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="relation-name" use="required"> + <xs:annotation> + <xs:documentation> + The name of the entity value relation to use. + <br/><br/> + Required. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="list" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that will contain the search results list. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="map"> + <xs:annotation> + <xs:documentation> + The name of the field containing a map that will be used for the search. + The map name/value pairs will be combined using a boolean AND. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="order-by-list"> + <xs:annotation> + <xs:documentation> + The name of the field containing a list that contains field names that you want the find operation to order the results by. + Each entry in the list is a field name. The field name can be preceded by a plus or a minus sign to specify an + ascending or descending sort for that field. The default is ascending sort. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="use-cache"> + <xs:annotation> + <xs:documentation> + Specifies whether or not the delegator's cache should be searched before going to the database. + This results in much faster retrieval times, but can return stale data that is not the most current in the database. + Must be "true" or "false", defaults to "false". + <br/><br/> + Optional. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.get-related"> - <xs:attribute type="xs:string" name="value-field" use="required"> - <xs:annotation> - <xs:documentation> - Name of a generic value sitting in the context from where you want to get a related generic value. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="relation-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the relation to use to relate generic value in value-field to generic value in to-value. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="map"> - <xs:annotation> - <xs:documentation> - Name of a map that will restrain the query further, - beyond the field mappings and their relationship. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="order-by-list"> - <xs:annotation> - <xs:documentation> - This will be a list sitting in the context that has string entries in it for each field that you want it to order by/ - Each field in the list, or each entry in the list, will just be a string with a field name. - It can be preceded by a plus or a minus to specify an ascending or descending sort for that. - The default is ascending sort, so you just put a minus in front of the field-name if you want it to be descending. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="use-cache" default="false"> - <xs:annotation> - <xs:documentation> - Specifies whether or not the delegator's cache should be searched before going to the database. - This results in much faster retrieval times, but can return stale data that is not the most current in the database. - Must be "true" or "false", defaults to "false". - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="list" use="required"> - <xs:annotation> - <xs:documentation> - Name of a list where to put the result in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="order-value-list" substitutionGroup="EntityFindOperations"> <xs:annotation> <xs:documentation> - Order-value-list does not actually do anything with the database. - It takes an exiting list that has been returned and sorts it. + Performs an in-memory sort of a list of entity values. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.order-value-list"/> - </xs:complexType> - </xs:element> - <xs:attributeGroup name="attlist.order-value-list"> - <xs:attribute type="xs:string" name="list" use="required"> - <xs:annotation> - <xs:documentation> - Name of the list of generic value objects that we want to sort. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="to-list"> - <xs:annotation> - <xs:documentation> - Name of the output list. If it is empty, as it is optional, it will simply use the list-name. - In other words it will take the ordered list and put it over top of the resource list. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="order-by-list" use="required"> - <xs:annotation> - <xs:documentation> - This will be a list sitting in the context that has string entries in it for each field that you want it to order by. - Each field in the list, or each entry in the list, will just be a string with a field name. - It can be preceded by a plus or a minus to specify an ascending or descending sort for that. - The default is ascending sort, so you just put a minus in front of the field-name if you want it to be descending. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> + <xs:attribute type="xs:string" name="list" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that contains the list of entity values. + If the source list is not found, the target field will be set to null. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="order-by-list" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that contains the list of field names to sort on. + Field names can be preceded by a plus symbol (+) or a minus symbol (-) to specify an ascending or descending sort for that field. + The default is ascending sort. + If the order-by-list is not found the target field will be set to a copy of the source list + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="to-list"> + <xs:annotation> + <xs:documentation> + The name of the field that will contain the sorted list. Defaults to the field specified + in the list attribute. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> <xs:element name="filter-list-by-and" substitutionGroup="EntityFindOperations"> <xs:annotation> <xs:documentation> - The filter-list-by-and tag filters the given list by the fields in the specified map. + Filters a list of entity values by the fields in the specified map. + Each entity value in the list will be compared to the specified map, and + if the entity value's fields match the map, the entity value will be copied + to the target list. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.filter-list-by-and"/> + <xs:attribute type="xs:string" name="list" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that contains the list of entity values. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="map" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that contains the map that will be used for the entity field comparison. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="to-list"> + <xs:annotation> + <xs:documentation> + The name of the field the filtered list will be put into. + Defaults to the value of the list-name attribute (replaces the old list). + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.filter-list-by-and"> - <xs:attribute type="xs:string" name="list" use="required"> - <xs:annotation> - <xs:documentation> - The name of the method environment field that contains the list of GenericValue objects. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="to-list"> - <xs:annotation> - <xs:documentation> - The name of the method environment field the filtered list will be put into. - Defaults to the value of the list-name attribute (ie goes to the same place it came from, replacing the old list). - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="map"> - <xs:annotation> - <xs:documentation> - The name of a map in the method environment that will be used for the entity fields. - If no map is used this will just make a copy of the list. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="filter-list-by-date" substitutionGroup="EntityFindOperations"> <xs:annotation> <xs:documentation> - The filter-list-by-date tag filters the given list by the valid date using the from and thru dates in each value object. + Filters a list of entity values by their date-range fields. + Each entity value in the list will be compared to the specified date, and + if the entity value's date-range fields include the date, the entity value + will be copied to the target list. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.filter-list-by-date"/> + <xs:attribute type="xs:string" name="list" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that contains the list of entity values. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="to-list"> + <xs:annotation> + <xs:documentation> + The name of the field the filtered list will be put into. + Defaults to the value of the list-name attribute (replaces the old list). + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="valid-date"> + <xs:annotation> + <xs:documentation> + The name of a field in the method environment date to filter by. + Defaults to now. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="from-field-name"> + <xs:annotation> + <xs:documentation> + The name of the entity field to use as the beginning date. + Defaults to "fromDate". + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="thru-field-name"> + <xs:annotation> + <xs:documentation> + The name of the entity field to use as the ending date. + Defaults to "thruDate". + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.filter-list-by-date"> - <xs:attribute type="xs:string" name="list" use="required"> - <xs:annotation> - <xs:documentation> - The name of the method environment field that contains the list of GenericValue objects. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="to-list"> - <xs:annotation> - <xs:documentation> - The name of the method environment field the filtered list will be put into. - Defaults to the value of the list-name attribute (ie goes to the same place it came from, replacing the old list). - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="valid-date"> - <xs:annotation> - <xs:documentation> - The name of a field in the method environment date to filter by. - Defaults to now. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="from-field-name" default="fromDate"> - <xs:annotation> - <xs:documentation> - The name of the GenericValue field to use as the beginning effective date. - Defaults to fromDate. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="thru-field-name" default="thruDate"> - <xs:annotation> - <xs:documentation> - The name of the GenericValue field to use as the ending effective date. - Defaults to thruDate. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="all-same" default="true"> - <xs:annotation> - <xs:documentation> - Specifies whether or not all GenericValue objects in the list are of the same entity. - Defaults to true. - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:attributeGroup> <xs:element name="make-value" substitutionGroup="EntityValueOperations"> <xs:annotation> <xs:documentation> - The make-value tag uses the delegator to construct an entity value. - The resulting value will not necessarily exist in the database, but will simply be assembled using the entity-name and fields map. - The resulting GenericValue object will be placed in the method environment using the specified value-field. + Creates a new entity value. + The new entity value exists only in memory - it is not persisted in the database until it is stored. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.make-value"/> + <xs:attribute type="xs:string" name="entity-name" use="required"> + <xs:annotation> + <xs:documentation> + The entity name. + <br/><br/> + Required. Attribute type: constant, ${expression}. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="value-field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that will contain the entity value. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="map"> + <xs:annotation> + <xs:documentation> + The name of the field that contains a map that is used to initialize the entity value fields. + Map values whose key matches one of the entity value fields will be copied to the entity value. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.make-value"> - <xs:attribute type="xs:string" name="value-field" use="required"> - <xs:annotation> - <xs:documentation> - The name of the method environment field that contains the GenericValue object. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="entity-name" use="required"> - <xs:annotation> - <xs:documentation> - The name of the entity to construct an instance of. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="map"> - <xs:annotation> - <xs:documentation> - The name of a map in the method environment that will be used for the entity fields. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="clone-value" substitutionGroup="EntityValueOperations"> <xs:annotation> <xs:documentation> - The clone-value tag make a copy of the value in the method environment field specified by value-field. - The resulting GenericValue object will be placed in the method environment using the specified new-value-field. + Creates a copy of an entity value. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.clone-value"/> + <xs:attribute type="xs:string" name="value-field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that contains the entity value. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="new-value-field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field that will contain the new GenericValue object. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.clone-value"> - <xs:attribute type="xs:string" name="value-field" use="required"> - <xs:annotation> - <xs:documentation> - The name of the method environment field that contains the GenericValue object. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="new-value-field" use="required"> - <xs:annotation> - <xs:documentation> - The name of the method environment field that will contain the new GenericValue object. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> [... 514 lines stripped ...] |
| Free forum by Nabble | Edit this page |
