Matthew Bryan 2010-05-20, 13:48
Thanks Sean, I think I've got the recommendations working! I created a
new DataModel that initializes the IDMigrator and has overrides for
getLongColumn and setLongParameter that pass data through my
IDMigrator. Now the only thing I'm missing is a way to retrieve the
string names of items through the web service. Are there any hooks on
that side where I can make the ID translation?
On Wed, May 19, 2010 at 4:33 AM, Sean Owen <[EMAIL PROTECTED]> wrote:
> Ideally, you initialize by pre-loading all the mappings, by calling
> initialize(). You can also call storeMapping() whenever you know you
> have a new mapping -- on each translation if you like, though that's a
> lot of overhead.
> Then you just use it to translate strings to numbers and back. The
> only twist comes when, for example, you have everything in a DB, and
> have to translate from numbers back into strings to make efficient
> queries. Then you have to override some methods in the DataModel
> implementation to deal with this.
> It's not one line of code but not terrible, and maybe we can find ways
> to make it easier.
> On Wed, May 19, 2010 at 1:10 AM, Matthew Bryan <[EMAIL PROTECTED]> wrote:
>> I'm having trouble setting up an IDMigrator. I start to write a
>> DataModel class with the overrides that do the translation through an
>> IDMigrator...but that technique doesn't provide a straightforward path
>> for the initialization of IDMigrator....unless I'm reading the db or
>> file natively before it's abstracted in the interface. Is this how
>> folks are doing it or am I missing something? Is there any sample code
>> for an IDMigrator implementation? Thanks for the help....this is a
>> great list for an exciting tool.