Hi,
A SchemaFactory is an interface used by a bunch of JDBC-ish code to
read and modify the current schema, and is pretty bare-bones.
A SchemaGenerator is a class used by the schema creation /
introspection process to convert DB-specific metadata to Schema
objects etc.
Suppose I'm writing a database/OpenJPA-related tool. If I were
looking for
general-purpose connect-to-a-database-and-barf-out-a-SchemaGroup
functionality, would I be better off asking someone to supply an
instance of
a SchemaGenerator, or an arbitrary SchemaFactory, if I were simply
going to
do the bare minimum in terms of calling methods?
Probably a SchemaFactory. But it's a pretty thin interface.
-Patrick
On Feb 1, 2010, at 3:37 PM, Laird Nelson wrote:
Can someone outline for me what the difference is between these two
classes
(other than that SchemaGroup is a class and SchemaFactory is an
interface)?
To my eyes they are responsible for the same job.
It also seems like a SchemaGenerator should, in all cases, be a
SchemaFactory.
Suppose I'm writing a database/OpenJPA-related tool. If I were
looking for
general-purpose connect-to-a-database-and-barf-out-a-SchemaGroup
functionality, would I be better off asking someone to supply an
instance of
a SchemaGenerator, or an arbitrary SchemaFactory, if I were simply
going to
do the bare minimum in terms of calling methods?
Thanks for any pointers. I know this is a vague question, but I'm
looking
for vague answers. :-) What I mean is, I'm mainly interested in
reasons
that these two classes look so similar--perhaps the mighty Abe White
forgot
what he had already written? Or had other ideas in mind?
Best,
Laird
--
Patrick Linskey
202 669 5907