samskivert
d37e8079a8
Unused import patrol.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2390 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 22:43:06 +00:00
samskivert
ed70e30023
Some method ordering.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2389 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 22:37:23 +00:00
samskivert
4ba1d015c9
We're handling Key query construction directly instead of letting it look like
...
a WhereClause, so we need to add our own where.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2388 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 22:36:53 +00:00
samskivert
741f868cc5
PrimaryKeySet -> KeySet.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2387 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 22:16:55 +00:00
samskivert
5e68665b34
Now we don't have to provide our values as an ArrayList.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2386 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 20:07:43 +00:00
samskivert
90bf8e0e68
Ah, Key actually is PrimaryKey and does not in fact keep the primary key
...
columns around. Cleaned some things up along those lines.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2385 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 20:05:44 +00:00
samskivert
6ac58edef3
Formalized the two-phase "get primary keys that match an arbitrary query, then
...
load or modify the rows that match those keys" pattern so that we can almost
always just magically do the right thing with regard to the cache. Added a
version of deleteAll() that makes use of this.
Also nixed a bunch of checked exception tomfoolery which was almost entirely
unnecessary and now with DatabaseException is completely unnecessary.
A few things remain to be done:
- PrimaryKeySet tries to be "smart" if its passed 0 keys and use
LiteralExp("false") but that causes things to freak out because Depot then
doesn't know what primary class it's dealing with. I'm probably going to make
All and None expressions that match all and none of the records in a table
respectively.
- deleteAll() doesn't currently split its keys into chunks small enough to be
digestible by the database if we match more than 32,768 rows. I'll see if I
can't abstract out that code from FindAllQuery so that we can easily use it
everywhere. It would be cool to handle that a a lower level and allow the
WhereClause to say that it needs to be run in phases, but that would probably
complicate the crap out of the low-level code.
- I need to create PrimaryKey to go between Key and PrimaryKeySet so that we
can avoid duplicating the primary key columns thousands of times in a large
PrimaryKeySet.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2384 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 19:39:08 +00:00
samskivert
af9ecae442
Added a genrecord target. Cleaned up some other bits.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2383 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 19:32:17 +00:00
samskivert
c02372cad6
Export our samskivert code as a module as well.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2382 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 17:05:37 +00:00
samskivert
5facd275b1
Nix dependence on StringUtil.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2381 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 01:19:43 +00:00
samskivert
9c071fd67f
Widening, removal of MessageFormat import just for the javadoc since that
...
breaks GWT.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2380 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 01:16:57 +00:00
samskivert
74f5e24eb1
Format tightening. Really this is just a test to see if Google will mail me my
...
goddamned commit diffs.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2379 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 00:42:15 +00:00
samskivert
936dfeee35
Well hell, let's just export ByteEnum to GWT.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2378 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-05 00:40:48 +00:00
samskivert
847607538c
Export MessageUtil for use by GWT.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2377 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-04 23:35:09 +00:00
samskivert
1a0c3cc241
Changed Depot to throw a RuntimeException on unexpected database error instead
...
of a checked exception. Invariably, we don't do anything with our
PersistenceExceptions except let them percolate all the way to the top and then
log a warning. We can probably automate the process of logging a warning with
useful information and save ourselves the trouble of doing it manually
everywhere.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2376 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-03 16:10:06 +00:00
samskivert
79a466c42a
Any collection of anything that extends QueryClause is generally all we need.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2375 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-09-03 00:55:07 +00:00
andrzej@threerings.net
add5867c13
Checking in Ray's update to ServiceWaiter.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2374 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-28 23:08:04 +00:00
andrzej@threerings.net
403200041e
Added prune method to remove collected observers from list.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2373 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-28 22:51:56 +00:00
samskivert
70476a54f5
Nixed unused import.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2372 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-25 18:16:35 +00:00
samskivert
744b73cddf
Let's go all the way up to Short.MAX_VALUE.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2371 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-25 16:27:43 +00:00
samskivert
90db99953d
Don't try to use an IN() clause with more than 16738 entries.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2370 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-25 15:57:43 +00:00
mdb
695f3c3609
Ability to name BasicRunQueue instances, from Charlie.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2369 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-21 00:26:42 +00:00
mdb
2fcce480cd
Nixed unneeded log message.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2368 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-20 18:17:52 +00:00
mdb
85da2e609c
We surely want to not run a transition if we try to note it and discover that
...
another process has noted it first.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2367 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-20 16:45:52 +00:00
mdb
7081b141b1
Comment out imports that go with commented out code.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2366 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-20 16:23:22 +00:00
mdb
db0eec0c1a
Don't require a schema version for computed records.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2365 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-20 01:28:31 +00:00
mdb
1229864e8b
A couple of changes:
...
1. Schema version is now always required. The "support" for unversioned schemas
was half-baked anyway.
2. Migration and table creation is now done in such a way that multiple
processes can start up and won't step on one another as they all try to migrate
the same schemas. Instead one will get a lock and do the migration and the
others will patiently wait.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2364 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-20 00:35:12 +00:00
mdb
c06c9039ef
Leftovers from some random testing.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2363 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-20 00:23:55 +00:00
mdb
0d3612377a
Report a better error message if a bogus rename is attempted. Some formatting
...
cleanup.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2362 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-20 00:22:41 +00:00
mdb
e5788bdfdd
Unfiddle long lines.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2361 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-16 20:30:52 +00:00
andrzej
b3317c7943
Added WeakObserverList, which allows observers to be
...
garbage-collected.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2360 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-09 01:36:33 +00:00
zell
91ccc5a77b
PreparedStatement.setObject() does a lot of runtime type checking, so we don't have to do setShort(), setString(), etc. But we do have to convert ByteEnum's to their byte representation.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2359 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-07 06:02:41 +00:00
zell
984698e793
The PostgreSQL datatypes for float and double are REAL and DOUBLE PRECISION.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2358 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-07 05:45:25 +00:00
mdb
52b9886246
We need this suppression.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2357 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-06 22:11:43 +00:00
mdb
ca764911c8
From Dave: a bunch of @Override annotating and some other cleanup.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2356 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-06 12:59:06 +00:00
mdb
3a283a16e1
Trimmed trailing whitespace.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2355 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-04 12:37:23 +00:00
mdb
92a3d410eb
Ignore our jar files here.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2354 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-04 12:30:02 +00:00
mdb
e212e29de8
Fixed some bogus null checks and assignments.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2353 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-04 00:49:37 +00:00
mdb
5f88cdb856
The target result listener is not necessarily of the same type as the chaining
...
listener.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2352 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-08-01 12:48:46 +00:00
mdb
b821084d39
Handle uncomplicated wildcard types.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2351 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-07-30 14:33:54 +00:00
mdb
1d146da100
Le metric crapload of generics cleanup.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2350 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-07-30 13:53:24 +00:00
mdb
4ff9dd2bc7
Cleaned up a few more type safety bits.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2349 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-07-26 22:27:52 +00:00
mdb
9ef52a4929
Some type parameter clarification.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2348 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-07-26 22:11:38 +00:00
mdb
10eeeca31b
Nixed a bunch of unused variables.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2347 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-07-26 22:02:39 +00:00
mdb
784698c730
Untabification, unused variable cleanup.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2346 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-07-26 20:26:26 +00:00
mdb
9e034ea863
Unused import pruning.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2345 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-07-26 20:14:38 +00:00
ray
82bd4c7f1f
More changes requested by the puzzle pirates.
...
- Added ArrayUtil.indexOf(int[], int).
This has never been added, in all our years, because it exists in IntListUtil.
IntLists are sort of different from int[]s, they're designed such that a 0
is an empty slot. But indexOf() works the same in either one, so let's make
ArrayUtil the definitive container of this code, and have IntListUtil use
ArrayUtil.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2344 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-07-23 23:39:45 +00:00
ray
a60b9da150
Per Micah Weaver, added getWeightedIndex(int[], Random);
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2343 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-07-23 22:27:57 +00:00
ray
e04f56ce4f
Patch from Charlie Groves:
...
Convenience method to schedule a non-recurring Interval at a specific time.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2342 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-07-23 21:49:27 +00:00
ray
e67458d55f
Patch from Charlie Groves:
...
mdb's changes to GenUtil yesterday are causing it to choke when making type
names for arrays and causing genservice to blow up in yohoho. This checks
for the subclass of Type for arrays and properly generates a name for it.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2341 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2008-07-23 18:59:11 +00:00