Writing Extensions - What Am I Missing?

I’m trying to write some extensions which replace hand-built SQL inside tags.


I’ve made my class (SetSequenceChange) which extends AbstractChange.  It calls:

  1. Thanks!

Aha!  Figured it out after a little running the code through a debugger.  I didn’t find any examples which are using a schema that has multiple levels, so that explains why I wasn’t figuring out the missing piece.


So this code:


  1. <opennms:setSequence sequenceName="nodenxtid">
  2.       <opennms:table name="node" column="nodeid" />
  3. </opennms:setSequence>


...turns into:


    1. public TableConfig createTable() {
    2.       final TableConfig tc = new TableConfig();
    3.       m_tables.add(tc);
    4.       return tc;
    5. }


    Hopefully, that's useful to someone else looking to write an extension.  :)

Glad you found the solution, and thanks for the update.


Nathan