A whole bunch of revampery on the way to collection caching, including some

basic stats reporting and query and cache logging.

PersistenceContext no longer sticks its nose so deeply into the business of
Query and Modifier. It just passes itself along and allows them to do any cache
activity they need during their normal execution. The one situation where we
keep our nose in their business is to allow a Query to return a result from the
cache before it is even invoked so that we can avoid requesting a database
connection if we won't ever need one.
This commit is contained in:
Michael Bayne
2008-11-21 01:49:28 +00:00
parent 5f26eb28c9
commit 9880ff326c
18 changed files with 548 additions and 222 deletions
@@ -69,6 +69,12 @@ public abstract class Conditionals
{
}
@Override // from Object
public String toString ()
{
return "IsNull(" + _column + ")";
}
protected ColumnExp _column;
}
@@ -240,6 +246,20 @@ public abstract class Conditionals
_column.addClasses(classSet);
}
@Override // from Object
public String toString ()
{
StringBuilder builder = new StringBuilder();
builder.append(_column).append(" in (");
for (int ii = 0; ii < _values.length; ii++) {
if (ii > 0) {
builder.append(", ");
}
builder.append(_values[ii]);
}
return builder.append(")").toString();
}
protected ColumnExp _column;
protected Comparable<?>[] _values;
}
@@ -286,6 +306,12 @@ public abstract class Conditionals
return _clause;
}
@Override // from Object
public String toString ()
{
return "Exists(" + _clause + ")";
}
protected SelectClause<T> _clause;
}
@@ -329,6 +355,12 @@ public abstract class Conditionals
{
}
@Override // from Object
public String toString ()
{
return "FullText(" + _name + "=" + _query + ")";
}
protected Class<? extends PersistentRecord> _pClass;
protected String _name;
protected String _query;