reducing generic verbosity
Noel Grandin <[email protected]> Wed, 30 Jun 2010 10:46:10 +0200
| Newsgroups | gmane.comp.java.orm.simpleorm |
|---|---|
| Message-ID | <[email protected]> |
Hi
A method like this on SQuery:
public static <T extends SRecordInstance> SQuery<T> create(SRecordMeta<T> recordMeta) {
return new SQuery<T>(recordMeta);
}
would greatly help to reduce the verbosity of the instantiation of SQuery objects.
For example, instead of this:
SQuery<OrderWidebandMeasurementRecord> query = new SQuery<OrderWidebandMeasurementRecord>(META);
I can do this:
SQuery<OrderWidebandMeasurementRecord> query = SQuery.create(META);
Regards,
Noel Grandin
Disclaimer: http://www.peralex.com/disclaimer.html