Exploring alternatives? Our products offer more value than the competition, and are trusted by more than 75% of the top-20 financial institutions in North America. Connect with us at sales@x9ware.com and start a free evaluation today.

SDK X9Objects

Using X9Ware SDK X9Objects

X9Object is an abstract class which defines that attributes of a single data record. An entire file can be loaded to an X9ObjectManager list, which provides transversal and management methods. If a file with 10,000 records is loaded to a list, then the list will have 10,000 x9objects.

X9Object has instantiated classes X9Object937 (for x9.37 records) and X9ObjectAch (for ach records). Within X9Object, there are several core fields that are exposed as public that are used extremely frequently. These are as follows:

x9ObjIdxContains the record index within the overall x9 file and is relative to one.
X9ObjTypeContains the record type. Instead of hard coding equal checks for certain record types, it is instead recommend that you use the constants that are provided in SDK class X9.
X9ObjFormatContains the record format which is a three character string and typically has a value of “000”. The exception to this is those record types which have multiple logical formats, such as x9 credits and ach addendas.
X9ObjDataContains the record data as a string which is stored in ASCII. This is typically 80 characters for x9 files and will always be 94 characters for ach files. Note that the type 52 image detail records for x9 files do not contain the actual images, but contain the x9 record data only.

The X9Object class has a large number of attributes which are exposed via getters and setters. You should closely review this functionality within the JavaDoc. There are a correspondingly long list of provided methods to logically access and manipulate the data that is stored within each x9object instance. X9Object provides methods to easily walk the records within the file in forward or backward directions.

X9ObjectManager is a companion class to X9Object provides a variety methods that are used to manage these record objects. In particular, X9ObjectManager allows x9objects to be efficiently stored in an array list which can then be used for a wide variety of purposes. Methods are provided to allow the first and last x9objects to be directly retrieved from the list. You can also retrieve any x9object by its corresponding index. Once you have access to an individual x9object, you can use it as the basis to then move forward and backward within the list.

X9ObjectManager is reusable, allowing a file file to be loaded to objects, then reset, and then reloaded from another file. You should closely review this functionality has well as a long list of methods that are provided to further access and manipulate x9object data.

An X9Object can be marked as deleted. This is done on a logical basis, which means that the instance is marked as deleted but physically remains within the X9ObjectManager object list. An x9object that is marked as deleted will be logically skipped over when walking objects in either a forward or backward direction. An x9object that has been deleted can be reverted by changing the delete indicator.

  • A common requirement is the need to reference a header record (file header, cash letter header, or bundle header) from a record within an item group. There are two ways to accomplish this:
  • One alternative is to use the x9object “walk” methods which will traverse the x9objects in a reverse direction to obtain the needed header record. It should be noted that these methods will have associated overhead for larger files based on the repeated use of get previous.
  • Another alternative is to use the x9object getter methods to directly obtain the associated file header, cash letter header, or bundle header. These methods utilize an internal X9Headers index that is stored within each x9object and is much more efficient than walking to the needed header records. Use of these x9object header getter methods requires that you first invoke the assign headers index method within X9ObjectManager prior to using indexing reference. Note this is always done by X9Validator since it is depending on those indexes being in place. If you are using X9ObjectManager lists but are not doing an x9 file validation, then you will need to assign the header indexes prior to using the getter methods.

X9ObjType

  • public static final short FILE_HEADER = 01;
  • public static final short CASH_LETTER_HEADER = 10;
  • public static final short BUNDLE_HEADER = 20;
  • public static final short CHECK_DETAIL = 25;
  • public static final short CHECK_ADDENDUM_A = 26;
  • public static final short CHECK_ADDENDUM_B = 27;
  • public static final short CHECK_ADDENDUM_C = 28;
  • public static final short RETURN_DETAIL = 31;
  • public static final short RETURN_ADDENDUM_A = 32;
  • public static final short RETURN_ADDENDUM_B = 33;
  • public static final short RETURN_ADDENDUM_C = 34;
  • public static final short RETURN_ADDENDUM_D = 35;
  • public static final short ACCOUNT_TOTALS = 40;
  • public static final short NON_HIT_TOTALS = 41;
  • public static final short IMAGE_VIEW_DETAIL = 50;
  • public static final short IMAGE_VIEW_DATA = 52;
  • public static final short IMAGE_VIEW_ANALYSIS = 54;
  • public static final short CREDIT_RECONCILIATION = 61;
  • public static final short CREDIT = 62;
  • public static final short USER_RECORD = 68;
  • public static final short PAYEE_ENDORSEMENT = 68;
  • public static final short BUNDLE_TRAILER = 70;
  • public static final short BOX_SUMMARY = 75;
  • public static final short ROUTING_NUMBER_SUMMARY = 85;
  • public static final short CASH_LETTER_TRAILER = 90;
  • public static final short FILE_CONTROL_TRAILER = 99;

X9ObjFormat

Contains the x9 record format which is a three character string and typically has a value of “000”. The exception to this is those record types which have multiple logical formats, such as the type 61 record or the type 68 user record.

X9ObjData

Contains the x9 record data as a string which is stored in ASCII and is typically 80 characters long. Type 52 image detail records do NOT contain the images (this data field contains the x9 data only).

Methods

The X9Object class has a large number of attributes which are exposed via getters and setters. You should closely review this functionality within the JavaDoc. There is a correspondingly long list of provided methods to logically access and manipulate the data that is stored within each x9object instance.

Scroll to Top