Great big revampage: no more strings anywhere. It's all ColumnExps all the way

down (well, all the way to the public API anyway).

Revamped index creation while I was in there because that was one of the big
string users. Now you just put @Index on the field you want indexed, and if you
want a multi-column index you do things with a magical static method just like
we do for complex (function) indices.

@UniqueConstraint may still go away since it's basically exactly the same thing
as @Index(unique=true), so it's kind of pointless to support both.
This commit is contained in:
Michael Bayne
2009-01-08 02:10:54 +00:00
parent a66f15e355
commit a9c992bb44
30 changed files with 260 additions and 356 deletions
@@ -38,16 +38,6 @@ public abstract class Conditionals
public static class IsNull
implements SQLOperator
{
public IsNull (String pColumn)
{
this(new ColumnExp(null, pColumn));
}
public IsNull (Class<? extends PersistentRecord> pClass, String pColumn)
{
this(new ColumnExp(pClass, pColumn));
}
public IsNull (ColumnExp column)
{
_column = column;
@@ -199,17 +189,6 @@ public abstract class Conditionals
/** The maximum number of keys allowed in an IN() clause. */
public static final int MAX_KEYS = Short.MAX_VALUE;
public In (Class<? extends PersistentRecord> pClass, String pColumn, Comparable<?>... values)
{
this(new ColumnExp(pClass, pColumn), values);
}
public In (Class<? extends PersistentRecord> pClass, String pColumn,
Collection<? extends Comparable<?>> values)
{
this(new ColumnExp(pClass, pColumn), values.toArray(new Comparable<?>[values.size()]));
}
public In (ColumnExp column, Comparable<?>... values)
{
if (values.length == 0) {
@@ -329,7 +308,7 @@ public abstract class Conditionals
_query = query;
}
public Class<? extends PersistentRecord> getPersistentRecord ()
public Class<? extends PersistentRecord> getPersistentClass ()
{
return _pClass;
}