We wish to reserve some primary key identifiers for those tables (e.g. 1-1000) to ensure that we are able to bootstrap the machine with pre-loaded system data.

All of our JPA entity classes possess the following definition for that primary key.

@GeneratedValue(strategy = IDENTITY)
@Column(name = "id", unique = true, nullable = false, insertable = false, updatable = false)
private Integer id;

it is possible to method to tell the database that batches should start happening from 1000 (i.e. customer specific data will begin from 1000 let's start). We support (h2, mysql, postgres) within our atmosphere and that i would rather an answer which may be driven via JPA and reverse engineering DDL tools from Hibernate.

Tell me if this sounds like the right approach

You could attempt the TABLE strategy rather than IDENTITY. In the Hibernate book:

Similar to Hibernate’s hilo strategy, TABLE uses database table store the last produced integer primary key value, and every generator is planned to 1 row within this table. Each row has two posts: pkColumnName and valueColumnName. The pkColumnValue assigns each row to particular generator, and also the value column supports the last retrieved primary key. The persistence provider allocates as much as allocationSize integers in every turn.

Here's an example with increased explanation. Along with a more complicated example for setting the initial value.

You might use a custom sequence generator, defined inside your orm.xml, such as this:

<sequence-generator name="mySequenceGenerator"

This declares that the database sequence named MY_SEQUENCE by having an initial value of 123 can be used a resource for database identifier generation, which the persistence engine should obtain 20 values each time it requires identifiers. (Note, though, that Hibernate Annotations, during the time of writing, ignores the initialValue setting.)

To use this identifier generator for the entity, use its title:

class name MyEntity {
  @Id @GeneratedValue(generator = "mySequenceGenerator")
  String id;

If anything else fails, you could write your personal custom ID generator and employ it inside your DAO's create(Entity entity) method. The ID sequence table might be something similar to

| sequence_name | initial_value | current_value | increment |
|           foo |          1001 |          2000 |       100 |

This would mean that IDs for table foo start at 1001 and therefore are incremented by 100 (so it's not necessary to call DB for every new table place).

That is what we are using with little problems.