Customer Portal

custom component that can communicate with built in writers

Comments 4

  • Avatar
    admin
    0
    Comment actions Permalink
    Hi Aaron,

    You can use following:
    * documentation regarding component integration into Engine - http://doc.cloveretl.com/documentation/ ... index.html
    * files on SourceForge - http://sourceforge.net/projects/clovere ... -3.4.0-M2/
    ** javadoc
    ** source codes of OpenSource Engine, including components (so you can check code of similar component to one you plan to write, for example SimpleCopy is easy)
    ** examples, see JavaExamples
  • Avatar
    notsoclever
    0
    Comment actions Permalink
    Hi

    One thing about SimpleCopy is that it is already reading in objects of type DataRecord . So it reads in using a CloverBuffer and then writes to the output port using the same object. There is no construction of records. Im trying to go from a java.util.collection class to a DataRecord. Once I have that I should be able to write those to the output port. So... how do you populate a DataRecord? Im guessing the fields in the data record are created when you use the DataRecordFactory and pass it metadata from either an input or output port. Great. But there is no setFieldValue(Object val) or something like that in order to populate a datarecord. There are getters, but no setters. Please, if there is something simple that I am missing let me know.
  • Avatar
    admin
    0
    Comment actions Permalink
    Hi,

    On DataRecord created by DataRecordFactory you can via DataRecord.getField(int index | String name) obtain DataField which represents one field of record. Then on such DataField you can call DataField.setValue(Object).

    DataField is abstract class which is implemented by classes like StringDataField, LongDataField, ... which implements setValue(Object) method in proper way.

    I hope this helps. Please take a look into JavaDoc.
  • Avatar
    notsoclever
    0
    Comment actions Permalink
    Deal. Because thats not what I did in order to get to this point. Everyone uses org.jetel.data.DataRecord. Talk about ubiquitous!!! If only I would have read the java doc BEFORE I asked direct, specific questions about this process. Thank you!!!

Please sign in to leave a comment.