Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » standalone sync plugin
standalone sync plugin [message #50980] Fri, 17 October 2008 07:11 Go to next message
Eclipse UserFriend
Originally posted by: lifemikey.gmail.com

I'd like to write a headless plugin to sync my data model with the
current DB.

For a plugin to work does the eclipse application need to be running or
is there a way to create a standalone plugin that just references some
jar files and does some action?

I would be using these types of classes to traverse the EMF model:

import org.eclipse.wst.rdb.internal.core.definition.DataModelElemen tFactory;
import org.eclipse.wst.rdb.internal.core.definition.DatabaseDefinit ion;
import
org.eclipse.wst.rdb.internal.models.sql.datatypes.CharacterS tringDataType;
import org.eclipse.wst.rdb.internal.models.sql.datatypes.DataType;
import org.eclipse.wst.rdb.internal.models.sql.schema.Database;
import org.eclipse.wst.rdb.internal.models.sql.schema.SQLObject;
import org.eclipse.wst.rdb.internal.models.sql.schema.Schema;
import org.eclipse.wst.rdb.internal.models.sql.tables.Column;
import org.eclipse.wst.rdb.internal.models.sql.tables.SQLTablesPack age;
import org.eclipse.wst.rdb.internal.models.sql.tables.Table;


Similiar to the traverse plugin mentioned here:
http://www.ibm.com/developerworks/db2/library/techarticle/dm -0807liu/

Thanks,
Mike
Re: standalone sync plugin [message #51009 is a reply to message #50980] Fri, 17 October 2008 17:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brianf.sybase.com

Hi Mike

That's an interesting use case. Can you provide some additional details?

It sounds (based on your description) that you're modifying the EMF Model
outside of the DTP tooling and then want a way to "push" those changes back
to the database. Is that a good summary?

You can definitely use the DTP code in a headless fashion, though I'm not
quite sure how do the syncing back to the original database.

Sounds like we'd need some kind of way to compare the external EMF model to
the model loaded at runtime, get the differences, generate DDL to make the
changes to the in-database objects, and apply the DDL.

Not sure we've really done that kind of thing yet, but it certainly sounds
like an interesting application of the DTP APIs.

If you could provide some additional details, maybe we can provide some
additional guidance.

--Fitz

"Mike Lamb" <lifemikey@gmail.com> wrote in message
news:gd9drs$gen$1@build.eclipse.org...
>
> I'd like to write a headless plugin to sync my data model with the current
> DB.
>
> For a plugin to work does the eclipse application need to be running or is
> there a way to create a standalone plugin that just references some jar
> files and does some action?
>
> I would be using these types of classes to traverse the EMF model:
>
> import
> org.eclipse.wst.rdb.internal.core.definition.DataModelElemen tFactory;
> import org.eclipse.wst.rdb.internal.core.definition.DatabaseDefinit ion;
> import
> org.eclipse.wst.rdb.internal.models.sql.datatypes.CharacterS tringDataType;
> import org.eclipse.wst.rdb.internal.models.sql.datatypes.DataType;
> import org.eclipse.wst.rdb.internal.models.sql.schema.Database;
> import org.eclipse.wst.rdb.internal.models.sql.schema.SQLObject;
> import org.eclipse.wst.rdb.internal.models.sql.schema.Schema;
> import org.eclipse.wst.rdb.internal.models.sql.tables.Column;
> import org.eclipse.wst.rdb.internal.models.sql.tables.SQLTablesPack age;
> import org.eclipse.wst.rdb.internal.models.sql.tables.Table;
>
>
> Similiar to the traverse plugin mentioned here:
> http://www.ibm.com/developerworks/db2/library/techarticle/dm -0807liu/
>
> Thanks,
> Mike
Re: standalone sync plugin [message #51040 is a reply to message #51009] Fri, 17 October 2008 19:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lifemikey.gmail.com

> It sounds (based on your description) that you're modifying the EMF
Model
> outside of the DTP tooling and then want a way to "push" those
changes back
> to the database. Is that a good summary?
>

Actually the other way.
I'm using the Rational Data Architect (DTP) tools for DB documentation.
When the DB schema changes I want to run a headless program to sync the
schema changes with the EMF model in Rational Data Architect.

Example 1:
In Table1 a new column was added:
Table1
NEWCOLUMN INTEGER NOT NULL

Example 2:
In Table1 COLUMN1 changes from INTEGER to BIGINT

Where would I find information on how to use DTP in a headless way?
I would want to add this to a schema creation process to make sure the
EMF model is in sync with the schema.

Thanks,
Mike
Re: standalone sync plugin [message #51094 is a reply to message #51040] Tue, 21 October 2008 17:49 Go to previous message
Larry Dunnell is currently offline Larry DunnellFriend
Messages: 19
Registered: July 2009
Junior Member
Mike,

The features of opening/creating datamodels and populating the model file
from the database are provided by Rational Data Architect and are not in
DTP. I recommend going through normal IBM support channels for your
questions to get the proper level of attention.

Larry
Re: standalone sync plugin [message #593594 is a reply to message #50980] Fri, 17 October 2008 17:20 Go to previous message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 500
Registered: July 2009
Senior Member
Hi Mike

That's an interesting use case. Can you provide some additional details?

It sounds (based on your description) that you're modifying the EMF Model
outside of the DTP tooling and then want a way to "push" those changes back
to the database. Is that a good summary?

You can definitely use the DTP code in a headless fashion, though I'm not
quite sure how do the syncing back to the original database.

Sounds like we'd need some kind of way to compare the external EMF model to
the model loaded at runtime, get the differences, generate DDL to make the
changes to the in-database objects, and apply the DDL.

Not sure we've really done that kind of thing yet, but it certainly sounds
like an interesting application of the DTP APIs.

If you could provide some additional details, maybe we can provide some
additional guidance.

--Fitz

"Mike Lamb" <lifemikey@gmail.com> wrote in message
news:gd9drs$gen$1@build.eclipse.org...
>
> I'd like to write a headless plugin to sync my data model with the current
> DB.
>
> For a plugin to work does the eclipse application need to be running or is
> there a way to create a standalone plugin that just references some jar
> files and does some action?
>
> I would be using these types of classes to traverse the EMF model:
>
> import
> org.eclipse.wst.rdb.internal.core.definition.DataModelElemen tFactory;
> import org.eclipse.wst.rdb.internal.core.definition.DatabaseDefinit ion;
> import
> org.eclipse.wst.rdb.internal.models.sql.datatypes.CharacterS tringDataType;
> import org.eclipse.wst.rdb.internal.models.sql.datatypes.DataType;
> import org.eclipse.wst.rdb.internal.models.sql.schema.Database;
> import org.eclipse.wst.rdb.internal.models.sql.schema.SQLObject;
> import org.eclipse.wst.rdb.internal.models.sql.schema.Schema;
> import org.eclipse.wst.rdb.internal.models.sql.tables.Column;
> import org.eclipse.wst.rdb.internal.models.sql.tables.SQLTablesPack age;
> import org.eclipse.wst.rdb.internal.models.sql.tables.Table;
>
>
> Similiar to the traverse plugin mentioned here:
> http://www.ibm.com/developerworks/db2/library/techarticle/dm -0807liu/
>
> Thanks,
> Mike
Re: standalone sync plugin [message #593612 is a reply to message #51009] Fri, 17 October 2008 19:23 Go to previous message
Mike Lamb is currently offline Mike LambFriend
Messages: 2
Registered: July 2009
Junior Member
> It sounds (based on your description) that you're modifying the EMF
Model
> outside of the DTP tooling and then want a way to "push" those
changes back
> to the database. Is that a good summary?
>

Actually the other way.
I'm using the Rational Data Architect (DTP) tools for DB documentation.
When the DB schema changes I want to run a headless program to sync the
schema changes with the EMF model in Rational Data Architect.

Example 1:
In Table1 a new column was added:
Table1
NEWCOLUMN INTEGER NOT NULL

Example 2:
In Table1 COLUMN1 changes from INTEGER to BIGINT

Where would I find information on how to use DTP in a headless way?
I would want to add this to a schema creation process to make sure the
EMF model is in sync with the schema.

Thanks,
Mike
Re: standalone sync plugin [message #593630 is a reply to message #51040] Tue, 21 October 2008 17:49 Go to previous message
Larry Dunnell is currently offline Larry DunnellFriend
Messages: 19
Registered: July 2009
Junior Member
Mike,

The features of opening/creating datamodels and populating the model file
from the database are provided by Rational Data Architect and are not in
DTP. I recommend going through normal IBM support channels for your
questions to get the proper level of attention.

Larry
Previous Topic:Run Procedure object in DB2 Express 9.5
Next Topic:unused import in OverrideTemplateDescriptor.java
Goto Forum:
  


Current Time: Fri Apr 19 23:25:21 GMT 2024

Powered by FUDForum. Page generated in 0.03146 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top