2 Working with Oracle CDR Format Java Hooks in NPL
This chapter lists and describes the Java hooks available for the Oracle Communications Offline Mediation Controller Oracle CDR Format Collection Cartridge (CC).
About Oracle CDR Format Java Hooks
Java hooks are an advanced feature of NPL (Node Programming Language) that enable Offline Mediation Controller to call a Java method from an NPL program. For more information on using Java hooks with NPL, see the discussion on Java hooks in Offline Mediation Controller Cartridge Development Kit NPL Reference Guide.
Table 2-1 lists the Oracle CDR Format Java hooks methods.
Table 2-1 Oracle CDR Format Java Hooks Method Summary
Modifier and Type | Method and Description |
---|---|
IntField |
hasHeaderFields(DCFieldContainer in) Verifies if the record contains header fields. |
IntField |
hasTrailerFields(DCFieldContainer in) Verifies if the record contains trailer fields. |
IntField |
hasAnyAssociated(DCFieldContainer in) Verifies if the record contains any associated block. |
IntField |
hasAssociatedData(DCFieldContainer in, StringField associatedBlockName) Verifies if the record contains the associated block associatedBlockName. |
ListField |
getAssociatedData(DCFieldContainer in, StringField associatedBlockName) Returns the associatedBlockName as a Listfield. |
IntField |
getAssociatedIntField(DCFieldContainer in, StringField associatedBlockName, StringField fieldName) Returns the integer field fieldName from the associated block associatedBlockName. |
DoubleField |
getAssociatedDoubleField(DCFieldContainer in, StringField associatedBlockName, StringField fieldName) Returns the double field fieldName from the associated block associatedBlockName. |
LongField |
getAssociatedLongField(DCFieldContainer in, StringField associatedBlockName, StringField fieldName) Returns the long field fieldName from the associated block associatedBlockName. |
StringField |
getAssociatedLongField(DCFieldContainer in, StringField associatedBlockName, StringField fieldName) Returns the string field fieldName from the associated block associatedBlockName. |
IntField |
getIntFieldFromList(ListField lstFld, StringField fieldName) Returns the integer field fieldName from lstFld. |
LongField |
getLongFieldFromList(ListField lstFld, StringField fieldName) Returns the long field fieldName from lstFld. |
DoubleField |
getDoubleFieldFromList(ListField lstFld, StringField fieldName) Returns the double field fieldName from lstFld. |
StringField |
getStringFieldFromList(ListField lstFld, StringField fieldName) Returns the string field fieldName from lstFld. |
Oracle CDR Format Java Hook Method Details
The section describes the Oracle CDR Format Java hook methods.
hasHeaderFields
IntField hasHeaderFields(DCFieldContainer in)
Usage
This function verifies if the record contains header fields.
Parameters
in is the DCFieldContainer that contains the field names and their associated values.
Returns
1 (true) if the record contains header fields.
0 (false) if the record does not contain header fields.
hasTrailerFields
IntField hasTrailerFields(DCFieldContainer in)
Usage
This function verifies if the record contains trailer fields.
Parameters
in is the DCFieldContainer that contains the field names and their associated values.
Returns
1 (true) if the record contains trailer fields.
0 (false) if the record does not contain trailer fields.
hasAnyAssociated
IntField hasAnyAssociated(DCFieldContainer in)
Usage
This function verifies if the record contains any associated block.
Parameters
in is the DCFieldContainer that contains the field names and their associated values.
Returns
1 (true) if the record contains the associated block.
0 (false) if the record does not contain the associated block.
hasAssociatedData
IntField hasAssociatedData(DCFieldContainer in, StringField associatedBlockName)
Usage
This function verifies if the record contains the associated block associatedBlockName.
Parameters
in is the DCFieldContainer that contains the field names and their associated values.
associatedBlockName is the name of the associated block.
Returns
1 (true) if the record contains the associated block.
0 (false) if the record does not contain the associated block.
getAssociatedData
ListField getAssociatedData(DCFieldContainer in, StringField associatedBlockName)
Usage
This function returns the associatedBlockName as a Listfield.
Parameters
in is the DCFieldContainer that contains the field names and their associated values.
associatedBlockName is the name of the associated block.
Returns
The associatedBlockName as a List field if the value is found. Returns an empty List field if the value is not found.
getAssociatedIntField
IntField getAssociatedIntField(DCFieldContainer in,StringField associatedBlockName,StringField fieldName)
Usage
This function returns the integer field fieldName from the associated block associatedBlockName.
Parameters
in is the DCFieldContainer that contains the field names and their associated values.
associatedBlockName is the name of the associated block.
fieldName is the field name for which the value is to be returned.
Returns
The integer field matching the search criteria.
getAssociatedDoubleField
DoubleField getAssociatedDoubleField(DCFieldContainer in,StringField associatedBlockName,StringField fieldName)
Usage
This function returns the double field fieldName from the associated block associatedBlockName.
Parameters
in is the DCFieldContainer that contains the field names and their associated values.
associatedBlockName is the name of the associated block.
fieldName is the field name for which the value is to be returned.
Returns
The double field matching the search criteria.
getAssociatedLongField
LongField getAssociatedLongField(DCFieldContainer in,StringField associatedBlockName,StringField fieldName)
Usage
This function returns the long field fieldName from the associated block associatedBlockName.
Parameters
in is the DCFieldContainer that contains the field names and their associated values.
associatedBlockName is the name of the associated block.
fieldName is the field name for which the value is to be returned.
Returns
The long field matching the search criteria.
getAssociatedStringField
StringField getAssociatedStringField(DCFieldContainer in,StringField associatedBlockName,StringField fieldName)
Usage
This function returns the string field fieldName from the associated block associatedBlockName.
Parameters
in is the DCFieldContainer that contains the field names and their associated values.
associatedBlockName is the name of the associated block.
fieldName is the field name for which the value is to be returned.
Returns
The string field matching the search criteria.
getIntFieldFromList
IntField getIntFieldFromList(ListField lstFld, StringField fieldName)
Usage
This function returns the integer field fieldName from lstFld.
Parameters
lstFld is the ListField that contains the field names and values.
fieldName is the field name for which the value is to be returned.
Returns
The integer field matching the search criteria.
getLongFieldFromList
LongField getLongFieldFromList(ListField lstFld, StringField fieldName)
Usage
This function returns the long field fieldName from lstFld.
Parameters
lstFld is the ListField that contains the field names and values.
fieldName is the field name for which the value is to be returned.
Returns
The long field matching the search criteria.
getDoubleFieldFromList
DoubleField getDoubleFieldFromList(ListField lstFld, StringField fieldName)
Usage
This function returns the double field fieldName from lstFld.
Parameters
lstFld is the ListField that contains the field names and values.
fieldName is the field name for which the value is to be returned.
Returns
The double field matching the search criteria.
getStringFieldFromList
StringField getStringFieldFromList(ListField lstFld, StringField fieldName)
Usage
This function returns the string field fieldName from lstFld.
Parameters
lstFld is the ListField that contains the field names and values.
fieldName is the field name for which the value is to be returned.
Returns
The string field matching the search criteria.