On 14 May 2008, at 22:58, Galder Zamarreno wrote:
There's two other workarounds for this:
- Create SQL strings on the fly, when get operations are called:
public String getSelectChildNamesSql()
{
if (selectChildNamesSql == null)
{
setSelectChildNamesSql("select " + fqnColumn + " from " +
table + " where " + parentColumn + "=?");
}
return selectChildNamesSql;
}
public void setSelectChildNamesSql(String selectChildNamesSql)
{
testImmutability("selectChildNamesSql");
this.selectChildNamesSql = selectChildNamesSql;
}
+1 - this is my preferred approach, rather than adding lifecycles to
config elements or to get users to pass in SQL queries.
Cheers,
--
Manik Surtani
Lead, JBoss Cache
manik(a)jboss.org