title: How to implement a parameterized method in an interface for using in the Spring Framework
body: <p>I am trying to integrate the Aurelius ORM framework and the Spring 4D framework and I am for the most part succeding, however the Aurelius ORM (and others too) rely on an "Object Manager" for the loading and saving of objects in the database. Part of the work I am doing is trying to separate as much as I can the implementation and the interfaces of the classes. When creating the interface for this Object Manager (TObjectManager in Aurelius) however, I am having difficulty implementhing the "Find" method of the Object Manager. For example, the object manager supports the following methods:</p>
  
  <pre><code>MyObjectManager := TObjectManager.Create(Connection);
  ExistingSale := MyObjectManager.Find&lt;TSale&gt;(1); // Find the Sale record with ID = 1 of the class TSale.
  </code></pre>
  
  <p>Now trying to convert the ObjectManager declaration to an interface Im trying to do it the following way:</p>
  
  <pre><code>IObjectManager = Interface
       ['{1F54162B-D7D7-4E42-AC9D-D269803371DB}']
       function Find&lt;T&gt;(ID: Integer) : T;
  end;
  </code></pre>
  
  <p>And this is where there is the problem, because the compiler fails with the error:</p>
  
  <pre><code>[DCC Error] E2535 Interface methods must not have parameterized methods
  </code></pre>
  
  <p>Basically I need to come up with an interface function that I could call in my own Object Manager, for example:</p>
  
  <pre><code>function TMyOwnObjectManager.Find&lt;T&gt;(ID: Integer) : T;
  begin
       Result:=fAureliusObjectManager.Find&lt;T&gt;(ID);
  end;
  </code></pre>
  
  <p>Thanks anyone for your help, been trying to come up with a soultion for several days now.</p>