Commit Graph

592 Commits

Author SHA1 Message Date
ray ebfaf480f4 No, retroweaver won't catch this. Reverted to the 1.4-compatible constructor.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1869 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-07-05 19:50:05 +00:00
ray c2bce61bbe Use additional argument to identify the Timer thread. This is 1.5 only,
I'm not sure if retroweaver handles this.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1868 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-07-05 19:32:08 +00:00
mdb 52af596bf6 git-svn-id: https://samskivert.googlecode.com/svn/trunk@1867 6335cc39-0255-0410-8fd6-9bcaacd3b74c 2006-07-04 22:39:22 +00:00
mdb 436e588a53 Made Queue type safe.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1866 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-07-04 22:27:41 +00:00
mdb 348b3cd5ae Allow XHTML compliant <br/> and <hr/> as well.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1865 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-25 16:35:59 +00:00
mdb 6ca7f04ea5 Moved HTML restriction code into HTMLUtil and out of the overweight StringUtil.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1864 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-25 16:26:04 +00:00
mdb d50d4b8c69 Restored the URL processing.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1863 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-25 16:15:03 +00:00
mdb a9a3cdf220 Switch to a line oriented parsing.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1862 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-25 16:11:29 +00:00
mdb 3b8e79e300 We need the column name.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1861 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-17 21:36:57 +00:00
mdb b181ae231a Make sure we have the column or index before we drop it. Unwrapped a non-long
line.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1860 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-17 21:34:50 +00:00
ray 164c1ac40c Let's remove the deprecated methods so that we don't run into trouble
if retroweaver replaces StringBuilder with StringBuffer (resulting in
duplicate methods).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1859 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-14 01:20:48 +00:00
mdb 20e50e1635 Added support for referencing other translation messages directly from a
translation message. So you can define something like:

m.coins = Doubloons
m.buy_coins = Purchase {m.coins}

and then later override m.coins and all instances of it will be properly
changed. Very useful for our rebranding efforts.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1858 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-13 22:40:23 +00:00
mdb 98de949beb Pass our site identifier to the message manager regardless of whether we're
using site bundles. The message manager will now allow a simpler form of
site-specific messaging wherein it prefixes the site string to the message
bundle and looks for that (assuming we're not using site bundles).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1857 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-13 22:11:15 +00:00
ray ed2064ae81 Collection -> Iterable, in a few places.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1856 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-13 22:09:50 +00:00
ray ce7a0f1c9f s/StringBuffer/StringBuilder, where possible.
Deprecated versions of the methods in StringUtil will continue to take
a StringBuffer argument for now.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1855 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-13 21:58:37 +00:00
mdb 9d6c997d8a This is so useful we'll bump it up to samskivert.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1854 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-13 16:53:08 +00:00
ray 4e7017723a Updated createPointComparator to operate on Point2D objects.
Since Point2D objects can have coordinate values between 0 and 1, I had
to remove the wee optimization of comparing the squares of the distance.
Also modified it so that the origin Point's coordinates can be updated to
update the Comparator.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1853 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-09 21:15:33 +00:00
mdb 87753db18a Added batchQuery().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1852 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-08 21:32:58 +00:00
mdb 0b81f21eea A patch from MikeT to support sending more complex (mime) messages.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1851 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-05 00:45:46 +00:00
mdb 6fc0cf2db0 Cope with very large numbers. Consider that:
int low = Integer.MAX_VALUE - 2;   // = 2147483645
  int high = Integer.MAX_VALUE;      // = 2147483647
  int mid1 = (low + high) / 2;       // = -2
  int mid2 = low + (high - low) / 2; // = 2147483646
  int mid3 = (low + high) >> 1;      // = -2        
  int mid4 = (low + high) >>> 1;     // = 2147483646

So we'll use the last one (non-sign-propagating shift) as it is likely to be
fastest and clearest.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1850 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-06-05 00:13:00 +00:00
mdb 1412f7c5e7 Type-safety patrol!
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1849 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-05-31 04:30:41 +00:00
ray a1774e073d Following mike's example, let's put the @SuppressWarnings on the same
line as the thing we're suppressing, to more closely couple them.
Also, removed one hanging on a method by using a temporary variable within.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1848 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-05-31 03:24:35 +00:00
ray e394ddd5a5 Now that we support jdk 1.5, use the T.valueOf() factory methods where T
is Boolean, Byte, Short, Character, Integer, Long, Float, or Double.

This has always made sense for Boolean, but with 1.5 they added these
methods everywhere and they are the preferred method for obtaining an
instance of any of those classes unless you absolutely want different
object references.

Since many Integer objects have a low value, the small bit of overhead
incurred for calling these methods should more than make up for itself
in saved memory and garbage collection time.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1847 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-05-24 01:18:50 +00:00
mdb f2f1d8e62f Added a handy class for caching things for a spell.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1846 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-05-20 22:36:17 +00:00
mdb 49cffb85b2 More type safety goodness. It all compiles with no warnings now. Yay!
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1845 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-05-12 17:54:07 +00:00
mdb 9e898c84a3 More type safety goodness.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1844 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-05-12 01:27:36 +00:00
ray 93196c5045 Reverted to using an array for our buckets.
Use the @SuppressWarnings annotation with surgical precision.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1843 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-05-12 01:18:38 +00:00
mdb a043cd1848 Those weren't needed.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1842 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-05-12 01:17:56 +00:00
mdb e6b7505a69 Ignore unavoidable unchecked warnings.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1841 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-05-12 01:15:47 +00:00
mdb 20a9e352ee Suppress warnings.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1840 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-05-12 01:13:46 +00:00
ray 89c9ddb431 Got a wild hair and added some methods to CountHashMap, and added
an Entry interface that can be used to get the count directly from
an Entry (without having to know that values are stored internally as
an int[]). It turned out to be a bit ugly.

What I really need to do is hide all the int[] business by rewriting
this class, which will also clean up the ugliness.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1839 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-05-03 02:28:00 +00:00
mdb 7a4588e859 We need to ensure that only one repository operation is active on a particular
JDBC connection at a time. JDBC connections are thread safe, but we frequently
have to execute statements like:

insert into FOO values(0, blah, blah);
select LAST_INSERTED_ID()

to get the value assigned to an auto-increment column. If another thread
slipped in between those statements and inserted something into its own
auto-increment column having table, we'd get funny business. And indeed we very
occasionally see this race condition happen in the thread-happy webapps.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1838 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-29 18:54:47 +00:00
mdb 5fc9cafc36 Report the key rather than the connection identifier so we can tell if it was
read-only or not.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1837 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-29 17:58:28 +00:00
mdb 70e77b4040 Added ResultListener.NOOP which can be used like so:
foo.doSomeThing(bar, new ResultListener.NOOP<MyType>());


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1836 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-28 22:54:29 +00:00
ray c3498b63e2 Added a static method to normalize an email address.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1835 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-28 22:00:23 +00:00
mdb 38f09416b7 Eliminate the prepared statement caching as it's not useful since we can't use
server side prepared statement caching and it's causing things to break when
for some reason the prepared statements are being closed (perahps automatically
by the new MySQL deriver) and then being reused.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1834 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-28 21:30:35 +00:00
mdb e8cb1fb2d4 Add the NOOP back but deprecate it.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1833 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-25 23:29:08 +00:00
mdb ec436833fb Type-safe result listeners. Whee!
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1832 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-25 23:23:37 +00:00
mdb 5d6272c0ce Missed an auxiliary table.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1831 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-21 22:18:07 +00:00
mdb c67926d14d Revamped JORA to avoid keeping connection objects around which is not thread
safe and particularly not so in the webapp where one thread might come slip a
read-only connection into the session before an update was about to happen.

This ends up being a giant refactor, but it's much cleaner this way (to pass a
connection into the Table whenever it is doing anything), so I've taken the
pain. Fortuanately, code that uses the convenience methods doesn't need to
change, so as a part of this refactor I've taken the opportunity to switch a
bunch of old stuff to the new, concise, future proof hotness.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1830 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-21 21:26:07 +00:00
ray ca9adfe063 Better genericized typing for addAll() methods.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1829 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-19 18:41:44 +00:00
mdb f160f099f4 We can't use DriverManager if we want to use custom driver classes.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1828 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-17 18:22:32 +00:00
mdb 1e518d06bb Added methods for getting SQL dates to match the methods for getting util
dates.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1827 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-17 01:38:45 +00:00
mdb ccebc24367 Mark updating queries as such.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1826 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-13 19:55:36 +00:00
mdb 9946c3e311 Propagate more modified row counts.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1825 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-13 18:43:44 +00:00
mdb e6c4008258 Documented some return values.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1824 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-13 18:41:46 +00:00
mdb a1f2a34090 Return the number of rows modified by an update.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1823 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-13 18:40:31 +00:00
mdb 790d0dd35f Require a distinction to be made between read-only and read-write queries so
that we can route read-only queries to one or more read-only mirrors of a
database (the MySQL database drivers supports round-robin load balancing of
queries to read-only slaves).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1822 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-13 18:01:29 +00:00
mdb 86bce6f08f Beans, frank.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1821 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-12 23:35:08 +00:00
mdb 325630b84e Added loadAll() that supports joining with other tables.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1820 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-12 23:21:18 +00:00