/** * @deprecated Use {@link #add(Class, boolean, int, int, Object[], String)} */ protected void add(Class<? extends Type> c, boolean required, int maxReps, int length, Object[] constructorArgs) throws HL7Exception { add(c, required, maxReps, length, constructorArgs, null); }
/** * @deprecated Use {@link #add(Class, boolean, int, int, Object[], String)} */ protected void add(Class<? extends Type> c, boolean required, int maxReps, int length, Object[] constructorArgs) throws HL7Exception { add(c, required, maxReps, length, constructorArgs, null); }
/** * Called from getField(...) methods. If a field has been requested that * doesn't exist (eg getField(15) when only 10 fields in segment) adds * Varies fields to the end of the segment up to the required number. */ private void ensureEnoughFields(int fieldRequested) { int fieldsToAdd = fieldRequested - this.numFields(); if (fieldsToAdd < 0) { fieldsToAdd = 0; } try { for (int i = 0; i < fieldsToAdd; i++) { this.add(Varies.class, false, 0, 65536, null); // using 65536 // following // example of // OBX-5 } } catch (HL7Exception e) { log.error( "Can't create additional generic fields to handle request for field " + fieldRequested, e); } }
/** * Called from getField(...) methods. If a field has been requested that * doesn't exist (eg getField(15) when only 10 fields in segment) adds * Varies fields to the end of the segment up to the required number. */ private void ensureEnoughFields(int fieldRequested) { int fieldsToAdd = fieldRequested - this.numFields(); if (fieldsToAdd < 0) { fieldsToAdd = 0; } try { for (int i = 0; i < fieldsToAdd; i++) { this.add(Varies.class, false, 0, 65536, null); // using 65536 // following // example of // OBX-5 } } catch (HL7Exception e) { log.error( "Can't create additional generic fields to handle request for field " + fieldRequested, e); } }