Commit Graph

301 Commits

Author SHA1 Message Date
mdb 3e6d8e5afb Require a name for Index annotations because managing indices without a name is
a pain in the ass that we don't particularly need to spend time on.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2097 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-05-01 19:38:44 +00:00
ray 17c9fbedc5 Order by random. Probably this isn't very optimal.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2096 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-27 03:13:10 +00:00
mdb c47fe8dbcc Retroweaver cannot handle converting things that use Closeable, so we must
remain backward compatible.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2095 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-23 21:58:33 +00:00
ray 31262e70b2 List is as specific as we want to be here.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2094 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-20 01:56:43 +00:00
ray 8973ceeedb Return values should be as specific as possible.
(Method parameters should be as generic as possible.)


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2093 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-20 01:37:44 +00:00
mdb 7fb65d1851 Let's do that abstract check up here as well.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2092 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-19 21:27:18 +00:00
mdb f4835cdd17 Whoops, we want declared fields for generating the constants but all fields for
determining the public key. As always, the plot is thicker.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2091 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-19 21:25:45 +00:00
mdb 834275d387 Let's put that check in the right place.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2090 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-19 21:21:49 +00:00
mdb 0ae7308418 Three things:
- don't try to generate getKey() for abstract classes;
- get all of our class's fields, not just the ones declared in this class; do
  so using ClassUtil.getFields() rather than Class.getFields() because the
  latter returns the fields in a random order which is annoying whereas
  ClassUtil.getFields() returns them in an intuitive order (declaration order
  of the super-most class, then declaration order of the first derived class
  and so on);
- use Field.getAnnotations() rather than Field.getDeclaredAnnotations() just
  for consistency, even though you can't "override" a field and inherit
  annotations from your parent class (but if someday we have annotated
  PersistentRecord methods we'll want to use getAnnotations() not
  getDeclaredAnnotations() so we should provide appropriate copy and paste
  fodder).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2089 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-19 21:16:50 +00:00
mdb bed88f4d21 Introspection is expensive and the number of persistent classes is small, so
we'll cache the introspected primary key fields and reuse them. This has the
added benefit that we can eliminate storing the key fields entirely because we
know they must be exactly the set of primary key fields for the object which
never changes.

We will have to ensure that we flush our caches whenever we do a new release,
but we would have to do that anyway for a variety of reasons. Actually, we
could perhaps make use of the persistent object's versions and note the version
number of the cached instances in the cache and ignore the cache if they
differ.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2088 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-17 18:09:42 +00:00
mdb a130a89a44 Oops, forgot to strip whitespace from blank lines.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2087 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-17 17:44:41 +00:00
mdb cf0de28c0c Patch from Zell to ensure that Key objects are only constructed with primary
key fields and also don't leave any out.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2086 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-17 17:42:56 +00:00
mdb b95fdfa64f Use the handy new Closeable interface that Ray pointed out. Left the
InputStream and OutputStream versions in to avoid breaking binary
compatibility.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2085 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-13 21:31:23 +00:00
mdb 937ed93170 Added close() methods for Reader and Writer.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2084 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-13 21:00:21 +00:00
mdb 3bb6abd2ad Widened. Added support for overriding the site on a particular request.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2081 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-03 22:08:27 +00:00
andrzej b045017252 Added a hasResult method for whenever someone needs it.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2080 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-30 19:39:00 +00:00
andrzej 8974917d87 No need to check those values, actually.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2079 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-29 19:07:43 +00:00
andrzej 39cd3f3341 Added a peekResult method to ResultHandler.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2078 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-29 19:04:20 +00:00
andrzej 138f38c502 Allow subclasses to customize the reference.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2077 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-22 20:18:30 +00:00
andrzej 39b92d513f Added Ray's changes.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2076 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-21 23:07:25 +00:00
mjohnson 927d8c3336 Added warnedUpdate to the SimpleRepository
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2075 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-21 23:00:21 +00:00
andrzej e038506fc5 Added a ResultHandler class to store results after they've been
returned.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2074 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-21 22:41:36 +00:00
mdb 54ee0f3d99 Generate getKey() methods for our PersistentRecord classes in addition to
adding the field/column constants. Moved some of GenUtil into samskivert in the
process.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2073 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-16 20:50:10 +00:00
mdb 9f24bd4549 Improved @Computed support for subset record queries, from Zell.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2072 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-16 00:21:27 +00:00
mdb 0d496c5ad9 Added getLatestOperation(), widened.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2071 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-14 21:27:02 +00:00
mjohnson 63e23c26d2 Don't duplicate code that's in the java libs
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2070 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-13 17:04:15 +00:00
mjohnson e52a326ffa Added utility functions for convert a string to upper/lower case in the
US locale (without any funky character conversions you get in some 
languages)


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2069 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-13 01:51:25 +00:00
mdb 33ce01cde8 If we're generating XHTML, put a space before the /> close tag (apparently
required by the spec, and empirically required by Safari), and also use
checked="checked" for XHTML radio buttons.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2068 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-11 01:36:42 +00:00
mdb bbb6310592 Return whether we updated or inserted.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2067 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-02 04:36:04 +00:00
mdb 55b171e3cb Subject optional.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2066 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-02 03:53:06 +00:00
mdb 1335ce4b2e When we create a table for a persistent record, set the starting version to the
correct value to avoid spuriously trying to migrate it immediately thereafter.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2065 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-01 23:43:21 +00:00
mdb fcfe6c239c Allow extendo customizo.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2064 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-28 05:16:22 +00:00
mdb 7f34967737 This should really be automagic but for now we'll have a manual migration.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2063 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-28 00:25:43 +00:00
mdb 10e97ffcb7 git-svn-id: https://samskivert.googlecode.com/svn/trunk@2062 6335cc39-0255-0410-8fd6-9bcaacd3b74c 2007-02-20 19:14:21 +00:00
mdb 7634b9fa41 Do that more nicely.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2061 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-20 19:12:30 +00:00
mdb 47d6917c0f Stop if we get to a generic type declaration.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2060 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-20 19:09:13 +00:00
mdb 140fe70475 Behold, a column identifier generator for our keystroke saving needs.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2059 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-20 18:52:28 +00:00
mdb c877f8120a Do the same magic for DATETIME that we do when adding a TIMESTAMP column.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2058 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-20 02:17:56 +00:00
mdb 60c977b5af Expanded convenience methods, from Zell.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2057 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-20 00:12:06 +00:00
mdb 94a32b5103 Why fail when we can just complain without loss of integrity.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2056 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-19 19:47:18 +00:00
mdb e37cc33d68 Cache invalidation patch from Zell.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2055 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-19 19:30:48 +00:00
samskivert@gmail.com 028d9ebfe8 Added deNull() widened.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2054 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-19 18:17:45 +00:00
mdb 513d469816 Better logging.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2053 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-19 17:28:41 +00:00
mdb 33879dc6e0 Turn off debug logging.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2052 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-19 17:20:47 +00:00
mdb 452b8dc9a7 Instrumented the UserManager to debug dev1, yay.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2051 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-19 17:04:20 +00:00
mdb 7adc165822 Only log one line and don't create a Statement and then decide not to use it
because the migration has already been performed.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2050 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-18 21:43:08 +00:00
mdb 24ac6db16c More informative error message.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2049 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-18 21:41:20 +00:00
mdb f77ac4bbc2 Make drop migrations idempotent.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2048 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-18 21:40:13 +00:00
mdb bbace45059 >= and <= operators.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2047 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-10 19:04:36 +00:00
mdb bfc55f66eb Make our Rename migration more lenient about having already been performed.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2046 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-09 20:41:30 +00:00