ebean-orm-tools / finder-generator

Code generator for avaje-ebeanorm-typequery
Apache License 2.0
2 stars 3 forks source link

Modify Java Finder generation to not include the constructor for named servers by default #19

Closed rbygrave closed 6 years ago

rbygrave commented 6 years ago

So in the example below the second constructor taking the string name of a named server - that constructor will not be generated by default.

To generate that constructor set the environment var: EBEAN_FINDER_NAMEDSERVER to true ... or set the system property finder.namedServer to true.

public class PersonFinder extends Finder<Long,Person> {

  /**
   * Construct using the default EbeanServer.
   */
  public PersonFinder() {
    super(Person.class);
  }

  /**
   * Construct with a given EbeanServer.
   */
  public PersonFinder(String serverName) {
    super(Person.class, serverName);
  }
}