The data type Record identifies one entry of an FS_INDEX input component (see data type Index). In order to obtain the data object associated with the entry, the entry's string identifier must be obtained via the method getIdentifier() and then resolved using the DataAccessSession object associated with the FS_INDEX input component.
|
The set of functionality supported by the data object (i.e. the amount and type of methods available) depends upon the design of the associated data access plug-in. For more information about the implemention of data access plug-ins, see Plug-In Development > Universal Extensions > Data Access. |
final Index myIndex = myFormData.get(null, "myIndex").get();
final DataAccessSession myDataAccessSession = myIndex.createSession(baseContext);
// Walk through all records stored in the input component "myIndex".
for (final Record record : myIndex) {
// Obtain a DataObject from the data access session object using the record's identifier.
final DataObject myDataObject = myDataAccessSession.getData(record.getIdentifier());
// Process myDataObject.
}
Methods on Record objects
The table below lists all methods which can be invoked on objects of data type Record .
The object is generated by the following form objects: |
---|
FS_INDEX |
equals(Object)
Method name |
Return type |
Available since |
equals(Object) |
boolean |
|
Overview
getClass
The .getClass() (in Bean syntax: .class) method returns the class of the invoking object (cf. java.lang.Class).
Invocation:
$CMS_VALUE(myString.class)$
$CMS_VALUE(myString.getClass())$
Output:
java.lang.String
Method name |
Return type |
Available since |
getClass |
Class |
|
Overview
getIdentifier
The identifier of this record.
Method name |
Return type |
Available since |
getIdentifier |
String |
5.2.11 |
Overview
isCase(Object)
Method name |
Return type |
Available since |
isCase(Object) |
boolean |
|
Overview
isNull
The .isNull() (in Bean syntax: .isNull) method checks whether an expression or object is null , e.g. storeElement.isNull(). In the case of objects with complex values or objects, the object decides when it is null. The data type DomElement for example always contains an empty document, thus it is never null. For this reason, checking an empty DOM editor input component by using the method .isNull() returns the value false, whereas checking the component with .isEmpty() would return the value true.
The method .isNull() returns a Boolean value as the check result. true is the check result if the expression or object is null and false if not.
Method name |
Return type |
Available since |
isNull |
boolean |
|
Overview
print
Method name |
Return type |
Available since |
print |
void |
|
Overview
set(String, Object)
Method name |
Return type |
Available since |
set(String, Object) |
Object |
|
Overview
toJSON
Convert to a JSON-compatible string representation including necessary quotes and escaping for immediate use. Handles Maps, Collections, Arrays, Numbers, Strings, Boolean, Date, and JsonElement. A date instance will be converted to an ISO-8601 formatted date string. Any object other than above will be converted using its 'toString()' value.
Method name |
Return type |
Available since |
toJSON |
String |
5.2.11 |
Overview
toString
Method name |
Return type |
Available since |
toString |
String |
|
Overview
type
Method name |
Return type |
Available since |
type |
String |
|
Overview