From af53ed7913602310b1f5b2c552604f316967cabb Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 11 Oct 2006 20:37:14 +0000 Subject: [PATCH] Merge Key2 into Key. --- src/java/com/samskivert/jdbc/depot/Key.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/java/com/samskivert/jdbc/depot/Key.java b/src/java/com/samskivert/jdbc/depot/Key.java index b4db6f0..7ec75dd 100644 --- a/src/java/com/samskivert/jdbc/depot/Key.java +++ b/src/java/com/samskivert/jdbc/depot/Key.java @@ -31,17 +31,24 @@ public class Key public String[] indices; public Comparable[] values; + public Key (String index, Comparable value) + { + this(new String[] { index }, new Comparable[] { value }); + } + + public Key (String index1, Comparable value1, + String index2, Comparable value2) + { + this(new String[] { index1, index2 }, + new Comparable[] { value1, value2 }); + } + public Key (String[] indices, Comparable[] values) { this.indices = indices; this.values = values; } - public Key (String index, Comparable value) - { - this(new String[] { index }, new Comparable[] { value }); - } - public String toWhereClause () { StringBuilder where = new StringBuilder();