title: How to create object of class
body: <p>I think this explains my question well enough:</p>
  
  <pre><code>public class Model {
      public static Model [] findAllBySQL(String SQL){
          //this is simplified.  It should really query the DB and then fill model(s) with the DB values, and return the model(s).  sql query can return more than one row
          return new this(); //sytax error here
      }
  }
  
  
  public class UserModel extends Model {
  
  }
  
  
  UserModel.findAllBySQL("firstname=john") //How do I design the above so this returns a UserModel object?
  </code></pre>
  
  <p>I'm relatively new to Java.  My background is mostly PHP.  I am trying to create a simple home-made active record system.. I know this is recreating the wheel, but that's how I learn :)</p>
  
  <p>EDIT:  Most of you guys misunderstood me.  I know how to simple to <code>new UserModel()</code>.  I changed the code to make it more clear.</p>