use null instead of "" for no dbmapping, simpler virtual keys

This commit is contained in:
hns 2001-01-25 20:56:12 +00:00
parent 53a34144c3
commit 46a17c3028

View file

@ -21,7 +21,7 @@ public final class Key implements Serializable {
public Key (DbMapping dbmap, String id) { public Key (DbMapping dbmap, String id) {
this.type = dbmap == null ? "" : dbmap.typename; this.type = dbmap == null ? null : dbmap.typename;
this.id = id; this.id = id;
hash = id.hashCode (); hash = id.hashCode ();
} }
@ -46,7 +46,7 @@ public final class Key implements Serializable {
} }
public void recycle (DbMapping dbmap, String id) { public void recycle (DbMapping dbmap, String id) {
this.type = dbmap == null ? "" : dbmap.typename; this.type = dbmap == null ? null : dbmap.typename;
this.id = id; this.id = id;
hash = id.hashCode (); hash = id.hashCode ();
} }
@ -73,7 +73,7 @@ public final class Key implements Serializable {
} }
public static String makeVirtualID (String ptype, String pid, String sid) { public static String makeVirtualID (String ptype, String pid, String sid) {
return ptype+"/"+pid + "*h~v*" + sid; return ptype+"/"+pid + "~" + sid;
} }
public String toString () { public String toString () {