nextobjects-devel Mailing List for devaki-nextobjects (Page 3)
Status: Alpha
Brought to you by:
eflorent
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(41) |
Jun
(41) |
Jul
(8) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: <efl...@us...> - 2003-05-31 13:42:37
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace In directory sc8-pr-cvs1:/tmp/cvs-serv22383/src/org/devaki/nextobjects/workspace Modified Files: Workspace.java Log Message: CheckStyle + debug graphics. Index: Workspace.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/Workspace.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Workspace.java 11 Feb 2003 12:12:09 -0000 1.2 --- Workspace.java 31 May 2003 13:42:35 -0000 1.3 *************** *** 21,34 **** /** ! * <p>Title: Workspace</p> ! * <p>Description: </p> ! * <p>Copyright: GNU Public License</p> ! * <p>Company: devaki.org</p> ! * unascribed ! * */ public class Workspace { ! public Workspace() { --- 21,33 ---- /** ! * A workspace ! * @author Laurent Thevenet */ public class Workspace { ! ! /** ! * A workspace ! */ public Workspace() { |
From: <efl...@us...> - 2003-05-31 13:42:37
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv22383/src/org/devaki/nextobjects/util Modified Files: MeriseTransform.java ModelMan.java Log Message: CheckStyle + debug graphics. Index: MeriseTransform.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/MeriseTransform.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** MeriseTransform.java 28 May 2003 21:48:28 -0000 1.19 --- MeriseTransform.java 31 May 2003 13:42:34 -0000 1.20 *************** *** 37,40 **** --- 37,41 ---- import org.devaki.nextobjects.workspace.models.objects.Entity; import org.devaki.nextobjects.workspace.models.objects.Table; + import org.devaki.nextobjects.workspace.models.graphics.TableView; /** *************** *** 45,49 **** * */ - public class MeriseTransform { --- 46,49 ---- *************** *** 228,231 **** --- 228,232 ---- swapTable.getObjectView().setLocation(swapEntity.getObjectView().getLocation()); + ((TableView)swapTable.getObjectView()).setOldLocation(swapEntity.getObjectView().getLocation()); swapTable.getObjectView().setSize(swapEntity.getObjectView().getSize()); ModelMan.addTable(pDatabase,swapTable); Index: ModelMan.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/ModelMan.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ModelMan.java 31 May 2003 11:48:34 -0000 1.23 --- ModelMan.java 31 May 2003 13:42:34 -0000 1.24 *************** *** 18,24 **** */ - // todo : if autoincrement default ='' - // todo : id-table-parameters - // todo : auitoincrement=false <==> '' package org.devaki.nextobjects.util; --- 18,21 ---- *************** *** 61,70 **** [...2263 lines suppressed...] ! if (pModel != null) ! { ! Vector classes = pModel.getClasses(); ! Iterator iterator1 = classes.iterator(); ! while (iterator1.hasNext()) ! { ! BaseClass baseClass = (BaseClass) iterator1.next(); ! ((ClassView) baseClass.getObjectView()).autoResize(true); ! } ! Vector links = pModel.getLinks(); ! Iterator iterator2 = links.iterator(); ! while (iterator2.hasNext()) ! { ! BaseLine baseLine = (BaseLine) iterator2.next(); ! ((LineView) baseLine.getObjectView()).computeBestPoints(); ! } ! //pModel.getPanel().repaint(); ! } ! } } // end of class ModelMan |
From: <efl...@us...> - 2003-05-31 13:42:37
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/main In directory sc8-pr-cvs1:/tmp/cvs-serv22383/src/org/devaki/nextobjects/ui/main Modified Files: NOWorkspace.java Log Message: CheckStyle + debug graphics. Index: NOWorkspace.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/main/NOWorkspace.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NOWorkspace.java 24 May 2003 18:50:47 -0000 1.6 --- NOWorkspace.java 31 May 2003 13:42:34 -0000 1.7 *************** *** 45,95 **** */ ! public class NOWorkspace extends JTabbedPane implements MouseListener { ! public NOWorkspace() { ! super(); ! addMouseListener(this); ! } ! public void addPanel(JPanel pJPanel,String title) ! { ! this.add(pJPanel,title); ! } ! public void addTab(String title, Component component) { ! this.addTab(title, component, null); ! } ! ! public void addTab(String title, Component component, Icon extraIcon) { ! super.addTab(title, new CloseTabIcon(extraIcon), component); ! } ! public void mouseClicked(MouseEvent e) { ! int tabNumber=getUI().tabForCoordinate(this, e.getX(), e.getY()); ! ModelMan.setCurrentObject(null); ! if (tabNumber < 0) return; ! ModelMan.setCurrentModel((BaseModel)ModelMan.getModels() ! .elementAt(tabNumber)); ! Rectangle rect=((CloseTabIcon)getIconAt(tabNumber)).getBounds(); ! if (rect.contains(e.getX(), e.getY())) ! { ! if (ModelMan.close(ModelMan.getCurrentModel())) ! { ! if (ModelMan.getModels().size()>0) ! { ! ModelMan.setCurrentModel((BaseModel)ModelMan.getModels() ! .elementAt(this.getSelectedIndex())); ! } ! } ! } ! NOMenuBar.fixFileMenu(); ! NOMenuBar.fixEditMenu(); ! NOToolBar1.fixIcons(); ! NOToolBar2.fixIcons(); ! } ! public void mouseEntered(MouseEvent e) {} ! public void mouseExited(MouseEvent e) {} ! public void mousePressed(MouseEvent e) {} ! public void mouseReleased(MouseEvent e) {} } --- 45,152 ---- */ ! public class NOWorkspace extends JTabbedPane implements MouseListener ! { ! /** ! * constructor ! */ ! public NOWorkspace() ! { ! super(); ! addMouseListener(this); ! } ! /** ! * Add a panel ! * @param pJPanel the panel ! * @param title the title ! */ ! public void addPanel(JPanel pJPanel, String title) ! { ! this.add(pJPanel, title); ! } ! /** ! * add a tabbed pane ! * @param component the component ! * @param title the title ! */ ! public void addTab(String title, Component component) ! { ! this.addTab(title, component, null); ! } ! /** ! * add a tabbed pane ! * @param title title ! * @param component component ! * @param extraIcon icon ! */ ! public void addTab(String title, Component component, Icon extraIcon) ! { ! super.addTab(title, new CloseTabIcon(extraIcon), component); ! } ! /** ! * What to di when mouse clicked ! * @param e <code>MouseEvent</code> ! */ ! public void mouseClicked(MouseEvent e) ! { ! int tabNumber = getUI().tabForCoordinate(this, e.getX(), e.getY()); ! ModelMan.setCurrentObject(null); ! if (tabNumber < 0) ! return; ! ModelMan.setCurrentModel( ! (BaseModel) ModelMan.getModels().elementAt(tabNumber)); ! Rectangle rect = ((CloseTabIcon) getIconAt(tabNumber)).getBounds(); ! if (rect.contains(e.getX(), e.getY())) ! { ! if (ModelMan.close(ModelMan.getCurrentModel())) ! { ! if (ModelMan.getModels().size() > 0) ! { ! ModelMan.setCurrentModel( ! (BaseModel) ModelMan.getModels().elementAt( ! this.getSelectedIndex())); ! } ! } ! } ! NOMenuBar.fixFileMenu(); ! NOMenuBar.fixEditMenu(); ! NOToolBar1.fixIcons(); ! NOToolBar2.fixIcons(); ! } ! /** ! * What to di when mouse entered ! * actually do nothing ! * @param e <code>MouseEvent</code> ! */ ! public void mouseEntered(MouseEvent e) ! { ! } ! /** ! * What to di when mouse exited ! * actually do nothing ! * @param e <code>MouseEvent</code> ! */ ! public void mouseExited(MouseEvent e) ! { ! } ! /** ! * What to di when mouse pressed ! * actually do nothing ! * @param e <code>MouseEvent</code> ! */ ! public void mousePressed(MouseEvent e) ! { ! } ! /** ! * What to di when mouse released ! * actually do nothing ! * @param e <code>MouseEvent</code> ! */ ! public void mouseReleased(MouseEvent e) ! { ! } } *************** *** 99,152 **** * like in JBuilder. This value is null if no extra icon is required. */ ! class CloseTabIcon implements Icon { ! private int x_pos; ! private int y_pos; ! private int width; ! private int height; ! private Icon fileIcon; ! public CloseTabIcon(Icon fileIcon) { ! this.fileIcon=fileIcon; ! width=16; ! height=16; ! } ! public void paintIcon(Component c, Graphics g, int x, int y) { ! this.x_pos=x; ! this.y_pos=y; ! Color col=g.getColor(); ! g.setColor(Color.black); ! int y_p=y+2; ! g.drawLine(x+1, y_p, x+12, y_p); ! g.drawLine(x+1, y_p+13, x+12, y_p+13); ! g.drawLine(x, y_p+1, x, y_p+12); ! g.drawLine(x+13, y_p+1, x+13, y_p+12); ! g.drawLine(x+3, y_p+3, x+10, y_p+10); ! g.drawLine(x+3, y_p+4, x+9, y_p+10); ! g.drawLine(x+4, y_p+3, x+10, y_p+9); ! g.drawLine(x+10, y_p+3, x+3, y_p+10); ! g.drawLine(x+10, y_p+4, x+4, y_p+10); ! g.drawLine(x+9, y_p+3, x+3, y_p+9); ! g.setColor(col); ! if (fileIcon != null) { ! fileIcon.paintIcon(c, g, x+width, y_p); ! } ! } ! public int getIconWidth() { ! return width + (fileIcon != null? fileIcon.getIconWidth() : 0); ! } ! public int getIconHeight() { ! return height; ! } ! public Rectangle getBounds() { ! return new Rectangle(x_pos, y_pos, width, height); ! } } - - - --- 156,251 ---- * like in JBuilder. This value is null if no extra icon is required. */ ! class CloseTabIcon implements Icon ! { ! /** ! * X position ! */ ! private int x_pos; ! /** ! * Y position ! */ ! private int y_pos; ! /** ! * Width ! */ ! private int width; ! /** ! * Height ! */ ! private int height; ! /** ! * Icon ! */ ! private Icon fileIcon; ! /** ! * CloseTabIcon ! * @param fileIcon the file icon ! */ ! public CloseTabIcon(Icon fileIcon) ! { ! this.fileIcon = fileIcon; ! width = 16; ! height = 16; ! } ! /** ! * Paint icon ! * @param c component ! * @param g graphics g ! * @param x x ! * @param y y ! */ ! public void paintIcon(Component c, Graphics g, int x, int y) ! { ! this.x_pos = x; ! this.y_pos = y; ! Color col = g.getColor(); ! g.setColor(Color.black); ! int y_p = y + 2; ! g.drawLine(x + 1, y_p, x + 12, y_p); ! g.drawLine(x + 1, y_p + 13, x + 12, y_p + 13); ! g.drawLine(x, y_p + 1, x, y_p + 12); ! g.drawLine(x + 13, y_p + 1, x + 13, y_p + 12); ! g.drawLine(x + 3, y_p + 3, x + 10, y_p + 10); ! g.drawLine(x + 3, y_p + 4, x + 9, y_p + 10); ! g.drawLine(x + 4, y_p + 3, x + 10, y_p + 9); ! g.drawLine(x + 10, y_p + 3, x + 3, y_p + 10); ! g.drawLine(x + 10, y_p + 4, x + 4, y_p + 10); ! g.drawLine(x + 9, y_p + 3, x + 3, y_p + 9); ! g.setColor(col); ! if (fileIcon != null) ! { ! fileIcon.paintIcon(c, g, x + width, y_p); ! } ! } ! /** ! * get the icon width ! * @return the width ! */ ! public int getIconWidth() ! { ! return width + (fileIcon != null ? fileIcon.getIconWidth() : 0); ! } ! /** ! * get icon height ! * @return height ! */ ! public int getIconHeight() ! { ! return height; ! } ! /** ! * get the boundaries ! * @return bounds ! */ ! public Rectangle getBounds() ! { ! return new Rectangle(x_pos, y_pos, width, height); ! } } |
From: <efl...@us...> - 2003-05-31 12:07:36
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects In directory sc8-pr-cvs1:/tmp/cvs-serv10548/src/org/devaki/nextobjects/workspace/models/objects Modified Files: Association.java AssociationLink.java BaseClass.java BaseLine.java BaseObject.java Entity.java InheritanceLink.java Table.java Log Message: Buffered graphics Index: Association.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects/Association.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Association.java 11 Feb 2003 12:04:41 -0000 1.3 --- Association.java 31 May 2003 11:48:35 -0000 1.4 *************** *** 29,33 **** { /** Variables **/ - static int countInstance = 0; /** --- 29,32 ---- *************** *** 42,46 **** { super(pModel); - countInstance++; // Create the link between the associations and the table AssociationLink associationLink = new AssociationLink(this, --- 41,44 ---- *************** *** 56,63 **** // Set name and code this.name = new StringBuffer().append("Association ") ! .append(countInstance) .toString(); ! this.code = new StringBuffer().append("ASSOCIATION_") ! .append(countInstance) .toString(); // Set the object view --- 54,61 ---- // Set name and code this.name = new StringBuffer().append("Association ") ! .append(pModel.countAssociation()) .toString(); ! this.code = new StringBuffer().append("Association") ! .append(pModel.countAssociation()) .toString(); // Set the object view *************** *** 72,76 **** { super(pObject); - countInstance++; this.objectView = new AssociationView(this); } --- 70,73 ---- *************** *** 83,90 **** { super(pModel); ! countInstance++; // Set name and code ! this.name = "Association " + countInstance; ! this.code = "ASSOCIATION_"+ countInstance; // Set the object view this.objectView = new AssociationView(this); --- 80,87 ---- { super(pModel); ! // Set name and code ! this.name = "Association " + pModel.countAssociation(); ! this.code = "Association"+pModel.countAssociation(); // Set the object view this.objectView = new AssociationView(this); Index: AssociationLink.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects/AssociationLink.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AssociationLink.java 11 Feb 2003 12:04:41 -0000 1.2 --- AssociationLink.java 31 May 2003 11:48:35 -0000 1.3 *************** *** 27,33 **** { /** Variables **/ ! // Number of association links created ! private static int countAssociationLinks = 0; ! // ?? (It seems to be trhe default cardinality) private int card = ConceptualModel._0N_; --- 27,31 ---- { /** Variables **/ ! private int card = ConceptualModel._0N_; *************** *** 46,50 **** this.setName(new StringBuffer() .append("Association Link ") ! .append(++countAssociationLinks).toString()); // Set the object view this.objectView = new AssociationLinkView(this); --- 44,48 ---- this.setName(new StringBuffer() .append("Association Link ") ! .append(((ConceptualModel)pEntity.getMyModel()).countAssociationLinks()).toString()); // Set the object view this.objectView = new AssociationLinkView(this); Index: BaseClass.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects/BaseClass.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** BaseClass.java 5 Apr 2003 14:14:23 -0000 1.10 --- BaseClass.java 31 May 2003 11:48:35 -0000 1.11 *************** *** 25,35 **** import org.devaki.nextobjects.workspace.models.columns.Column; ! /** * - * <p>Title: </p> - * <p>Description: </p> - * <p>Copyright: GNU Public License</p> - * <p>Company: devaki.org</p> */ public class BaseClass extends BaseObject implements Serializable { --- 25,35 ---- import org.devaki.nextobjects.workspace.models.columns.Column; ! /* ! * Object of type "class" ! * ! * @author eflorent * */ + public class BaseClass extends BaseObject implements Serializable { *************** *** 57,61 **** /** ! * Construct a standard nextGraphicsObject */ public BaseClass() --- 57,61 ---- /** ! * Construct a standard BaseClass */ public BaseClass() Index: BaseLine.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects/BaseLine.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BaseLine.java 11 Feb 2003 12:04:41 -0000 1.2 --- BaseLine.java 31 May 2003 11:48:35 -0000 1.3 *************** *** 23,33 **** import org.devaki.nextobjects.workspace.models.BaseModel; - /** - * - * <p>Title: </p> - * <p>Description: </p> - * <p>Copyright: GNU Public License</p> - * <p>Company: devaki.org</p> - */ public class BaseLine extends BaseObject implements Serializable { --- 23,26 ---- Index: BaseObject.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects/BaseObject.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BaseObject.java 11 Feb 2003 12:04:41 -0000 1.2 --- BaseObject.java 31 May 2003 11:48:35 -0000 1.3 *************** *** 26,56 **** import org.devaki.nextobjects.workspace.models.graphics.ObjectView; ! /** * - * <p>Title: </p> - * <p>Description: </p> - * <p>Copyright: GNU Public License</p> - * <p>Company: devaki.org</p> */ public class BaseObject implements Serializable { ! /** Variables **/ ! // General protected String name = ""; protected String code = ""; private String description = ""; private String notes = ""; ! ! // Number of nextGraphicsObject created ! private static int countBaseObjects = 0; ! // Fields ! protected Vector data = new Vector(1); ! // Model associated protected BaseModel myModel; ! // Node associated private transient CustomTreeNode customTreeNode; ! // Graphics representation protected ObjectView objectView; ! // Has the data of the object been modified private boolean dataChanged = false; --- 26,80 ---- import org.devaki.nextobjects.workspace.models.graphics.ObjectView; ! /* ! * Objects of the models. ! * ! * @author eflorent * */ + public class BaseObject implements Serializable { ! /* ! * The name ! */ protected String name = ""; + /* + * The code + */ protected String code = ""; + /* + * The description + */ private String description = ""; + + /* + * Notes + */ private String notes = ""; ! ! /* ! * Coumns associated ! */ ! protected Vector columns = new Vector(1); ! ! /* ! * Model associated ! */ protected BaseModel myModel; ! ! /* ! *Nodel associated ! */ private transient CustomTreeNode customTreeNode; ! ! /* ! * Graphics representation ! */ protected ObjectView objectView; ! ! /* ! * Has the data of the object been modified ! */ ! private boolean dataChanged = false; *************** *** 58,65 **** * Construct a standard nextGraphicsObject */ ! public BaseObject() ! { ! countBaseObjects++; ! } /** --- 82,86 ---- * Construct a standard nextGraphicsObject */ ! public BaseObject() { } /** *************** *** 70,74 **** { this.myModel = pModel; - countBaseObjects++; } --- 91,94 ---- *************** *** 82,87 **** this.setCode(pObject.getCode()); this.setDescription(pObject.getDescription()); ! this.setNotes(pObject.getNotes()); ! countBaseObjects++; } --- 102,106 ---- this.setCode(pObject.getCode()); this.setDescription(pObject.getDescription()); ! this.setNotes(pObject.getNotes());; } *************** *** 105,109 **** /** ! * Returns a String representation of the nextGraphicsObject * @return */ --- 124,130 ---- /** ! * Returns a String representation of the object ! * Really usefull in the treeview ow/ would avoid. ! * * @return */ *************** *** 231,235 **** public Vector getData() { ! return this.data; } --- 252,256 ---- public Vector getData() { ! return this.columns; } Index: Entity.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects/Entity.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Entity.java 11 Feb 2003 12:04:41 -0000 1.3 --- Entity.java 31 May 2003 11:48:35 -0000 1.4 *************** *** 27,33 **** public class Entity extends BaseClass implements Serializable { ! /** Variables **/ ! // Number of 'Entity' objects created ! private static int countEntities = 0; //Subsequent Table transient private Table subSequentTable; --- 27,31 ---- public class Entity extends BaseClass implements Serializable { ! //Subsequent Table transient private Table subSequentTable; *************** *** 41,45 **** { super(pObject); - countEntities++; this.objectView = new EntityView(this); } --- 39,42 ---- *************** *** 52,61 **** { super(pModel); - countEntities++; this.name = new StringBuffer().append("Entity ") ! .append(countEntities) .toString(); ! this.code = new StringBuffer().append("ENTITY_") ! .append(countEntities) .toString(); this.objectView = new EntityView(this); --- 49,57 ---- { super(pModel); this.name = new StringBuffer().append("Entity ") ! .append(pModel.countEntities()) .toString(); ! this.code = new StringBuffer().append("Entity") ! .append(pModel.countEntities()) .toString(); this.objectView = new EntityView(this); Index: InheritanceLink.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects/InheritanceLink.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** InheritanceLink.java 6 Apr 2003 14:19:29 -0000 1.4 --- InheritanceLink.java 31 May 2003 11:48:35 -0000 1.5 *************** *** 30,47 **** - /** - * <p>Titre : </p> - * <p>Description : </p> - * <p>Copyright: GNU Public License</p> - * <p>Company: devaki.org</p> - * @author non attribu\uFFFD - * @version 1.0 - */ - public class InheritanceLink extends BaseLine implements Serializable { /** Variables **/ - private static int countInstance=0; private static String key=null; --- 30,37 ---- *************** *** 58,62 **** objectView = new InheritanceLinkView(this); this.setName(new StringBuffer().append("Inheritance Link ") ! .append(countInstance++) .toString()); } --- 48,53 ---- objectView = new InheritanceLinkView(this); this.setName(new StringBuffer().append("Inheritance Link ") ! ! .append(pChildClass.toString()) .toString()); } *************** *** 68,72 **** { super(pObject); - countInstance++; objectView= new InheritanceLinkView(this); this.parentClass=pObject.getParentClass(); --- 59,62 ---- *************** *** 77,81 **** } this.objectView = new InheritanceLinkView(this); - } --- 67,70 ---- *************** *** 88,95 **** objectView= new InheritanceLinkView(this); this.setName(new StringBuffer().append("Inheritance Link ") ! .append(countInstance++) .toString()); - } /* * get the primary Key of the Child Class --- 77,84 ---- objectView= new InheritanceLinkView(this); this.setName(new StringBuffer().append("Inheritance Link ") ! .append(childClass.toString()) .toString()); } + /* * get the primary Key of the Child Class Index: Table.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects/Table.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Table.java 28 May 2003 21:48:29 -0000 1.5 --- Table.java 31 May 2003 11:48:35 -0000 1.6 *************** *** 26,41 **** import org.devaki.nextobjects.workspace.models.graphics.TableView; ! /** ! * ! * <p>Title: Table</p> ! * <p>Description: </p> ! * <p>Copyright: GNU Public License</p> ! * <p>Company: devaki.org</p> ! */ public class Table extends BaseClass implements Serializable { ! /** Variables **/ ! // Number of tables created ! private static int countTables = 0; public Vector constraints=new Vector(1); --- 26,37 ---- import org.devaki.nextobjects.workspace.models.graphics.TableView; ! public class Table extends BaseClass implements Serializable { ! /* ! * Linked constraints. ! * ! * */ ! public Vector constraints=new Vector(1); *************** *** 47,51 **** { super(pObject); - countTables++; objectView = new TableView(this); } --- 43,46 ---- *************** *** 58,64 **** { super(pModel); ! countTables++; ! setName(new StringBuffer().append("table ").append(countTables).toString()); ! setCode(new StringBuffer().append("table_").append(countTables).toString()); objectView = new TableView(this); } --- 53,58 ---- { super(pModel); ! setName(new StringBuffer().append("table ").append(pModel.countTable()).toString()); ! setCode(new StringBuffer().append("table_").append(pModel.countTable()).toString()); objectView = new TableView(this); } *************** *** 67,70 **** --- 61,65 ---- /** * Get the foreign keys + * @task use "to be created" Column.isFk() instead of constraints child test. * @return */ |
From: <efl...@us...> - 2003-05-31 12:00:41
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics In directory sc8-pr-cvs1:/tmp/cvs-serv18415/src/org/devaki/nextobjects/workspace/models/graphics Modified Files: ConceptualView.java Log Message: Buffered graphics Index: ConceptualView.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics/ConceptualView.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ConceptualView.java 31 May 2003 11:48:34 -0000 1.17 --- ConceptualView.java 31 May 2003 12:00:37 -0000 1.18 *************** *** 197,201 **** fullRefresh = false; } ! g2.drawImage( bi, --- 197,202 ---- fullRefresh = false; } ! if (bi!=null) ! { g2.drawImage( bi, *************** *** 203,206 **** --- 204,208 ---- (int) jScrollPane.getViewport().getViewPosition().getY(), this); + } // loop/paint selected objects objects toviewPort panel. |
From: <efl...@us...> - 2003-05-31 11:54:49
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects In directory sc8-pr-cvs1:/tmp/cvs-serv10548 Modified Files: build.xml Log Message: Buffered graphics Index: build.xml =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/build.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** build.xml 26 May 2003 17:15:53 -0000 1.10 --- build.xml 31 May 2003 11:48:33 -0000 1.11 *************** *** 74,78 **** <javac srcdir="${source.home}" destdir="${build.home}" ! debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}"> --- 74,78 ---- <javac srcdir="${source.home}" destdir="${build.home}" ! debug="on" deprecation="${compile.deprecation}" optimize="${compile.optimize}"> |
From: <efl...@us...> - 2003-05-31 11:52:22
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models In directory sc8-pr-cvs1:/tmp/cvs-serv10548/src/org/devaki/nextobjects/workspace/models Modified Files: ConceptualModel.java Log Message: Buffered graphics Index: ConceptualModel.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/ConceptualModel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ConceptualModel.java 24 May 2003 18:50:47 -0000 1.4 --- ConceptualModel.java 31 May 2003 11:48:34 -0000 1.5 *************** *** 30,235 **** import org.devaki.nextobjects.workspace.models.objects.Entity; ! public class ConceptualModel extends BaseModel implements Serializable { ! /** Variables **/ ! // Lists of objects in the model ! private Vector entities = new Vector(); ! private Vector associations = new Vector(); ! private Vector associationLinks = new Vector(); ! ! // Different cards ! // for association links ! public final static int _01_ = 0; ! public final static int _11_ = 1; ! public final static int _0N_ = 2; ! public final static int _1N_ = 3; ! // for a model ! public final static int _NM_ = 4; // ! ! // Graphical View ! private ConceptualView myConceptualView; ! /** ! * Construct a new 'ConceptualModel' object ! * @param pName Name of the model ! */ ! public ConceptualModel(String pName) ! { ! super(pName); ! } ! /* ! /** ! * Return the best possible filename for save ! * @return ! */ ! public String getBestFilename() ! { ! if (this.getFileForSave() == null) ! { ! return (new StringBuffer().append(this.getCode()) ! .append(".cdm")) ! .toString(); ! } ! else ! { ! return this.getFileForSave(); ! } ! } ! /* ! * Conveniency method wich return all the links to draw ! * in this models. ! */ ! public LineView[] getModelLinks() { ! LineView[] links=new LineView[ associationLinks.size() ! +getInheritanceLinks().size()]; ! for (int i = 0; i < associationLinks.size(); i++) ! { ! links[i]=(LineView)getAssociationLinkAt(i).getObjectView(); ! } ! for ( int j=associationLinks.size(); ! j<getInheritanceLinks().size()+associationLinks.size();j++) ! { ! links[j]=(LineView) getInheritanceLinkAt(j-associationLinks.size()) ! .getObjectView(); ! } ! return links; ! } ! /* ! * Conveniency method wich return all the objects in the models ! * in this models. -- OPTIMIZABLE, SUPPRESIBLE ! */ ! public BaseObject[] getModel0bjects() { ! BaseObject[] baseObjects=new BaseObject[ associationLinks.size() ! +getInheritanceLinks().size() ! + entities.size() ! + associations.size() ! ]; ! int offset=0; ! for (int i = 0; i < associationLinks.size(); i++) ! { ! baseObjects[offset]=getAssociationLinkAt(i); ! offset++; ! } ! for (int i=0; i<getInheritanceLinks().size();i++) ! { ! baseObjects[offset]=getInheritanceLinkAt(i); ! offset++; ! } ! for (int i=0; i<associations.size();i++) ! { ! baseObjects[offset]=getAssociationAt(i); ! offset++; ! } ! for (int i=0; i<entities.size();i++) ! { ! baseObjects[offset]=getEntityAt(i); ! offset++; ! } ! return baseObjects; ! } ! /** ! * Return the graphics view of the model ! * @return ! */ ! public ConceptualView getConceptualView() { return this.myConceptualView; } ! /** ! * Return the associations of the model ! * @return ! */ ! public Vector getAssociations() { return this.associations; } ! /** ! * Return the entities of the model ! * @return ! */ ! public Vector getEntities() { return this.entities; } ! /** ! * Return the association links of the model ! * @return ! */ ! public Vector getAssociationLinks() { return this.associationLinks; } ! /** ! * Return the association identified by the parameter in the list ! * of associations. ! * @param at ! * @return ! */ ! public Association getAssociationAt(int at) ! { ! return (Association)this.associations.elementAt(at); ! } ! /** ! * Return the entity identified by the parameter in the list ! * of entities. ! * @param at ! * @return ! */ ! public Entity getEntityAt(int at) ! { ! return (Entity)this.entities.elementAt(at); ! } ! public Entity getEntity(String pString) ! { ! Entity tmp=null; ! for (int i=0;i<entities.size();i++) { ! if (((Entity)this.entities.elementAt(i)).getCode().equals(pString)) { ! tmp=(Entity)this.entities.elementAt(i); ! } ! } ! return tmp; ! } ! /** ! * Return the association link identified by the parameter in the list ! * of entities. ! * @param at ! * @return ! */ ! public AssociationLink getAssociationLinkAt(int at) ! { ! return (AssociationLink)this.associationLinks.elementAt(at); ! } ! /** ! * Set the conceptual view of the model ! * @param pConceptualView ! */ ! public void setConceptualView(ConceptualView pConceptualView) ! { ! this.myConceptualView = pConceptualView; ! } ! /** ! * Return the number of entities in the model ! * @return ! */ ! public int countEntity () { return this.entities.size(); } ! /** ! * Return the number of associations in the model ! * @return ! */ ! public int countAssociation () { return this.associations.size(); } ! /** ! * Return the number of association links in the model ! * @return ! */ ! public int countAssociationLinks () { return this.associationLinks.size(); } } --- 30,291 ---- import org.devaki.nextobjects.workspace.models.objects.Entity; ! /** ! * The Conceptual Data Model ! * @author efl...@de... ! */ public class ConceptualModel extends BaseModel implements Serializable { ! /** ! * The entities ! */ ! private Vector entities = new Vector(); ! /** ! * The associations ! */ ! private Vector associations = new Vector(); ! /** ! * The association links ! */ ! private Vector associationLinks = new Vector(); + /** + * cards + */ + public final static int _01_ = 0; + /** + * cards + */ + public final static int _11_ = 1; + /** + * cards + */ + public final static int _0N_ = 2; + /** + * cards + */ + public final static int _1N_ = 3; + /** + * cards (for a model only) + */ + public final static int _NM_ = 4; // ! /** ! * Graphical View ! */ ! private ConceptualView myConceptualView; ! /** ! * Construct a new 'ConceptualModel' object ! * @param pName Name of the model ! */ ! public ConceptualModel(String pName) ! { ! super(pName); ! } ! /** ! * Return the best possible filename for save ! * @return the best filename ! */ ! public String getBestFilename() ! { ! if (this.getFileForSave() == null) ! { ! return (new StringBuffer().append(this.getCode()).append(".cdm")) ! .toString(); ! } else ! { ! return this.getFileForSave(); ! } ! } ! /** ! * Conveniency method wich return all the links to draw ! * in this models. ! * @return the line views ! */ ! public LineView[] getModelLinks() ! { ! LineView[] links = ! new LineView[associationLinks.size() ! + getInheritanceLinks().size()]; ! for (int i = 0; i < associationLinks.size(); i++) ! { ! links[i] = (LineView) getAssociationLinkAt(i).getObjectView(); ! } ! for (int j = associationLinks.size(); ! j < getInheritanceLinks().size() + associationLinks.size(); ! j++) ! { ! links[j] = ! (LineView) getInheritanceLinkAt(j - associationLinks.size()) ! .getObjectView(); ! } ! return links; ! } ! /** ! * Conveniency method wich return all the objects in the models ! * in this models. ! * @return the base objects ! */ ! public BaseObject[] getModel0bjects() ! { ! BaseObject[] baseObjects = ! new BaseObject[associationLinks.size() ! + getInheritanceLinks().size() ! + entities.size() ! + associations.size()]; ! int offset = 0; ! for (int i = 0; i < associationLinks.size(); i++) ! { ! baseObjects[offset] = getAssociationLinkAt(i); ! offset++; ! } ! for (int i = 0; i < getInheritanceLinks().size(); i++) ! { ! baseObjects[offset] = getInheritanceLinkAt(i); ! offset++; ! } ! for (int i = 0; i < associations.size(); i++) ! { ! baseObjects[offset] = getAssociationAt(i); ! offset++; ! } ! for (int i = 0; i < entities.size(); i++) ! { ! baseObjects[offset] = getEntityAt(i); ! offset++; ! } ! return baseObjects; ! } ! /** ! * Return the graphics view of the model ! * @return the graphic view ! */ ! public ConceptualView getConceptualView() ! { ! return this.myConceptualView; ! } + /** + * Return the associations of the model + * @return the associations + */ + public Vector getAssociations() + { + return this.associations; + } + /** + * Return the entities of the model + * @return the entities + */ + public Vector getEntities() + { + return this.entities; + } ! /** ! * Return the association links of the model ! * @return the associations links ! */ ! public Vector getAssociationLinks() ! { ! return this.associationLinks; ! } ! /** ! * Return the association identified by the parameter in the list ! * of associations. ! * @param at index ! * @return the association ! */ ! public Association getAssociationAt(int at) ! { ! return (Association) this.associations.elementAt(at); ! } ! /** ! * Return the entity identified by the parameter in the list ! * of entities. ! * @param at the index ! * @return entity ! */ ! public Entity getEntityAt(int at) ! { ! return (Entity) this.entities.elementAt(at); ! } ! /** ! * Return a entity for code ! * @param pString the string ! * @return the entity ! */ ! public Entity getEntity(String pString) ! { ! Entity tmp = null; ! for (int i = 0; i < entities.size(); i++) ! { ! if (((Entity) this.entities.elementAt(i)) ! .getCode() ! .equals(pString)) ! { ! tmp = (Entity) this.entities.elementAt(i); ! } ! } ! return tmp; ! } ! /** ! * Return the association link identified by the parameter in the list ! * of entities. ! * @param at index ! * @return the association link ! */ ! public AssociationLink getAssociationLinkAt(int at) ! { ! return (AssociationLink) this.associationLinks.elementAt(at); ! } ! /** ! * Set the conceptual view of the model ! * @param pConceptualView the graphics view ! */ ! public void setConceptualView(ConceptualView pConceptualView) ! { ! this.myConceptualView = pConceptualView; ! } ! /** ! * Return the number of entities in the model ! * @return the count ! */ ! public int countEntities() ! { ! return this.entities.size(); ! } ! /** ! * Return the number of associations in the model ! * @return the count ! */ ! public int countAssociation() ! { ! return this.associations.size(); ! } ! /** ! * Return the number of association links in the model ! * @return the count ! */ ! public int countAssociationLinks() ! { ! return this.associationLinks.size(); ! } } |
From: <efl...@us...> - 2003-05-31 11:52:22
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv10548/src/org/devaki/nextobjects/util Modified Files: ModelMan.java NORedoLog.java NOXMLFactory.java Log Message: Buffered graphics Index: ModelMan.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/ModelMan.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ModelMan.java 24 May 2003 18:50:47 -0000 1.22 --- ModelMan.java 31 May 2003 11:48:34 -0000 1.23 *************** *** 155,159 **** addAssociation(pMerise,pMerise.getAssociationAt(i)); } ! for (int i=0; i < pMerise.countEntity(); i++ ) { addEntity(pMerise,pMerise.getEntityAt(i)); --- 155,159 ---- addAssociation(pMerise,pMerise.getAssociationAt(i)); } ! for (int i=0; i < pMerise.countEntities(); i++ ) { addEntity(pMerise,pMerise.getEntityAt(i)); *************** *** 812,816 **** /** ! * Move an object * @param xi * @param yi --- 812,816 ---- /** ! * Move all selected objects and log it * @param xi * @param yi *************** *** 820,831 **** for (int i=0;i<currentObjects.size();i++) { ! BaseObject tmpObject=(BaseObject)currentObjects.elementAt(i); if (tmpObject.getObjectView() instanceof ClassView) { ! Point p = tmpObject.getObjectView().getLocation(); ! p.setLocation(p.x + xi ,p.y + yi); ! tmpObject.getObjectView().setLocation(p); tmpObject.getObjectView().resetSelectionPoint(); ! currentModel.redoLog.log(NORedoLog.ACTION_MOVE,tmpObject,xi,yi); } } --- 820,844 ---- for (int i=0;i<currentObjects.size();i++) { ! BaseObject tmpObject=(BaseObject)currentObjects.elementAt(i); if (tmpObject.getObjectView() instanceof ClassView) { ! Point oldPoint = ((ClassView)tmpObject.getObjectView()).getOldrectangle().getLocation(); ! if (oldPoint.x==0) ! { ! Point exptPoint=((ClassView)tmpObject.getObjectView()).getLocation(); ! oldPoint.setLocation(new Point(exptPoint.x-xi,exptPoint.y-yi)); ! } ! Point newPoint=new Point(oldPoint.x + xi ,oldPoint.y + yi); ! ! ((ClassView)tmpObject.getObjectView()).setLocation(newPoint); ! Point newOldLocation=((ClassView)tmpObject.getObjectView()).getLocation(); ! ((ClassView)tmpObject.getObjectView()).setOldLocation(newOldLocation); ! tmpObject.getObjectView().resetSelectionPoint(); ! if (!(xi==0 && yi ==0)) ! { ! currentModel.redoLog.log(NORedoLog.ACTION_MOVE,tmpObject,xi,yi); ! } ! } } Index: NORedoLog.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NORedoLog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NORedoLog.java 3 May 2003 19:38:14 -0000 1.2 --- NORedoLog.java 31 May 2003 11:48:34 -0000 1.3 *************** *** 37,49 **** * There is a redo stack and an undo stack. Undoing activate the redo stack * while doing something activate the undo stack. ! * @author : Emmanuel Florent */ public class NORedoLog { - - /* - * The size of two redo stack. - * This might be taken from prefs easily when we have prefs. - */ /* --- 37,44 ---- * There is a redo stack and an undo stack. Undoing activate the redo stack * while doing something activate the undo stack. ! * @author : efl...@de... */ public class NORedoLog { /* Index: NOXMLFactory.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NOXMLFactory.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** NOXMLFactory.java 24 May 2003 18:50:47 -0000 1.10 --- NOXMLFactory.java 31 May 2003 11:48:34 -0000 1.11 *************** *** 85,89 **** // work on entities ! for (int i=0;i<pCDM.countEntity();i++) { Element tmpElementEntity=writeBaseClass(pCDM.getEntityAt(i),"entity"); --- 85,89 ---- // work on entities ! for (int i=0;i<pCDM.countEntities();i++) { Element tmpElementEntity=writeBaseClass(pCDM.getEntityAt(i),"entity"); |
From: <efl...@us...> - 2003-05-31 11:52:19
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/components In directory sc8-pr-cvs1:/tmp/cvs-serv10548/src/org/devaki/nextobjects/ui/components Modified Files: CustomButton.java Log Message: Buffered graphics Index: CustomButton.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/components/CustomButton.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CustomButton.java 11 Feb 2003 12:04:41 -0000 1.2 --- CustomButton.java 31 May 2003 11:48:33 -0000 1.3 *************** *** 23,27 **** * @param tooltipText Text that appears as a Tool Tip * @param isEnabled Is the button enabled or not ! * @param type Is the button font small or not */ public CustomButton(final String text, --- 23,27 ---- * @param tooltipText Text that appears as a Tool Tip * @param isEnabled Is the button enabled or not ! * @param isSmall Is the button font small or not */ public CustomButton(final String text, |
From: <efl...@us...> - 2003-05-28 21:48:36
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects In directory sc8-pr-cvs1:/tmp/cvs-serv3855/src/org/devaki/nextobjects/workspace/models/objects Modified Files: Table.java Log Message: Checkstyle/refactor in MeriseTransform.java +++ I get an error while refactoring causing large commit .+++ Modified Files: src/org/devaki/nextobjects/util/MeriseTransform.java Index: Table.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/objects/Table.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Table.java 6 Apr 2003 14:19:29 -0000 1.4 --- Table.java 28 May 2003 21:48:29 -0000 1.5 *************** *** 12,16 **** of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 --- 12,16 ---- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 *************** *** 50,54 **** objectView = new TableView(this); } ! /** * Construct a new 'Table' object --- 50,54 ---- objectView = new TableView(this); } ! /** * Construct a new 'Table' object |
From: <efl...@us...> - 2003-05-28 21:48:36
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/menus In directory sc8-pr-cvs1:/tmp/cvs-serv3855/src/org/devaki/nextobjects/ui/menus Modified Files: NOMenuBar.java Log Message: Checkstyle/refactor in MeriseTransform.java +++ I get an error while refactoring causing large commit .+++ Modified Files: src/org/devaki/nextobjects/util/MeriseTransform.java Index: NOMenuBar.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/menus/NOMenuBar.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NOMenuBar.java 24 May 2003 18:50:47 -0000 1.11 --- NOMenuBar.java 28 May 2003 21:48:27 -0000 1.12 *************** *** 31,35 **** import javax.swing.JSeparator; import javax.swing.KeyStroke; - import org.devaki.nextobjects.NextObjects; import org.devaki.nextobjects.constants.CstImages; import org.devaki.nextobjects.ui.components.CustomMenu; --- 31,34 ---- *************** *** 41,45 **** import org.devaki.nextobjects.util.ModelMan; import org.devaki.nextobjects.util.EditorFactory; - //import org.devaki.nextobjects.util.NORecentFile; import org.devaki.nextobjects.util.NOClipboard; import org.devaki.nextobjects.util.NOXMLFactory; --- 40,43 ---- *************** *** 340,357 **** } }); - jCheckBoxMenuItemEnableLogging.setEnabled(false); - jCheckBoxMenuItemEnableLogging.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - NOTools.enableLogging = !NOTools.enableLogging; - if (!NOTools.enableLogging) { - NextObjects.disableLogging(); - } else { - NextObjects.enableLogging(); - } - } - }); jMenuItemVerify.addActionListener(new ActionListener() { --- 338,342 ---- *************** *** 365,369 **** public void actionPerformed(ActionEvent e) { ! MeriseTransform.genPhysical((ConceptualModel)ModelMan.getCurrentModel()); } }); --- 350,354 ---- public void actionPerformed(ActionEvent e) { ! MeriseTransform.cdm2pdm((ConceptualModel)ModelMan.getCurrentModel()); } }); |
From: <efl...@us...> - 2003-05-28 21:48:36
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv3855/src/org/devaki/nextobjects/util Modified Files: MeriseTransform.java NOTools.java TorqueWrapper.java Log Message: Checkstyle/refactor in MeriseTransform.java +++ I get an error while refactoring causing large commit .+++ Modified Files: src/org/devaki/nextobjects/util/MeriseTransform.java Index: MeriseTransform.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/MeriseTransform.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MeriseTransform.java 26 May 2003 17:48:51 -0000 1.18 --- MeriseTransform.java 28 May 2003 21:48:28 -0000 1.19 *************** *** 38,75 **** import org.devaki.nextobjects.workspace.models.objects.Table; public class MeriseTransform { ! // Logger ! private static Category logger ! = Logger.getInstance(MeriseTransform.class.getName()); ! ! public MeriseTransform() ! { ! } /** * Generate a PDM from the current CDM * @param aMerise */ ! public static void genPhysical(ConceptualModel aMerise) { ! ConceptualModel myMerise=aMerise; ! File tmp; ! ! tmp=new File (NOTools.TMP_DIR + "temp.erd"); ! CDMVerifier.verify(aMerise); ! if (aMerise.isVerified) { ! ConceptualModel anotherMerise=null; ! tmp=new File (NOTools.TMP_DIR + File.separator + "temp.erd"); ! // first I save the erd int temp. try { ! ObjectOutputStream flux = ! new ObjectOutputStream(new FileOutputStream(tmp)); ! flux.writeObject(myMerise); flux.flush(); flux.close(); --- 38,101 ---- import org.devaki.nextobjects.workspace.models.objects.Table; + /** + * The class responsible of all the CDM2PDM work. + * + * @see http://www.devaki.org/transformation.html + * @author efl...@de... + * + */ + public class MeriseTransform { ! /* ! * The logger from the log4j project ! */ ! private static Category logger ! = Logger.getInstance(MeriseTransform.class.getName()); ! /* ! * Dummy constructor ! */ ! public MeriseTransform() { } /** * Generate a PDM from the current CDM + * * @param aMerise */ ! public static PhysicalModel cdm2pdm(ConceptualModel pConceptualModel) { ! /* ! * Temporary CDM where we are going to pick all the objects. ! */ ! ConceptualModel anotherMerise=null; ! ! /* ! * The returned physical model ! */ ! PhysicalModel db=new PhysicalModel("--///--"); ! /* ! * The temp file. ! */ ! File tmpFile=null; ! ! logger.warn("Using EXPERIMENTAL merise transform"); ! ! try { ! tmpFile=File.createTempFile("erd","cdm"); ! } catch (Exception ioex) { ! logger.error("Unable to write temp-file - check space left on device:" ); ! logger.error(ioex.getLocalizedMessage()); ! } + if (CDMVerifier.verify(pConceptualModel)) + { try { ! ObjectOutputStream flux = ! new ObjectOutputStream(new FileOutputStream(tmpFile)); ! flux.writeObject(pConceptualModel); flux.flush(); flux.close(); *************** *** 77,90 **** catch (Exception ioex) { ! logger.error("Unable to save temporary file " + tmp); } - - // then reload. try { ! ObjectInputStream flux=new ObjectInputStream(new FileInputStream(tmp)); anotherMerise=(ConceptualModel)flux.readObject(); flux.close(); } catch (Exception ioex) --- 103,115 ---- catch (Exception ioex) { ! logger.error("Unable to save temporary file " + tmpFile); } // then reload. try { ! ObjectInputStream flux=new ObjectInputStream(new FileInputStream(tmpFile)); anotherMerise=(ConceptualModel)flux.readObject(); flux.close(); + tmpFile.delete(); } catch (Exception ioex) *************** *** 92,102 **** logger.error("I can't understand file : " + ioex ); } ! ! PhysicalModel db=new PhysicalModel("--///--"); ! ModelMan.newPhysicalDatamodel(db); ! ModelMan.setCurrentModel(db); ! MeriseTransform.deduceDatabase(db,anotherMerise); ! ModelMan.resizeModelObjects(db); ! db.getPhysicalView().repaint(); } else --- 117,131 ---- logger.error("I can't understand file : " + ioex ); } ! ! if (anotherMerise!=null) { ! ModelMan.newPhysicalDatamodel(db); ! ModelMan.setCurrentModel(db); ! MeriseTransform.initDatabase(db,anotherMerise); ! MeriseTransform.applyRule_00_(db,anotherMerise); ! ModelMan.resizeModelObjects(db); ! db.getPhysicalView().repaint(); ! } else { ! logger.error("Giving up :("); ! } } else *************** *** 105,175 **** logger.error("I can't continue because the model is wrong."); } } ! public static PhysicalModel deduceDatabase (PhysicalModel theDatabase, ConceptualModel pMerise) { - logger.warn("Using EXPERIMENTAL merise transform"); //PhysicalModel theDatabase=new PhysicalModel(pMerise.getName()); ! theDatabase.setName(pMerise.getName()); ! theDatabase.setCode(pMerise.getCode()); ! theDatabase.setDefaultIdMethod(pMerise.getDefaultIdMethod()); ! theDatabase.setDefaultJavaType(pMerise.getDefaultJavaType()); ! theDatabase.setPackageName(pMerise.getPackageName()); ! theDatabase.setBaseClass(pMerise.getBaseClass()); ! theDatabase.setBasePeer(pMerise.getBasePeer()); ! theDatabase.setDefaultJavaNamingMethod(pMerise.getDefaultJavaNamingMethod()); ! theDatabase.setHeavyIndexing(pMerise.getHeavyIndexing()); ! theDatabase.setDescription(pMerise.getDescription()); ! theDatabase.setNotes(pMerise.getNotes()); ! theDatabase.setAuthor(pMerise.getAuthor()); ! theDatabase.setAuthorEmail(pMerise.getAuthorEmail()); ! theDatabase.setCompany(pMerise.getCompany()); ! theDatabase.setProjectURL(pMerise.getProjectURL()); //theDatabase.setSqlFile(pMerise.getSql); ! theDatabase.setCreateDatabaseUrl(pMerise.getCreateDatabaseUrl()); ! theDatabase.setBuildDatabaseUrl(pMerise.getBuildDatabaseUrl()); ! theDatabase.setSchema(pMerise.getSchema()); ! theDatabase.setDatabaseHost(pMerise.getDatabaseHost()); ! theDatabase.setDatabasePassword(pMerise.getDatabasePassword()); ! theDatabase.setDatabaseUser(pMerise.getDatabaseUser()); ! theDatabase.setDbType(pMerise.getDbType()); ! theDatabase.setFileForSave(pMerise.getFileForSave()); ! theDatabase.setProjectURL(pMerise.getProjectURL()); // CustomTreeNode newNode=new CustomTreeNode(theDatabase); //theDatabase.setDynamicTreeNode(newNode); ! Entity ent; ! ! // rule I: each entity become a table. for (int i=0;i<pMerise.getEntities().size();i++) { ! ent=(Entity)pMerise.getEntities().elementAt(i); ! Table t=new Table(theDatabase); ! ent.setSubsequentTable(t); ! if (ent.getData()!=null) { ! t.setData(new Vector(ent.getData())); } ! t.setName(ent.getName()); ! t.setJavaName(ent.getJavaName()); ! t.setCode(ent.getCode()); ! t.setIdMethod(ent.getIdMethod()); ! t.setSkipSql(ent.getSkipSql()); ! //t.setAbstractClass(ent.getAbstractClass()); //ni ! t.setBaseClass(ent.getBaseClass()); ! t.setBasePeer(ent.getBasePeer()); ! t.setAlias(ent.getAlias()); ! t.setJavaNamingMethod(ent.getJavaNamingMethod()); ! t.setHeavyIndexing(ent.getHeavyIndexing()); ! t.setDescription(ent.getDescription()); ! t.setNotes(ent.getNotes()); ! t.getObjectView().setLocation(ent.getObjectView().getLocation()); ! t.getObjectView().setSize(ent.getObjectView().getSize()); ! ModelMan.addTable(theDatabase,t); } --- 134,233 ---- logger.error("I can't continue because the model is wrong."); } + return db; } ! /* ! * Utility function to take all needed attribute of a pdm into a cdm. ! * ! * @param theDatabase context model ! * @param pMerise context model ! */ ! private static PhysicalModel initDatabase (PhysicalModel pDatabase, ConceptualModel pMerise) { //PhysicalModel theDatabase=new PhysicalModel(pMerise.getName()); ! pDatabase.setName(pMerise.getName()); ! pDatabase.setCode(pMerise.getCode()); ! pDatabase.setDefaultIdMethod(pMerise.getDefaultIdMethod()); ! pDatabase.setDefaultJavaType(pMerise.getDefaultJavaType()); ! pDatabase.setPackageName(pMerise.getPackageName()); ! pDatabase.setBaseClass(pMerise.getBaseClass()); ! pDatabase.setBasePeer(pMerise.getBasePeer()); ! pDatabase.setDefaultJavaNamingMethod(pMerise.getDefaultJavaNamingMethod()); ! pDatabase.setHeavyIndexing(pMerise.getHeavyIndexing()); ! pDatabase.setDescription(pMerise.getDescription()); ! pDatabase.setNotes(pMerise.getNotes()); ! pDatabase.setAuthor(pMerise.getAuthor()); ! pDatabase.setAuthorEmail(pMerise.getAuthorEmail()); ! pDatabase.setCompany(pMerise.getCompany()); ! pDatabase.setProjectURL(pMerise.getProjectURL()); //theDatabase.setSqlFile(pMerise.getSql); ! pDatabase.setCreateDatabaseUrl(pMerise.getCreateDatabaseUrl()); ! pDatabase.setBuildDatabaseUrl(pMerise.getBuildDatabaseUrl()); ! pDatabase.setSchema(pMerise.getSchema()); ! pDatabase.setDatabaseHost(pMerise.getDatabaseHost()); ! pDatabase.setDatabasePassword(pMerise.getDatabasePassword()); ! pDatabase.setDatabaseUser(pMerise.getDatabaseUser()); ! pDatabase.setDbType(pMerise.getDbType()); ! pDatabase.setFileForSave(pMerise.getFileForSave()); ! pDatabase.setProjectURL(pMerise.getProjectURL()); // CustomTreeNode newNode=new CustomTreeNode(theDatabase); //theDatabase.setDynamicTreeNode(newNode); + return pDatabase; + } + + /** + * Construct a new 'Table' object + * @param pObject the entity give'n as argument. + */ + private static Table initTable(PhysicalModel pDatabase,Entity pObject) + { + Table t=new Table(pDatabase); + + t.setName(pObject.getName()); + t.setJavaName(pObject.getJavaName()); + t.setCode(pObject.getCode()); + t.setIdMethod(pObject.getIdMethod()); + t.setSkipSql(pObject.getSkipSql()); + //t.AbstractClass(pObject.getAbstractClass()); //ni + t.setBaseClass(pObject.getBaseClass()); + t.setBasePeer(pObject.getBasePeer()); + t.setAlias(pObject.getAlias()); + t.setJavaNamingMethod(pObject.getJavaNamingMethod()); + t.setHeavyIndexing(pObject.getHeavyIndexing()); + t.setDescription(pObject.getDescription()); + t.setNotes(pObject.getNotes()); + return t; + } + + /* + * Rule 0: each entity become a table. + * Also act as Rules iteration starting points + * + * @param theDatabase context model + * @param pAsso context association + */ + + private static PhysicalModel applyRule_00_ (PhysicalModel pDatabase, + ConceptualModel pMerise) { ! Entity swapEntity; ! Table swapTable; for (int i=0;i<pMerise.getEntities().size();i++) { ! swapEntity=(Entity)pMerise.getEntities().elementAt(i); ! swapTable=initTable(pDatabase,swapEntity); ! swapEntity.setSubsequentTable(swapTable); ! if (swapEntity.getData()!=null) { ! swapTable.setData(new Vector(swapEntity.getData())); } ! swapTable.getObjectView().setLocation(swapEntity.getObjectView().getLocation()); ! swapTable.getObjectView().setSize(swapEntity.getObjectView().getSize()); ! ModelMan.addTable(pDatabase,swapTable); } *************** *** 179,189 **** { case org.devaki.nextobjects.workspace.models.ConceptualModel._11_ : ! applyRule_11_(theDatabase, pMerise.getAssociationAt(i)); break; case org.devaki.nextobjects.workspace.models.ConceptualModel._1N_: ! applyRule_1N_(theDatabase, pMerise.getAssociationAt(i)); break; case org.devaki.nextobjects.workspace.models.ConceptualModel._NM_: ! applyRule_NN_(theDatabase, pMerise.getAssociationAt(i)); break; } --- 237,247 ---- { case org.devaki.nextobjects.workspace.models.ConceptualModel._11_ : ! applyRule_11_(pDatabase, pMerise.getAssociationAt(i)); break; case org.devaki.nextobjects.workspace.models.ConceptualModel._1N_: ! applyRule_1N_(pDatabase, pMerise.getAssociationAt(i)); break; case org.devaki.nextobjects.workspace.models.ConceptualModel._NM_: ! applyRule_NN_(pDatabase, pMerise.getAssociationAt(i)); break; } *************** *** 192,196 **** for (int i=0;i<pMerise.getInheritanceLinks().size();i++) { - InheritanceLink iLnk=new InheritanceLink(pMerise, ((Entity)pMerise.getInheritanceLinkAt(i).getChildClass()) --- 250,253 ---- *************** *** 199,211 **** .getSubsequentTable() ); ! ModelMan.addInheritanceLink(theDatabase,iLnk); } ! return theDatabase; } private static void applyRule_11_(PhysicalModel theDatabase, Association pAsso) { - // Rule 2 : In case of 1:1 relation, table must share the same key. - int card_is=((AssociationLink)pAsso.getMyAssociationLinks() .elementAt(0)).getCard(); --- 256,272 ---- .getSubsequentTable() ); ! ModelMan.addInheritanceLink(pDatabase,iLnk); } ! return pDatabase; } + /* + * Rule 2 : In case of 1:1 relation, table must share the same key. + * + * @param theDatabase context model + * @param pAsso context association + */ private static void applyRule_11_(PhysicalModel theDatabase, Association pAsso) { int card_is=((AssociationLink)pAsso.getMyAssociationLinks() .elementAt(0)).getCard(); *************** *** 224,233 **** } ! private static void applyFusion(PhysicalModel theDatabase, Association pAsso) { - // all the table of this association are going to be fusioned. - // this is most often due all _11_ relation in this association. - //For now work, on association fields, if any property in the relation. for (int i=0;i<pAsso.getData().size();i++) --- 285,298 ---- } ! /* ! * All the table of this association are going to be fusioned. ! * this is most often due all _11_ relation in this association. ! * ! * @param theDatabase context model ! * @param pAsso context association ! */ ! private static void applyFusion(PhysicalModel pDatabase, Association pAsso) { //For now work, on association fields, if any property in the relation. for (int i=0;i<pAsso.getData().size();i++) *************** *** 249,253 **** } //remove the old table. ! ModelMan.removeTable(theDatabase, pAsso.getEntityAt(j).getSubsequentTable()); --- 314,318 ---- } //remove the old table. ! ModelMan.removeTable(pDatabase, pAsso.getEntityAt(j).getSubsequentTable()); *************** *** 260,264 **** } ! private static void applyRule_11a_(PhysicalModel theDatabase, Association pAsso) { --- 325,339 ---- } ! /* ! * Rule 2 : In case of 1:1 relation, table must share the same key. ! * this could have be donne differently, by reversing right/left but also ! * by keeping 2 different primary key. IOn that case this can cause ! * performance loss due to index multiplication. ! * ! * @param theDatabase context model ! * @param pAsso context association ! * ! */ ! private static void applyRule_11a_(PhysicalModel pDatabase, Association pAsso) { *************** *** 268,276 **** int is_card=((AssociationLink)pAsso.getMyAssociationLinks() .elementAt(1)).getCard(); - // Rule 2 : In case of 1:1 relation, table must share the same key. - // this could have be donne differently, by reversing right/left but also - // by keeping 2 different primary key. IOn that case this can cause - // performance loss due to index multiplication. - // So we need a new column PK for right table. // At that time the left/right choice is arbitrary :( . --- 343,346 ---- *************** *** 287,291 **** // now work in adding 2 constraints ! Constraint newCst=new Constraint( theDatabase, pAsso.getEntityAt(0).getSubsequentTable(), pAsso.getEntityAt(1).getSubsequentTable()); --- 357,361 ---- // now work in adding 2 constraints ! Constraint newCst=new Constraint( pDatabase, pAsso.getEntityAt(0).getSubsequentTable(), pAsso.getEntityAt(1).getSubsequentTable()); *************** *** 295,301 **** newCst.setAnyField((Column)pAsso.getEntityAt(1).getSubsequentTable() .getPrimaryKeys().firstElement()); ! ModelMan.addConstraint(theDatabase,newCst); ! Constraint newCst2=new Constraint( theDatabase, pAsso.getEntityAt(1).getSubsequentTable(), pAsso.getEntityAt(0).getSubsequentTable()); --- 365,371 ---- newCst.setAnyField((Column)pAsso.getEntityAt(1).getSubsequentTable() .getPrimaryKeys().firstElement()); ! ModelMan.addConstraint(pDatabase,newCst); ! Constraint newCst2=new Constraint( pDatabase, pAsso.getEntityAt(1).getSubsequentTable(), pAsso.getEntityAt(0).getSubsequentTable()); *************** *** 307,311 **** .getPrimaryKeys().lastElement()); ! ModelMan.addConstraint(theDatabase,newCst2); //now work on association fields, if any property in the relation. --- 377,381 ---- .getPrimaryKeys().lastElement()); ! ModelMan.addConstraint(pDatabase,newCst2); //now work on association fields, if any property in the relation. *************** *** 330,341 **** * key (secondary index). * - * Thanks to Romeo Benzoni for his submission/review. - * * @param theDatabase Database context * @param theAssociation Association to be treated ! * @see http://www.devaki.org/transformation.html */ ! private static void applyRule_1N_(PhysicalModel theDatabase, Association pAsso) { --- 400,409 ---- * key (secondary index). * * @param theDatabase Database context * @param theAssociation Association to be treated ! * */ ! private static void applyRule_1N_(PhysicalModel pDatabase, Association pAsso) { *************** *** 354,358 **** { // ... ! newCst=new Constraint(theDatabase, pAsso.getEntityAt(1).getSubsequentTable(), pAsso.getEntityAt(0).getSubsequentTable()); --- 422,426 ---- { // ... ! newCst=new Constraint(pDatabase, pAsso.getEntityAt(1).getSubsequentTable(), pAsso.getEntityAt(0).getSubsequentTable()); *************** *** 390,394 **** // EntityAt(0) is EntityAt(1) and vice-versa. } else { ! newCst=new Constraint(theDatabase, pAsso.getEntityAt(0).getSubsequentTable(), pAsso.getEntityAt(1).getSubsequentTable()); --- 458,462 ---- // EntityAt(0) is EntityAt(1) and vice-versa. } else { ! newCst=new Constraint(pDatabase, pAsso.getEntityAt(0).getSubsequentTable(), pAsso.getEntityAt(1).getSubsequentTable()); *************** *** 423,427 **** } ! ModelMan.addConstraint(theDatabase,newCst); } --- 491,495 ---- } ! ModelMan.addConstraint(pDatabase,newCst); } *************** *** 434,442 **** * @param theDatabase The context database * @param pAsso The association to be treated. ! * @author efl...@de... ! * @see http://www.devaki.org/transformation.html */ ! private static void applyRule_NN_(PhysicalModel theDatabase, Association pAsso) { --- 502,509 ---- * @param theDatabase The context database * @param pAsso The association to be treated. ! * */ ! private static void applyRule_NN_(PhysicalModel pDatabase, Association pAsso) { *************** *** 444,448 **** * The table to be created. */ ! Table newTable=new Table(theDatabase); newTable.setName(pAsso.getName()); --- 511,515 ---- * The table to be created. */ ! Table newTable=new Table(pDatabase); newTable.setName(pAsso.getName()); *************** *** 491,501 **** newField.setAutoIncrement(false); // always in that case! newTable.getData().addElement(newField); ! newCst=new Constraint(theDatabase,pAsso.getEntityAt(i) .getSubsequentTable(),newTable); newCst.setAnyField(newField); newCst.setUniqueField(pAsso.getIdentifierAt(i)); ! ModelMan.addConstraint(theDatabase,newCst); } ! ModelMan.addTable(theDatabase,newTable); } } --- 558,568 ---- newField.setAutoIncrement(false); // always in that case! newTable.getData().addElement(newField); ! newCst=new Constraint(pDatabase,pAsso.getEntityAt(i) .getSubsequentTable(),newTable); newCst.setAnyField(newField); newCst.setUniqueField(pAsso.getIdentifierAt(i)); ! ModelMan.addConstraint(pDatabase,newCst); } ! ModelMan.addTable(pDatabase,newTable); } } Index: NOTools.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NOTools.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NOTools.java 25 May 2003 20:21:10 -0000 1.12 --- NOTools.java 28 May 2003 21:48:28 -0000 1.13 *************** *** 173,178 **** org.devaki.nextobjects.NextObjects.class.getResource( "/org/devaki/nextobjects/icons/" + img)); ! } catch (Throwable t) { // This Should Be here since this is defined ! // in BasicLookAndFeel System.err.println("Image_Load_Error : " + img); return null; --- 173,177 ---- org.devaki.nextobjects.NextObjects.class.getResource( "/org/devaki/nextobjects/icons/" + img)); ! } catch (Throwable t) { System.err.println("Image_Load_Error : " + img); return null; Index: TorqueWrapper.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/TorqueWrapper.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** TorqueWrapper.java 6 Apr 2003 14:19:28 -0000 1.16 --- TorqueWrapper.java 28 May 2003 21:48:28 -0000 1.17 *************** *** 490,494 **** if(ModelMan.getCurrentModel()instanceof ConceptualModel) { ! MeriseTransform.genPhysical((ConceptualModel)ModelMan .getCurrentModel()); } --- 490,494 ---- if(ModelMan.getCurrentModel()instanceof ConceptualModel) { ! MeriseTransform.cdm2pdm((ConceptualModel)ModelMan .getCurrentModel()); } |
From: <efl...@us...> - 2003-05-28 21:48:36
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects In directory sc8-pr-cvs1:/tmp/cvs-serv3855/src/org/devaki/nextobjects Modified Files: NextObjects.java Log Message: Checkstyle/refactor in MeriseTransform.java +++ I get an error while refactoring causing large commit .+++ Modified Files: src/org/devaki/nextobjects/util/MeriseTransform.java Index: NextObjects.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/NextObjects.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NextObjects.java 25 May 2003 08:02:36 -0000 1.11 --- NextObjects.java 28 May 2003 21:48:27 -0000 1.12 *************** *** 6,10 **** it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your ! option) any later version. This program is distributed in the hope that it will --- 6,10 ---- it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your ! option) any later version.56 This program is distributed in the hope that it will *************** *** 52,89 **** /* ! * */ public class NextObjects extends JFrame { ! /** Variables **/ ! // Reference to the instantiated 'NextObjects' object private static NextObjects nextObjects; ! ! // Logger private static Category logger = Logger.getInstance(NextObjects.class.getName()); ! /** Components **/ ! // Labels private static JLabel jLabelStatus = new JLabel(" "); ! // Menubars private NOMenuBar menuBar = new NOMenuBar(); ! // Toolbars private NOToolBar1 toolBar1 = new NOToolBar1(); private NOToolBar2 toolBar2 = new NOToolBar2(); // Panels private CustomSplitPane jSplitPane1 = new CustomSplitPane(JSplitPane.HORIZONTAL_SPLIT, 220); private CustomSplitPane jSplitPane2 = new CustomSplitPane(JSplitPane.VERTICAL_SPLIT, 0); private JPanel jPanelStatusBar = new JPanel(new GridBagLayout()); ! //piece of softwares. public NOWorkspace nOWorkspace; public static DataDictionaryEdit dataDictionaryEdit; static SplashScreen splash; ! /** * Construct a new 'NextObjects' object */ --- 52,120 ---- /* ! * devaki-nextobjects is an Integrated Development Tool for Entreprise Applications. ! * Nextobjects will help you choose database structure from system analysis ! * and design, down to generating strongly designed data layer Object Model. ! * @see http://www.devaki.org ! * @author: efl...@de... */ public class NextObjects extends JFrame { ! /* ! * Reference to the instantiated 'NextObjects' object ! */ ! private static NextObjects nextObjects; ! ! /* ! * Logger ! */ private static Category logger = Logger.getInstance(NextObjects.class.getName()); ! /* ! * Components ! */ private static JLabel jLabelStatus = new JLabel(" "); ! /* ! * Components ! */ private NOMenuBar menuBar = new NOMenuBar(); ! /* ! * Components ! */ private NOToolBar1 toolBar1 = new NOToolBar1(); + /* + * Components + */ private NOToolBar2 toolBar2 = new NOToolBar2(); // Panels private CustomSplitPane jSplitPane1 = new CustomSplitPane(JSplitPane.HORIZONTAL_SPLIT, 220); + /* + * Components + */ private CustomSplitPane jSplitPane2 = new CustomSplitPane(JSplitPane.VERTICAL_SPLIT, 0); + /* + * Components + */ private JPanel jPanelStatusBar = new JPanel(new GridBagLayout()); ! ! /* ! * Thetabbedpane ! */ public NOWorkspace nOWorkspace; + /* + * The treeview + */ public static DataDictionaryEdit dataDictionaryEdit; + /* + * Component spl + */ static SplashScreen splash; ! /* * Construct a new 'NextObjects' object */ *************** *** 274,291 **** { jLabelStatus.setText(text); - } - - // not implemented. - public static void enableLogging() { - // open SplitPane - // start/resume chainsaw - // fix log.properties - // reload it. - } - - public static void disableLogging() { - // close JPanel - // stop chainsaw - // use null appender } --- 305,308 ---- |
From: <efl...@us...> - 2003-05-26 17:48:54
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv4283/src/org/devaki/nextobjects/util Modified Files: MeriseTransform.java Log Message: Fixed major bugs in Merise Transformation Index: MeriseTransform.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/MeriseTransform.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** MeriseTransform.java 26 May 2003 17:15:53 -0000 1.17 --- MeriseTransform.java 26 May 2003 17:48:51 -0000 1.18 *************** *** 340,345 **** Association pAsso) { ! /* Rule 3 */ Column newField; Constraint newCst=null; // here we try to reach the left or the right part of the Association Class. --- 340,350 ---- Association pAsso) { ! /* ! * a temp column to be created under one of the two tables. ! */ Column newField; + /* + * The constraint to be created + */ Constraint newCst=null; // here we try to reach the left or the right part of the Association Class. *************** *** 371,377 **** if (pAsso.getCardAt(0)==ConceptualModel._11_) { newField.setRequired(true); - } else { //force cause we have a 1 in 1N. ! // (even if it'salways already set, the value is forced) newField.setRequired(false); } --- 376,382 ---- if (pAsso.getCardAt(0)==ConceptualModel._11_) { newField.setRequired(true); //force cause we have a 1 in 1N. ! // (even if it'salways already set, the value is forced) ! } else { newField.setRequired(false); } *************** *** 395,399 **** // attributes towards entity provided with cardinalities 1:1. ! for (int i=0;i<pAsso.getData().size();i++) { pAsso.getEntityAt(1).getSubsequentTable().getData() .addElement(new Column((Column)pAsso.getData().elementAt(i))); --- 400,405 ---- // attributes towards entity provided with cardinalities 1:1. ! for (int i=0;i<pAsso.getData().size();i++) ! { pAsso.getEntityAt(1).getSubsequentTable().getData() .addElement(new Column((Column)pAsso.getData().elementAt(i))); *************** *** 403,411 **** pAsso.getEntityAt(1).getSubsequentTable().setIdMethod("none"); ! if (pAsso.getCardAt(1)==ConceptualModel._11_) { ! newField.setRequired(true); ! } else { //force cause we have a 1 in 1N. ! // (even if it'salways already set, the value is forced) newField.setRequired(false); } --- 409,418 ---- pAsso.getEntityAt(1).getSubsequentTable().setIdMethod("none"); ! if (pAsso.getCardAt(1)==ConceptualModel._11_) ! { //force cause we have a 1 in 1N. ! // (even if it'salways already set, the value is forced) ! newField.setRequired(true); ! } else { // this is the statement wich interrest me: newField.setRequired(false); } *************** *** 419,431 **** } private static void applyRule_NN_(PhysicalModel theDatabase, Association pAsso) { ! ! // Rule 4 : In the case of entities connected by associations of the n:m ! // type, an intermediate Table known as "Link Table", must be created, and ! // must have as primary key a conjunction of the primary keys of the two ! // tables for which it is connected. ! Table newTable=new Table(theDatabase); --- 426,447 ---- } + /* + * Rule 4 : In the case of entities connected by associations of the n:m + * type, an intermediate Table known as "Link Table", must be created, and + * must have as primary key a conjunction of the primary keys of the two + * tables for which it is connected. + * + * @param theDatabase The context database + * @param pAsso The association to be treated. + * @author efl...@de... + * @see http://www.devaki.org/transformation.html + */ + private static void applyRule_NN_(PhysicalModel theDatabase, Association pAsso) { ! /* ! * The table to be created. ! */ Table newTable=new Table(theDatabase); *************** *** 455,460 **** (Column)pAsso.getData().elementAt(i))); } ! Column newField; Constraint newCst=null; for (int i=0;i<pAsso.getMyAssociationLinks().size();i++) --- 471,483 ---- (Column)pAsso.getData().elementAt(i))); } ! ! /* ! * Column we create ! */ Column newField; + + /* + * Constraint to be created(s) + */ Constraint newCst=null; for (int i=0;i<pAsso.getMyAssociationLinks().size();i++) *************** *** 462,466 **** newField=new Column(pAsso.getIdentifierAt(i)); newField.setPrimaryKey(true); ! newField.setRequired(true); newField.setAutoIncrement(false); // always in that case! newTable.getData().addElement(newField); --- 485,492 ---- newField=new Column(pAsso.getIdentifierAt(i)); newField.setPrimaryKey(true); ! if (pAsso.getCardAt(i)==ConceptualModel._0N_) ! { ! newField.setRequired(false); ! } newField.setAutoIncrement(false); // always in that case! newTable.getData().addElement(newField); |
From: <efl...@us...> - 2003-05-26 17:15:57
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects In directory sc8-pr-cvs1:/tmp/cvs-serv24048 Modified Files: build.properties build.xml nextobjects nextobjects.bat project.xml Log Message: Fixed major bug - preparing a beta release. Index: build.properties =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/build.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** build.properties 3 May 2003 19:38:09 -0000 1.5 --- build.properties 26 May 2003 17:15:53 -0000 1.6 *************** *** 9,13 **** component.name = devaki-nextobjects component.title = devaki-nextobjects ! component.version = 0.3-dev project = nextobjects package = org.devaki.${project} --- 9,13 ---- component.name = devaki-nextobjects component.title = devaki-nextobjects ! component.version = 0.3-RC3 project = nextobjects package = org.devaki.${project} Index: build.xml =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/build.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** build.xml 24 May 2003 18:50:46 -0000 1.9 --- build.xml 26 May 2003 17:15:53 -0000 1.10 *************** *** 4,8 **** ==================================== --> <property name="component.name" value="devaki-nextobjects"/> ! <property name="component.version" value="0.3-dev"/> --- 4,8 ---- ==================================== --> <property name="component.name" value="devaki-nextobjects"/> ! <property name="component.version" value="0.3-RC3"/> Index: nextobjects =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/nextobjects,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** nextobjects 5 Apr 2003 10:37:17 -0000 1.5 --- nextobjects 26 May 2003 17:15:53 -0000 1.6 *************** *** 19,23 **** [ -z "$JAVA_HOME" ] && export JAVA_HOME=$(dirname $(dirname $(which java))) ! LOCALCLASSPATH="$NEXTOBJECTS_HOME/target/devaki-nextobjects-0.3-dev.jar:\ $NEXTOBJECTS_HOME/lib/ant-1.5.2.jar:\ $NEXTOBJECTS_HOME/lib/log4j-1.2.7.jar:\ --- 19,23 ---- [ -z "$JAVA_HOME" ] && export JAVA_HOME=$(dirname $(dirname $(which java))) ! LOCALCLASSPATH="$NEXTOBJECTS_HOME/target/devaki-nextobjects-0.3-RC3.jar:\ $NEXTOBJECTS_HOME/lib/ant-1.5.2.jar:\ $NEXTOBJECTS_HOME/lib/log4j-1.2.7.jar:\ Index: nextobjects.bat =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/nextobjects.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** nextobjects.bat 3 May 2003 12:50:48 -0000 1.3 --- nextobjects.bat 26 May 2003 17:15:53 -0000 1.4 *************** *** 2,6 **** set NEXTOBJECTS_HOME=. ! set LOCALCLASSPATH=%NEXTOBJECTS_HOME%\target\devaki-nextobjects-0.3-dev.jar; set LCP2=%NEXTOBJECTS_HOME%\lib\xmlParserAPIs.jar;%NEXTOBJECTS_HOME%\lib\xercesImpl.jar; set LCP3=%NEXTOBJECTS_HOME%\lib\ant-1.5.2.jar;%NEXTOBJECTS_HOME%\lib\log4j-1.2.7.jar; --- 2,6 ---- set NEXTOBJECTS_HOME=. ! set LOCALCLASSPATH=%NEXTOBJECTS_HOME%\target\devaki-nextobjects-0.3-RC3.jar; set LCP2=%NEXTOBJECTS_HOME%\lib\xmlParserAPIs.jar;%NEXTOBJECTS_HOME%\lib\xercesImpl.jar; set LCP3=%NEXTOBJECTS_HOME%\lib\ant-1.5.2.jar;%NEXTOBJECTS_HOME%\lib\log4j-1.2.7.jar; Index: project.xml =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/project.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** project.xml 5 May 2003 21:01:23 -0000 1.10 --- project.xml 26 May 2003 17:15:53 -0000 1.11 *************** *** 5,9 **** <id>devaki-nextobjects</id> <name>devaki-nextobjects</name> ! <currentVersion>0.3-RC1</currentVersion> <organization> <name>devaki.org</name> --- 5,9 ---- <id>devaki-nextobjects</id> <name>devaki-nextobjects</name> ! <currentVersion>0.3-RC3</currentVersion> <organization> <name>devaki.org</name> |
From: <efl...@us...> - 2003-05-26 17:15:57
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv24048/src/org/devaki/nextobjects/util Modified Files: MeriseTransform.java Log Message: Fixed major bug - preparing a beta release. Index: MeriseTransform.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/MeriseTransform.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** MeriseTransform.java 25 May 2003 20:21:10 -0000 1.16 --- MeriseTransform.java 26 May 2003 17:15:53 -0000 1.17 *************** *** 369,379 **** pAsso.getEntityAt(0).getSubsequentTable().setIdMethod("none"); ! if (pAsso.getCardAt(1)==ConceptualModel._0N_ ! | pAsso.getCardAt(0)==ConceptualModel._01_) { ! newField.setRequired(false); } else { //force cause we have a 1 in 1N. // (even if it'salways already set, the value is forced) ! newField.setRequired(true); } // to do implement isPk for 11 !!! --- 369,378 ---- pAsso.getEntityAt(0).getSubsequentTable().setIdMethod("none"); ! if (pAsso.getCardAt(0)==ConceptualModel._11_) { ! newField.setRequired(true); } else { //force cause we have a 1 in 1N. // (even if it'salways already set, the value is forced) ! newField.setRequired(false); } // to do implement isPk for 11 !!! *************** *** 404,414 **** pAsso.getEntityAt(1).getSubsequentTable().setIdMethod("none"); ! if (pAsso.getCardAt(0)==ConceptualModel._0N_ ! | pAsso.getCardAt(1)==ConceptualModel._01_) { ! newField.setRequired(false); } else { //force cause we have a 1 in 1N. // (even if it'salways already set, the value is forced) ! newField.setRequired(true); } // to do implement isPk for 11 !!! --- 403,412 ---- pAsso.getEntityAt(1).getSubsequentTable().setIdMethod("none"); ! if (pAsso.getCardAt(1)==ConceptualModel._11_) { ! newField.setRequired(true); } else { //force cause we have a 1 in 1N. // (even if it'salways already set, the value is forced) ! newField.setRequired(false); } // to do implement isPk for 11 !!! |
From: <efl...@us...> - 2003-05-25 20:21:14
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects In directory sc8-pr-cvs1:/tmp/cvs-serv28400/src/org/devaki/nextobjects/ui/workspace/models/objects Modified Files: DataDictionaryEdit.java Log Message: Fixed major bugs in merise transformation. Index: DataDictionaryEdit.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/ui/workspace/models/objects/DataDictionaryEdit.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DataDictionaryEdit.java 5 Apr 2003 12:09:09 -0000 1.2 --- DataDictionaryEdit.java 25 May 2003 20:21:10 -0000 1.3 *************** *** 590,597 **** break; case 5: - if(!newField.isPk()) - { newField.setRequired((new Boolean(value.toString())).booleanValue()); - } break; case 6: --- 590,594 ---- |
From: <efl...@us...> - 2003-05-25 20:21:14
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics In directory sc8-pr-cvs1:/tmp/cvs-serv28400/src/org/devaki/nextobjects/workspace/models/graphics Modified Files: ConceptualView.java Log Message: Fixed major bugs in merise transformation. Index: ConceptualView.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/graphics/ConceptualView.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ConceptualView.java 25 May 2003 08:02:36 -0000 1.15 --- ConceptualView.java 25 May 2003 20:21:11 -0000 1.16 *************** *** 11,15 **** be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ! PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along --- 11,15 ---- be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ! PURPOSE. See the GNU GeneralSys Public License for more details. You should have received a copy of the GNU General Public License along *************** *** 185,188 **** --- 185,189 ---- tmpLink = ((Association)ModelMan.getDropTargetObject()) .addAssociationLink((Entity)ModelMan.getDraggedObject()); + ((LineView)tmpLink.getObjectView()).computeBestPoints(); } *************** *** 195,198 **** --- 196,200 ---- tmpLink = ((Association)ModelMan.getDraggedObject()) .addAssociationLink((Entity)ModelMan.getDropTargetObject()); + ((LineView)tmpLink.getObjectView()).computeBestPoints(); } *************** *** 206,220 **** } - /** ! * ! * <p>Title: MyMouseListener</p> ! * <p>Description: </p> ! * <p>Copyright: GNU Public License</p> ! * <p>Company: devaki.org</p> */ class MyMouseListener extends MouseInputAdapter { ! // Mouse Pressed public void mousePressed(MouseEvent e) { --- 208,220 ---- } /** ! * MyMouseListener ! * @author: efl...@de... */ class MyMouseListener extends MouseInputAdapter { ! /* ! * MousePressed ! */ public void mousePressed(MouseEvent e) { |
From: <efl...@us...> - 2003-05-25 20:21:14
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/columns In directory sc8-pr-cvs1:/tmp/cvs-serv28400/src/org/devaki/nextobjects/workspace/models/columns Modified Files: Column.java Log Message: Fixed major bugs in merise transformation. Index: Column.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/columns/Column.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Column.java 18 Feb 2003 19:24:38 -0000 1.4 --- Column.java 25 May 2003 20:21:10 -0000 1.5 *************** *** 268,272 **** */ public void setPrimaryKey(boolean pPrimaryKey) { ! if (this.primaryKey) { this.required=true; } --- 268,272 ---- */ public void setPrimaryKey(boolean pPrimaryKey) { ! if (pPrimaryKey) { this.required=true; } |
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv28400/src/org/devaki/nextobjects/util Modified Files: CDMVerifier.java EditorFactory.java MeriseTransform.java NOTools.java Log Message: Fixed major bugs in merise transformation. Index: CDMVerifier.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/CDMVerifier.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CDMVerifier.java 5 Apr 2003 10:37:17 -0000 1.4 --- CDMVerifier.java 25 May 2003 20:21:10 -0000 1.5 *************** *** 125,130 **** for (int i=0;i<fieldList.size();i++) { if(!s.add(((String[])fieldList.elementAt(i))[1])) { ! errors++; ! logger.error( ((String[])fieldList.elementAt(i))[1] + " is not unique in " + ((String[])fieldList.elementAt(i))[0]); --- 125,130 ---- for (int i=0;i<fieldList.size();i++) { if(!s.add(((String[])fieldList.elementAt(i))[1])) { ! warnings++; ! logger.warn( ((String[])fieldList.elementAt(i))[1] + " is not unique in " + ((String[])fieldList.elementAt(i))[0]); Index: EditorFactory.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/EditorFactory.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EditorFactory.java 5 May 2003 21:01:27 -0000 1.3 --- EditorFactory.java 25 May 2003 20:21:10 -0000 1.4 *************** *** 63,76 **** /** ! * Call the any object editing window * @return */ public static void getObjectEdit( ) { - System.out.println("2getModelEdit()"); BaseObject currentObject=ModelMan.getCurrentObject(); if (ModelMan.getCurrentObjects().isEmpty()) { - System.out.println("getModelEdit()"); EditorFactory.getModelEdit(); } --- 63,75 ---- /** ! * Call current object editing window ! * If no current object return current model object * @return */ public static void getObjectEdit( ) { BaseObject currentObject=ModelMan.getCurrentObject(); if (ModelMan.getCurrentObjects().isEmpty()) { EditorFactory.getModelEdit(); } Index: MeriseTransform.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/MeriseTransform.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** MeriseTransform.java 25 May 2003 08:02:36 -0000 1.15 --- MeriseTransform.java 25 May 2003 20:21:10 -0000 1.16 *************** *** 321,346 **** } private static void applyRule_1N_(PhysicalModel theDatabase, Association pAsso) { ! // Rule 3 : : In the case of entities connected by associations of the 1:n ! // type, each table has its own key, but the key of the entity side 0,n (or ! // 1,n) migrates towards the table side 0,1 (or 1,1) and becomes a foreign ! // key (secondary index). ! Column newField; ! Constraint newCst=new Constraint(theDatabase, ! pAsso.getEntityAt(0).getSubsequentTable(), ! pAsso.getEntityAt(1).getSubsequentTable()); ! if (pAsso.getCardAt(0)==ConceptualModel._0N_ ! && pAsso.getCardAt(0)==ConceptualModel._1N_) { // ... newField=new Column(pAsso.getEntityAt(1).getIdentifier()); ! newField.setAutoIncrement(false); // always in that case! pAsso.getEntityAt(0).getSubsequentTable().getData().addElement(newField); // If the type of relation is 1:n, it is advisable to make slip the ! // attributes towards entitY provided with cardinalities the 1:1. for (int i=0;i<pAsso.getData().size();i++) { --- 321,361 ---- } + + /* + * This transformation rule deal with 1 --> * relation. + * + * Rule 3 : : In the case of entities connected by associations of the 1:n + * type, each table has its own key, but the key of the entity side 0,n (or + * 1,n) migrates towards the table side 0,1 (or 1,1) and becomes a foreign + * key (secondary index). + * + * Thanks to Romeo Benzoni for his submission/review. + * + * @param theDatabase Database context + * @param theAssociation Association to be treated + * @see http://www.devaki.org/transformation.html + */ + private static void applyRule_1N_(PhysicalModel theDatabase, Association pAsso) { ! /* Rule 3 */ Column newField; ! Constraint newCst=null; ! // here we try to reach the left or the right part of the Association Class. ! // I mean not the cards or anything but find the side we want: side-N vs side-1 ! if (pAsso.getCardAt(1)==ConceptualModel._0N_ ! || pAsso.getCardAt(1)==ConceptualModel._1N_) { // ... + newCst=new Constraint(theDatabase, + pAsso.getEntityAt(1).getSubsequentTable(), + pAsso.getEntityAt(0).getSubsequentTable()); newField=new Column(pAsso.getEntityAt(1).getIdentifier()); ! pAsso.getEntityAt(0).getSubsequentTable().getData().addElement(newField); // If the type of relation is 1:n, it is advisable to make slip the ! // attributes towards entity provided with cardinalities the 1:1. for (int i=0;i<pAsso.getData().size();i++) { *************** *** 353,360 **** newCst.setAnyField(newField); pAsso.getEntityAt(0).getSubsequentTable().setIdMethod("none"); } else { ! // ... newField=new Column(pAsso.getEntityAt(0).getIdentifier()); ! newField.setAutoIncrement(false); pAsso.getEntityAt(1).getSubsequentTable().getData().addElement(newField); --- 368,394 ---- newCst.setAnyField(newField); pAsso.getEntityAt(0).getSubsequentTable().setIdMethod("none"); + + if (pAsso.getCardAt(1)==ConceptualModel._0N_ + | pAsso.getCardAt(0)==ConceptualModel._01_) { + newField.setRequired(false); + } else { + //force cause we have a 1 in 1N. + // (even if it'salways already set, the value is forced) + newField.setRequired(true); + } + // to do implement isPk for 11 !!! + newField.setPrimaryKey(false); + + // as a FK it never autoincrement + newField.setAutoIncrement(false); + + // now we change side and to the same work. + // EntityAt(0) is EntityAt(1) and vice-versa. } else { ! newCst=new Constraint(theDatabase, ! pAsso.getEntityAt(0).getSubsequentTable(), ! pAsso.getEntityAt(1).getSubsequentTable()); newField=new Column(pAsso.getEntityAt(0).getIdentifier()); ! pAsso.getEntityAt(1).getSubsequentTable().getData().addElement(newField); *************** *** 369,373 **** --- 403,421 ---- newCst.setAnyField(newField); pAsso.getEntityAt(1).getSubsequentTable().setIdMethod("none"); + + if (pAsso.getCardAt(0)==ConceptualModel._0N_ + | pAsso.getCardAt(1)==ConceptualModel._01_) { + newField.setRequired(false); + } else { + //force cause we have a 1 in 1N. + // (even if it'salways already set, the value is forced) + newField.setRequired(true); + } + // to do implement isPk for 11 !!! + newField.setPrimaryKey(false); + + newField.setAutoIncrement(false); } + ModelMan.addConstraint(theDatabase,newCst); } *************** *** 427,429 **** ModelMan.addTable(theDatabase,newTable); } ! } \ No newline at end of file --- 475,477 ---- ModelMan.addTable(theDatabase,newTable); } ! } Index: NOTools.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NOTools.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NOTools.java 25 May 2003 08:02:36 -0000 1.11 --- NOTools.java 25 May 2003 20:21:10 -0000 1.12 *************** *** 216,220 **** { FileOutputStream file = new FileOutputStream(NO_PREFS); ! NO_PROPS.store(file, "nextObjects preferences"); file.flush(); file.close(); --- 216,220 ---- { FileOutputStream file = new FileOutputStream(NO_PREFS); ! NO_PROPS.store(file, "NextObjects preferences"); file.flush(); file.close(); *************** *** 514,524 **** * a given association (cardinalities) * ! * card_is 01 11 0N 1N ! * is_card --------------------------------- ! * 01 | 11 11 NM NM * 11 | 11 11 1N 1N ! * 0N | NM 1N NM NM ! * 1N | NM 1N NM NM ! * * @param theAssociation * @return --- 514,524 ---- * a given association (cardinalities) * ! * card_is 01 11 0N 1N (right) ! * is_card -------------------------------- ! * 01 | 11 11 1N 1N * 11 | 11 11 1N 1N ! * 0N | 1N 1N NM NM ! * 1N | 1N 1N NM NM ! * (left) * @param theAssociation * @return *************** *** 529,536 **** int is_card=((AssociationLink)theAssociation.getMyAssociationLinks().elementAt(1)).getCard(); ! int [][] results= { {ConceptualModel._11_ ,ConceptualModel._11_ ,ConceptualModel._NM_ ,ConceptualModel._NM_ }, ! {ConceptualModel._11_,ConceptualModel._11_ ,ConceptualModel._1N_ ,ConceptualModel._1N_ }, ! {ConceptualModel._NM_ ,ConceptualModel._1N_ ,ConceptualModel._NM_ ,ConceptualModel._NM_ }, ! {ConceptualModel._NM_,ConceptualModel._1N_ ,ConceptualModel._NM_ ,ConceptualModel._NM_ }} ; int cardType=results[card_is][is_card]; --- 529,536 ---- int is_card=((AssociationLink)theAssociation.getMyAssociationLinks().elementAt(1)).getCard(); ! int [][] results= { {ConceptualModel._11_ ,ConceptualModel._11_ ,ConceptualModel._1N_ ,ConceptualModel._1N_ }, ! {ConceptualModel._11_,ConceptualModel._11_ ,ConceptualModel._1N_ ,ConceptualModel._1N_ }, ! {ConceptualModel._1N_ ,ConceptualModel._1N_ ,ConceptualModel._NM_ ,ConceptualModel._NM_ }, ! {ConceptualModel._1N_,ConceptualModel._1N_ ,ConceptualModel._NM_ ,ConceptualModel._NM_ }} ; int cardType=results[card_is][is_card]; |
From: <efl...@us...> - 2003-05-25 08:02:40
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects In directory sc8-pr-cvs1:/tmp/cvs-serv12214/src/org/devaki/nextobjects Modified Files: NextObjects.java Log Message: Fixed major bug in merise transform. Index: NextObjects.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/NextObjects.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** NextObjects.java 24 May 2003 18:50:46 -0000 1.10 --- NextObjects.java 25 May 2003 08:02:36 -0000 1.11 *************** *** 99,107 **** splash.jProgressBar1.setString("Loading properties"); NOTools nOTools = new NOTools(); ! splash.jProgressBar1.setValue(5); ! ! ! ! --- 99,103 ---- splash.jProgressBar1.setString("Loading properties"); NOTools nOTools = new NOTools(); ! splash.jProgressBar1.setValue(5); *************** *** 119,128 **** // Set icon for nextObjects this.setIconImage(Toolkit.getDefaultToolkit().getImage(org.devaki.nextobjects.NextObjects.class.getResource( ! "/org/devaki/nextobjects/icons/icon.gif"))); ! // Set size ! this.setSize(Integer.parseInt(NOTools.NO_PROPS.getProperty("width")), ! Integer.parseInt(NOTools.NO_PROPS.getProperty("heigth"))); // Create the ModelMan object --- 115,134 ---- // Set icon for nextObjects this.setIconImage(Toolkit.getDefaultToolkit().getImage(org.devaki.nextobjects.NextObjects.class.getResource( ! "/org/devaki/nextobjects/icons/icon.png"))); // Set size ! int w=640; ! int h=480; ! try { ! w=Integer.parseInt(NOTools.NO_PROPS.getProperty("width")); ! h=Integer.parseInt(NOTools.NO_PROPS.getProperty("heigth")); ! } catch (Exception e) { ! w=640; ! h=480; ! logger.error("Setting default window size."); ! } ! if (w<10 || h< 10) { h=480; w=480; } ! this.setSize(w,h); ! // Create the ModelMan object *************** *** 148,152 **** this.getContentPane().setLayout(new GridBagLayout()); // Set divider location of the horizontal split panel ! jSplitPane2.setDividerLocation((int)this.getSize().getHeight() - 200); /** Listeners **/ --- 154,158 ---- this.getContentPane().setLayout(new GridBagLayout()); // Set divider location of the horizontal split panel ! jSplitPane2.setDividerLocation((int)this.getSize().getHeight() - 220); /** Listeners **/ |
From: <efl...@us...> - 2003-05-25 08:02:40
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models In directory sc8-pr-cvs1:/tmp/cvs-serv12214/src/org/devaki/nextobjects/workspace/models Modified Files: PhysicalModel.java Log Message: Fixed major bug in merise transform. Index: PhysicalModel.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/workspace/models/PhysicalModel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PhysicalModel.java 24 May 2003 18:50:47 -0000 1.4 --- PhysicalModel.java 25 May 2003 08:02:36 -0000 1.5 *************** *** 49,53 **** { super(pName); - //this.myPhysicalView=new PhysicalView(this); } --- 49,52 ---- |
From: <efl...@us...> - 2003-05-25 08:02:40
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util In directory sc8-pr-cvs1:/tmp/cvs-serv12214/src/org/devaki/nextobjects/util Modified Files: MeriseTransform.java NOTools.java Log Message: Fixed major bug in merise transform. Index: MeriseTransform.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/MeriseTransform.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** MeriseTransform.java 6 May 2003 20:19:52 -0000 1.14 --- MeriseTransform.java 25 May 2003 08:02:36 -0000 1.15 *************** *** 42,46 **** // Logger private static Category logger ! = Logger.getInstance(MeriseTransform.class.getName()); public MeriseTransform() --- 42,46 ---- // Logger private static Category logger ! = Logger.getInstance(MeriseTransform.class.getName()); public MeriseTransform() *************** *** 55,203 **** public static void genPhysical(ConceptualModel aMerise) { ! ConceptualModel myMerise=aMerise; ! File tmp; ! tmp=new File (NOTools.TMP_DIR + "temp.erd"); ! CDMVerifier.verify(aMerise); ! if (aMerise.isVerified) ! { ! ConceptualModel anotherMerise=null; ! tmp=new File (NOTools.TMP_DIR + File.separator + "temp.erd"); ! // first I save the erd int temp. ! try ! { ! ObjectOutputStream flux = ! new ObjectOutputStream(new FileOutputStream(tmp)); ! flux.writeObject(myMerise); ! flux.flush(); ! flux.close(); ! } ! catch (Exception ioex) ! { ! logger.error("Unable to save temporary file " + tmp); ! } ! // then reload. ! try ! { ! ObjectInputStream flux=new ObjectInputStream(new FileInputStream(tmp)); ! anotherMerise=(ConceptualModel)flux.readObject(); ! flux.close(); ! } ! catch (Exception ioex) ! { ! logger.error("I can't understand file : " + ioex ); ! } ! PhysicalModel db=new PhysicalModel("--///--"); ! ModelMan.newPhysicalDatamodel(db); ! ModelMan.setCurrentModel(db); ! MeriseTransform.deduceDatabase(db,anotherMerise); ! ModelMan.resizeModelObjects(db); ! db.getPhysicalView().repaint(); ! } ! else ! { ! // the model is not verifiable. ! logger.error("I can't continue because the model is wrong."); ! } } public static PhysicalModel deduceDatabase (PhysicalModel theDatabase, ! ConceptualModel pMerise) { ! logger.warn("Using EXPERIMENTAL merise transform"); ! //PhysicalModel theDatabase=new PhysicalModel(pMerise.getName()); ! theDatabase.setName(pMerise.getName()); ! theDatabase.setCode(pMerise.getCode()); ! theDatabase.setDefaultIdMethod(pMerise.getDefaultIdMethod()); ! theDatabase.setDefaultJavaType(pMerise.getDefaultJavaType()); ! theDatabase.setPackageName(pMerise.getPackageName()); ! theDatabase.setBaseClass(pMerise.getBaseClass()); ! theDatabase.setBasePeer(pMerise.getBasePeer()); ! theDatabase.setDefaultJavaNamingMethod(pMerise.getDefaultJavaNamingMethod()); ! theDatabase.setHeavyIndexing(pMerise.getHeavyIndexing()); ! theDatabase.setDescription(pMerise.getDescription()); ! theDatabase.setNotes(pMerise.getNotes()); ! theDatabase.setAuthor(pMerise.getAuthor()); ! theDatabase.setAuthorEmail(pMerise.getAuthorEmail()); ! theDatabase.setCompany(pMerise.getCompany()); ! theDatabase.setProjectURL(pMerise.getProjectURL()); ! //theDatabase.setSqlFile(pMerise.getSql); ! theDatabase.setCreateDatabaseUrl(pMerise.getCreateDatabaseUrl()); ! theDatabase.setBuildDatabaseUrl(pMerise.getBuildDatabaseUrl()); ! theDatabase.setSchema(pMerise.getSchema()); ! theDatabase.setDatabaseHost(pMerise.getDatabaseHost()); ! theDatabase.setDatabasePassword(pMerise.getDatabasePassword()); ! theDatabase.setDatabaseUser(pMerise.getDatabaseUser()); ! theDatabase.setDbType(pMerise.getDbType()); ! theDatabase.setFileForSave(pMerise.getFileForSave()); ! theDatabase.setProjectURL(pMerise.getProjectURL()); ! // CustomTreeNode newNode=new CustomTreeNode(theDatabase); ! //theDatabase.setDynamicTreeNode(newNode); ! Entity ent; ! // rule I: each entity become a table. ! for (int i=0;i<pMerise.getEntities().size();i++) ! { ! ent=(Entity)pMerise.getEntities().elementAt(i); ! Table t=new Table(theDatabase); ! ent.setSubsequentTable(t); ! if (ent.getData()!=null) ! { ! t.setData(new Vector(ent.getData())); ! } ! t.setName(ent.getName()); ! t.setJavaName(ent.getJavaName()); ! t.setCode(ent.getCode()); ! t.setIdMethod(ent.getIdMethod()); ! t.setSkipSql(ent.getSkipSql()); ! //t.setAbstractClass(ent.getAbstractClass()); //ni ! t.setBaseClass(ent.getBaseClass()); ! t.setBasePeer(ent.getBasePeer()); ! t.setAlias(ent.getAlias()); ! t.setJavaNamingMethod(ent.getJavaNamingMethod()); ! t.setHeavyIndexing(ent.getHeavyIndexing()); ! t.setDescription(ent.getDescription()); ! t.setNotes(ent.getNotes()); ! t.getObjectView().setLocation(ent.getObjectView().getLocation()); ! t.getObjectView().setSize(ent.getObjectView().getSize()); ! ModelMan.addTable(theDatabase,t); ! } ! for (int i=0;i<pMerise.getAssociations().size();i++) ! { ! switch (NOTools.getCardType(pMerise.getAssociationAt(i))) ! { ! case org.devaki.nextobjects.workspace.models.ConceptualModel._11_ : ! applyRule_11_(theDatabase, pMerise.getAssociationAt(i)); ! break; ! case org.devaki.nextobjects.workspace.models.ConceptualModel._1N_: ! applyRule_1N_(theDatabase, pMerise.getAssociationAt(i)); ! break; ! case org.devaki.nextobjects.workspace.models.ConceptualModel._NM_: ! applyRule_NN_(theDatabase, pMerise.getAssociationAt(i)); ! break; ! } ! } ! // work on Inheritance Link ! for (int i=0;i<pMerise.getInheritanceLinks().size();i++) ! { ! InheritanceLink iLnk=new InheritanceLink(pMerise, ! ((Entity)pMerise.getInheritanceLinkAt(i).getChildClass()) ! .getSubsequentTable(), ! ((Entity)pMerise.getInheritanceLinkAt(i).getParentClass()) ! .getSubsequentTable() ! ); ! ModelMan.addInheritanceLink(theDatabase,iLnk); } return theDatabase; --- 55,203 ---- public static void genPhysical(ConceptualModel aMerise) { ! ConceptualModel myMerise=aMerise; ! File tmp; ! tmp=new File (NOTools.TMP_DIR + "temp.erd"); ! CDMVerifier.verify(aMerise); ! if (aMerise.isVerified) ! { ! ConceptualModel anotherMerise=null; ! tmp=new File (NOTools.TMP_DIR + File.separator + "temp.erd"); ! // first I save the erd int temp. ! try ! { ! ObjectOutputStream flux = ! new ObjectOutputStream(new FileOutputStream(tmp)); ! flux.writeObject(myMerise); ! flux.flush(); ! flux.close(); ! } ! catch (Exception ioex) ! { ! logger.error("Unable to save temporary file " + tmp); ! } ! // then reload. ! try ! { ! ObjectInputStream flux=new ObjectInputStream(new FileInputStream(tmp)); ! anotherMerise=(ConceptualModel)flux.readObject(); ! flux.close(); ! } ! catch (Exception ioex) ! { ! logger.error("I can't understand file : " + ioex ); ! } ! PhysicalModel db=new PhysicalModel("--///--"); ! ModelMan.newPhysicalDatamodel(db); ! ModelMan.setCurrentModel(db); ! MeriseTransform.deduceDatabase(db,anotherMerise); ! ModelMan.resizeModelObjects(db); ! db.getPhysicalView().repaint(); ! } ! else ! { ! // the model is not verifiable. ! logger.error("I can't continue because the model is wrong."); ! } } public static PhysicalModel deduceDatabase (PhysicalModel theDatabase, ! ConceptualModel pMerise) { ! logger.warn("Using EXPERIMENTAL merise transform"); ! //PhysicalModel theDatabase=new PhysicalModel(pMerise.getName()); ! theDatabase.setName(pMerise.getName()); ! theDatabase.setCode(pMerise.getCode()); ! theDatabase.setDefaultIdMethod(pMerise.getDefaultIdMethod()); ! theDatabase.setDefaultJavaType(pMerise.getDefaultJavaType()); ! theDatabase.setPackageName(pMerise.getPackageName()); ! theDatabase.setBaseClass(pMerise.getBaseClass()); ! theDatabase.setBasePeer(pMerise.getBasePeer()); ! theDatabase.setDefaultJavaNamingMethod(pMerise.getDefaultJavaNamingMethod()); ! theDatabase.setHeavyIndexing(pMerise.getHeavyIndexing()); ! theDatabase.setDescription(pMerise.getDescription()); ! theDatabase.setNotes(pMerise.getNotes()); ! theDatabase.setAuthor(pMerise.getAuthor()); ! theDatabase.setAuthorEmail(pMerise.getAuthorEmail()); ! theDatabase.setCompany(pMerise.getCompany()); ! theDatabase.setProjectURL(pMerise.getProjectURL()); ! //theDatabase.setSqlFile(pMerise.getSql); ! theDatabase.setCreateDatabaseUrl(pMerise.getCreateDatabaseUrl()); ! theDatabase.setBuildDatabaseUrl(pMerise.getBuildDatabaseUrl()); ! theDatabase.setSchema(pMerise.getSchema()); ! theDatabase.setDatabaseHost(pMerise.getDatabaseHost()); ! theDatabase.setDatabasePassword(pMerise.getDatabasePassword()); ! theDatabase.setDatabaseUser(pMerise.getDatabaseUser()); ! theDatabase.setDbType(pMerise.getDbType()); ! theDatabase.setFileForSave(pMerise.getFileForSave()); ! theDatabase.setProjectURL(pMerise.getProjectURL()); ! // CustomTreeNode newNode=new CustomTreeNode(theDatabase); ! //theDatabase.setDynamicTreeNode(newNode); ! Entity ent; ! // rule I: each entity become a table. ! for (int i=0;i<pMerise.getEntities().size();i++) ! { ! ent=(Entity)pMerise.getEntities().elementAt(i); ! Table t=new Table(theDatabase); ! ent.setSubsequentTable(t); ! if (ent.getData()!=null) ! { ! t.setData(new Vector(ent.getData())); ! } ! t.setName(ent.getName()); ! t.setJavaName(ent.getJavaName()); ! t.setCode(ent.getCode()); ! t.setIdMethod(ent.getIdMethod()); ! t.setSkipSql(ent.getSkipSql()); ! //t.setAbstractClass(ent.getAbstractClass()); //ni ! t.setBaseClass(ent.getBaseClass()); ! t.setBasePeer(ent.getBasePeer()); ! t.setAlias(ent.getAlias()); ! t.setJavaNamingMethod(ent.getJavaNamingMethod()); ! t.setHeavyIndexing(ent.getHeavyIndexing()); ! t.setDescription(ent.getDescription()); ! t.setNotes(ent.getNotes()); ! t.getObjectView().setLocation(ent.getObjectView().getLocation()); ! t.getObjectView().setSize(ent.getObjectView().getSize()); ! ModelMan.addTable(theDatabase,t); ! } ! for (int i=0;i<pMerise.getAssociations().size();i++) ! { ! switch (NOTools.getCardType(pMerise.getAssociationAt(i))) ! { ! case org.devaki.nextobjects.workspace.models.ConceptualModel._11_ : ! applyRule_11_(theDatabase, pMerise.getAssociationAt(i)); ! break; ! case org.devaki.nextobjects.workspace.models.ConceptualModel._1N_: ! applyRule_1N_(theDatabase, pMerise.getAssociationAt(i)); ! break; ! case org.devaki.nextobjects.workspace.models.ConceptualModel._NM_: ! applyRule_NN_(theDatabase, pMerise.getAssociationAt(i)); ! break; ! } ! } ! // work on Inheritance Link ! for (int i=0;i<pMerise.getInheritanceLinks().size();i++) ! { ! InheritanceLink iLnk=new InheritanceLink(pMerise, ! ((Entity)pMerise.getInheritanceLinkAt(i).getChildClass()) ! .getSubsequentTable(), ! ((Entity)pMerise.getInheritanceLinkAt(i).getParentClass()) ! .getSubsequentTable() ! ); ! ModelMan.addInheritanceLink(theDatabase,iLnk); } return theDatabase; *************** *** 205,229 **** private static void applyRule_11_(PhysicalModel theDatabase, ! Association pAsso) { // Rule 2 : In case of 1:1 relation, table must share the same key. int card_is=((AssociationLink)pAsso.getMyAssociationLinks() ! .elementAt(0)).getCard(); int is_card=((AssociationLink)pAsso.getMyAssociationLinks() ! .elementAt(1)).getCard(); // if we have 1,1 - 1,1 the table can be the same (fusion) // if we have 1,1 - 0,1 we can apply rule 2. if (card_is==ConceptualModel._11_ && is_card==ConceptualModel._11_) { ! applyFusion(theDatabase,pAsso); } else { ! applyRule_11a_(theDatabase,pAsso); } } private static void applyFusion(PhysicalModel theDatabase, ! Association pAsso) { // all the table of this association are going to be fusioned. --- 205,229 ---- private static void applyRule_11_(PhysicalModel theDatabase, ! Association pAsso) { // Rule 2 : In case of 1:1 relation, table must share the same key. int card_is=((AssociationLink)pAsso.getMyAssociationLinks() ! .elementAt(0)).getCard(); int is_card=((AssociationLink)pAsso.getMyAssociationLinks() ! .elementAt(1)).getCard(); // if we have 1,1 - 1,1 the table can be the same (fusion) // if we have 1,1 - 0,1 we can apply rule 2. if (card_is==ConceptualModel._11_ && is_card==ConceptualModel._11_) { ! applyFusion(theDatabase,pAsso); } else { ! applyRule_11a_(theDatabase,pAsso); } } private static void applyFusion(PhysicalModel theDatabase, ! Association pAsso) { // all the table of this association are going to be fusioned. *************** *** 233,238 **** for (int i=0;i<pAsso.getData().size();i++) { ! Column tmpColumn=new Column((Column)pAsso.getData().elementAt(i)); ! pAsso.getEntityAt(0).getSubsequentTable().getData().addElement(tmpColumn); } --- 233,238 ---- for (int i=0;i<pAsso.getData().size();i++) { ! Column tmpColumn=new Column((Column)pAsso.getData().elementAt(i)); ! pAsso.getEntityAt(0).getSubsequentTable().getData().addElement(tmpColumn); } *************** *** 240,271 **** for (int j=1;j<pAsso.countMyAssociationLinks();j++) { ! // j start at 1 in order to omit he first table. ! for (int i=0;i<pAsso.getEntityAt(j).getData().size();i++) ! { ! Column tmpColumn=new Column( ! (Column)pAsso.getEntityAt(j).getData().elementAt(i)); ! pAsso.getEntityAt(0).getSubsequentTable().getData() ! .addElement(tmpColumn); ! } ! //remove the old table. ! ModelMan.removeTable(theDatabase, ! pAsso.getEntityAt(j).getSubsequentTable()); ! // fix new name,code. ! String newCode=pAsso.getEntityAt(0).getSubsequentTable().getCode() + "_" ! + pAsso.getEntityAt(j).getSubsequentTable().getCode(); ! pAsso.getEntityAt(0).getSubsequentTable().setCode(newCode); ! pAsso.getEntityAt(0).getSubsequentTable().setName(newCode); } } private static void applyRule_11a_(PhysicalModel theDatabase, ! Association pAsso) { Column tmpColumn; int card_is=((AssociationLink)pAsso.getMyAssociationLinks() ! .elementAt(0)).getCard(); int is_card=((AssociationLink)pAsso.getMyAssociationLinks() ! .elementAt(1)).getCard(); // Rule 2 : In case of 1:1 relation, table must share the same key. // this could have be donne differently, by reversing right/left but also --- 240,271 ---- for (int j=1;j<pAsso.countMyAssociationLinks();j++) { ! // j start at 1 in order to omit he first table. ! for (int i=0;i<pAsso.getEntityAt(j).getData().size();i++) ! { ! Column tmpColumn=new Column( ! (Column)pAsso.getEntityAt(j).getData().elementAt(i)); ! pAsso.getEntityAt(0).getSubsequentTable().getData() ! .addElement(tmpColumn); ! } ! //remove the old table. ! ModelMan.removeTable(theDatabase, ! pAsso.getEntityAt(j).getSubsequentTable()); ! // fix new name,code. ! String newCode=pAsso.getEntityAt(0).getSubsequentTable().getCode() + "_" ! + pAsso.getEntityAt(j).getSubsequentTable().getCode(); ! pAsso.getEntityAt(0).getSubsequentTable().setCode(newCode); ! pAsso.getEntityAt(0).getSubsequentTable().setName(newCode); } } private static void applyRule_11a_(PhysicalModel theDatabase, ! Association pAsso) { Column tmpColumn; int card_is=((AssociationLink)pAsso.getMyAssociationLinks() ! .elementAt(0)).getCard(); int is_card=((AssociationLink)pAsso.getMyAssociationLinks() ! .elementAt(1)).getCard(); // Rule 2 : In case of 1:1 relation, table must share the same key. // this could have be donne differently, by reversing right/left but also *************** *** 281,286 **** // Tables must share the same PK. pAsso.getEntityAt(1).getSubsequentTable().getData() ! .removeElement(pAsso.getEntityAt(1).getSubsequentTable() ! .getPrimaryKeys().firstElement()); pAsso.getEntityAt(1).getSubsequentTable().getData().addElement(tmpColumn); --- 281,286 ---- // Tables must share the same PK. pAsso.getEntityAt(1).getSubsequentTable().getData() ! .removeElement(pAsso.getEntityAt(1).getSubsequentTable() ! .getPrimaryKeys().firstElement()); pAsso.getEntityAt(1).getSubsequentTable().getData().addElement(tmpColumn); *************** *** 288,309 **** // now work in adding 2 constraints Constraint newCst=new Constraint( theDatabase, ! pAsso.getEntityAt(0).getSubsequentTable(), ! pAsso.getEntityAt(1).getSubsequentTable()); newCst.setUniqueField((Column)pAsso.getEntityAt(0).getSubsequentTable() ! .getPrimaryKeys().firstElement()); newCst.setAnyField((Column)pAsso.getEntityAt(1).getSubsequentTable() ! .getPrimaryKeys().firstElement()); ModelMan.addConstraint(theDatabase,newCst); Constraint newCst2=new Constraint( theDatabase, ! pAsso.getEntityAt(1).getSubsequentTable(), ! pAsso.getEntityAt(0).getSubsequentTable()); newCst2.setUniqueField((Column)pAsso.getEntityAt(1).getSubsequentTable() ! .getPrimaryKeys().lastElement()); newCst2.setAnyField((Column)pAsso.getEntityAt(0).getSubsequentTable() ! .getPrimaryKeys().lastElement()); ModelMan.addConstraint(theDatabase,newCst2); --- 288,309 ---- // now work in adding 2 constraints Constraint newCst=new Constraint( theDatabase, ! pAsso.getEntityAt(0).getSubsequentTable(), ! pAsso.getEntityAt(1).getSubsequentTable()); newCst.setUniqueField((Column)pAsso.getEntityAt(0).getSubsequentTable() ! .getPrimaryKeys().firstElement()); newCst.setAnyField((Column)pAsso.getEntityAt(1).getSubsequentTable() ! .getPrimaryKeys().firstElement()); ModelMan.addConstraint(theDatabase,newCst); Constraint newCst2=new Constraint( theDatabase, ! pAsso.getEntityAt(1).getSubsequentTable(), ! pAsso.getEntityAt(0).getSubsequentTable()); newCst2.setUniqueField((Column)pAsso.getEntityAt(1).getSubsequentTable() ! .getPrimaryKeys().lastElement()); newCst2.setAnyField((Column)pAsso.getEntityAt(0).getSubsequentTable() ! .getPrimaryKeys().lastElement()); ModelMan.addConstraint(theDatabase,newCst2); *************** *** 311,388 **** //now work on association fields, if any property in the relation. for (int i=0;i<pAsso.getData().size();i++) { ! tmpColumn=new Column((Column)pAsso.getData().elementAt(i)); ! if (is_card==ConceptualModel._01_ || card_is==ConceptualModel._01_) ! { ! tmpColumn.setRequired(false); ! } ! pAsso.getEntityAt(0).getSubsequentTable().getData() ! .addElement(tmpColumn); } } - - /* - * This transformation rule deal with 1 --> * relation. - * - * Rule 3 : : In the case of entities connected by associations of the 1:n - * type, each table has its own key, but the key of the entity side 0,n (or - * 1,n) migrates towards the table side 0,1 (or 1,1) and becomes a foreign - * key (secondary index). - * - * Thanks to Romeo Benzoni for his submission/review. - * - * @param theDatabase Database context - * @param theAssociation Association to be treated - * @see http://www.devaki.org/transformation.html - */ - private static void applyRule_1N_(PhysicalModel theDatabase, ! Association pAsso) { ! /* Rule 3 */ Column newField; ! Constraint newCst=null; ! if (pAsso.getCardAt(1)==ConceptualModel._0N_ ! || pAsso.getCardAt(1)==ConceptualModel._1N_) { ! // ... ! newCst=new Constraint(theDatabase, ! pAsso.getEntityAt(1).getSubsequentTable(), ! pAsso.getEntityAt(0).getSubsequentTable()); ! newField=new Column(pAsso.getEntityAt(1).getIdentifier()); ! newField.setAutoIncrement(false); // always in that case! ! pAsso.getEntityAt(0).getSubsequentTable().getData().addElement(newField); ! // If the type of relation is 1:n, it is advisable to make slip the ! // attributes towards entity provided with cardinalities the 1:1. ! for (int i=0;i<pAsso.getData().size();i++) ! { ! pAsso.getEntityAt(0).getSubsequentTable().getData() ! .addElement(new Column((Column)pAsso.getData().elementAt(i))); ! } ! newCst.setUniqueField( ! pAsso.getEntityAt(1).getIdentifier()); ! newCst.setAnyField(newField); ! pAsso.getEntityAt(0).getSubsequentTable().setIdMethod("none"); } else { ! // ... ! newCst=new Constraint(theDatabase, ! pAsso.getEntityAt(0).getSubsequentTable(), ! pAsso.getEntityAt(1).getSubsequentTable()); ! newField=new Column(pAsso.getEntityAt(0).getIdentifier()); ! newField.setAutoIncrement(false); ! pAsso.getEntityAt(1).getSubsequentTable().getData().addElement(newField); ! // If the type of relation is 1:n, it is advisable to make slip the ! // attributes towards entity provided with cardinalities 1:1. ! for (int i=0;i<pAsso.getData().size();i++) { ! pAsso.getEntityAt(1).getSubsequentTable().getData() ! .addElement(new Column((Column)pAsso.getData().elementAt(i))); ! } ! newCst.setUniqueField(pAsso.getEntityAt(0).getIdentifier()); ! newCst.setAnyField(newField); ! pAsso.getEntityAt(1).getSubsequentTable().setIdMethod("none"); } ModelMan.addConstraint(theDatabase,newCst); --- 311,372 ---- //now work on association fields, if any property in the relation. for (int i=0;i<pAsso.getData().size();i++) { ! tmpColumn=new Column((Column)pAsso.getData().elementAt(i)); ! if (is_card==ConceptualModel._01_ || card_is==ConceptualModel._01_) ! { ! tmpColumn.setRequired(false); ! } ! pAsso.getEntityAt(0).getSubsequentTable().getData() ! .addElement(tmpColumn); } } private static void applyRule_1N_(PhysicalModel theDatabase, ! Association pAsso) { ! // Rule 3 : : In the case of entities connected by associations of the 1:n ! // type, each table has its own key, but the key of the entity side 0,n (or ! // 1,n) migrates towards the table side 0,1 (or 1,1) and becomes a foreign ! // key (secondary index). ! Column newField; ! Constraint newCst=new Constraint(theDatabase, ! pAsso.getEntityAt(0).getSubsequentTable(), ! pAsso.getEntityAt(1).getSubsequentTable()); ! if (pAsso.getCardAt(0)==ConceptualModel._0N_ ! && pAsso.getCardAt(0)==ConceptualModel._1N_) { ! // ... ! newField=new Column(pAsso.getEntityAt(1).getIdentifier()); ! newField.setAutoIncrement(false); // always in that case! ! pAsso.getEntityAt(0).getSubsequentTable().getData().addElement(newField); ! // If the type of relation is 1:n, it is advisable to make slip the ! // attributes towards entitY provided with cardinalities the 1:1. ! for (int i=0;i<pAsso.getData().size();i++) ! { ! pAsso.getEntityAt(0).getSubsequentTable().getData() ! .addElement(new Column((Column)pAsso.getData().elementAt(i))); ! } ! newCst.setUniqueField( ! pAsso.getEntityAt(1).getIdentifier()); ! newCst.setAnyField(newField); ! pAsso.getEntityAt(0).getSubsequentTable().setIdMethod("none"); } else { ! // ... ! newField=new Column(pAsso.getEntityAt(0).getIdentifier()); ! newField.setAutoIncrement(false); ! pAsso.getEntityAt(1).getSubsequentTable().getData().addElement(newField); ! // If the type of relation is 1:n, it is advisable to make slip the ! // attributes towards entity provided with cardinalities 1:1. ! for (int i=0;i<pAsso.getData().size();i++) { ! pAsso.getEntityAt(1).getSubsequentTable().getData() ! .addElement(new Column((Column)pAsso.getData().elementAt(i))); ! } ! newCst.setUniqueField(pAsso.getEntityAt(0).getIdentifier()); ! newCst.setAnyField(newField); ! pAsso.getEntityAt(1).getSubsequentTable().setIdMethod("none"); } ModelMan.addConstraint(theDatabase,newCst); *************** *** 390,394 **** private static void applyRule_NN_(PhysicalModel theDatabase, ! Association pAsso) { --- 374,378 ---- private static void applyRule_NN_(PhysicalModel theDatabase, ! Association pAsso) { *************** *** 422,427 **** for (int i=0;i<pAsso.getData().size();i++) { ! newTable.getData().addElement(new Column( ! (Column)pAsso.getData().elementAt(i))); } --- 406,411 ---- for (int i=0;i<pAsso.getData().size();i++) { ! newTable.getData().addElement(new Column( ! (Column)pAsso.getData().elementAt(i))); } *************** *** 430,445 **** for (int i=0;i<pAsso.getMyAssociationLinks().size();i++) { ! newField=new Column(pAsso.getIdentifierAt(i)); ! newField.setPrimaryKey(true); ! newField.setRequired(true); ! newField.setAutoIncrement(false); // always in that case! ! newTable.getData().addElement(newField); ! newCst=new Constraint(theDatabase,pAsso.getEntityAt(i) ! .getSubsequentTable(),newTable); ! newCst.setAnyField(newField); ! newCst.setUniqueField(pAsso.getIdentifierAt(i)); ! ModelMan.addConstraint(theDatabase,newCst); } ModelMan.addTable(theDatabase,newTable); } ! } --- 414,429 ---- for (int i=0;i<pAsso.getMyAssociationLinks().size();i++) { ! newField=new Column(pAsso.getIdentifierAt(i)); ! newField.setPrimaryKey(true); ! newField.setRequired(true); ! newField.setAutoIncrement(false); // always in that case! ! newTable.getData().addElement(newField); ! newCst=new Constraint(theDatabase,pAsso.getEntityAt(i) ! .getSubsequentTable(),newTable); ! newCst.setAnyField(newField); ! newCst.setUniqueField(pAsso.getIdentifierAt(i)); ! ModelMan.addConstraint(theDatabase,newCst); } ModelMan.addTable(theDatabase,newTable); } ! } \ No newline at end of file Index: NOTools.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NOTools.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** NOTools.java 3 May 2003 20:46:28 -0000 1.10 --- NOTools.java 25 May 2003 08:02:36 -0000 1.11 *************** *** 509,545 **** } ! public static int getCardType(Association theAssociation) { int card_is=((AssociationLink)theAssociation.getMyAssociationLinks().elementAt(0)).getCard(); int is_card=((AssociationLink)theAssociation.getMyAssociationLinks().elementAt(1)).getCard(); ! int cardType; ! /* ********************************** ! CARDS RESULT MAP ! CARDIS 01 11 0N 1N ! ISCARD ! 01 11 11 1N 1N ! 11 11 11 1N 1N ! 0N 1N 1N NM NM ! 1N 1N 1N NM NM ! **************************************/ - if (card_is==ConceptualModel._01_ || card_is==ConceptualModel._11_) { - // type 1... - if (is_card==ConceptualModel._01_ || is_card==ConceptualModel._11_) { - cardType=ConceptualModel._11_; - } else { - cardType=ConceptualModel._1N_; - } - } else { // Ou 0N ou 1N - //type N... - if (is_card==ConceptualModel._01_ || is_card==ConceptualModel._11_) { - //type 1,N - cardType=ConceptualModel._1N_; - } else { - //type NM - cardType=ConceptualModel._NM_; - } - } // In any case overwrite previous switch if (theAssociation.getMyAssociationLinks().size()>2) --- 509,539 ---- } + /** + * return the type of the relation (11,1N,1N) + * so we know wich Merise rule to apply for + * a given association (cardinalities) + * + * card_is 01 11 0N 1N + * is_card --------------------------------- + * 01 | 11 11 NM NM + * 11 | 11 11 1N 1N + * 0N | NM 1N NM NM + * 1N | NM 1N NM NM + * + * @param theAssociation + * @return + */ ! public static int getCardType(Association theAssociation) { int card_is=((AssociationLink)theAssociation.getMyAssociationLinks().elementAt(0)).getCard(); int is_card=((AssociationLink)theAssociation.getMyAssociationLinks().elementAt(1)).getCard(); ! ! int [][] results= { {ConceptualModel._11_ ,ConceptualModel._11_ ,ConceptualModel._NM_ ,ConceptualModel._NM_ }, ! {ConceptualModel._11_,ConceptualModel._11_ ,ConceptualModel._1N_ ,ConceptualModel._1N_ }, ! {ConceptualModel._NM_ ,ConceptualModel._1N_ ,ConceptualModel._NM_ ,ConceptualModel._NM_ }, ! {ConceptualModel._NM_,ConceptualModel._1N_ ,ConceptualModel._NM_ ,ConceptualModel._NM_ }} ; ! int cardType=results[card_is][is_card]; // In any case overwrite previous switch if (theAssociation.getMyAssociationLinks().size()>2) |
From: <efl...@us...> - 2003-05-25 08:02:40
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/icons In directory sc8-pr-cvs1:/tmp/cvs-serv12214/src/org/devaki/nextobjects/icons Modified Files: splash.png Log Message: Fixed major bug in merise transform. Index: splash.png =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/icons/splash.png,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Binary files /tmp/cvsIWXNix and /tmp/cvsmqa0zW differ |
From: <efl...@us...> - 2003-05-25 08:02:40
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/sample In directory sc8-pr-cvs1:/tmp/cvs-serv12214/sample Modified Files: videoclub.cdm Log Message: Fixed major bug in merise transform. Index: videoclub.cdm =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/sample/videoclub.cdm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** videoclub.cdm 6 Apr 2003 14:19:28 -0000 1.7 --- videoclub.cdm 25 May 2003 08:02:35 -0000 1.8 *************** *** 18,24 **** <databasePassword /> </databaseProperties> ! <inheritanceLink childClass="Director" parentClass="People" /> ! <inheritanceLink childClass="Actor" parentClass="People" /> ! <entity name="Movie" javaName="" idMethod="null" skipSql="false" abstract="false" baseClass="" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5391" y="2645" width="71" height="124"> <code>Movie</code> <notes /> --- 18,22 ---- <databasePassword /> </databaseProperties> ! <entity name="Movie" javaName="" idMethod="null" skipSql="false" abstract="false" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5420" y="2639" width="71" height="139"> <code>Movie</code> <notes /> *************** *** 32,41 **** <column name="comments" javaName="" code="COMMENTS" primaryKey="false" required="true" type="VARCHAR" javaType="primitive" size="255" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> </entity> ! <entity name="CATEGORIES" javaName="" idMethod="null" skipSql="false" abstract="false" baseClass="" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5039" y="2765" width="92" height="33"> <code>CATEGORIES</code> <notes /> <column name="categorieid" javaName="" code="CATEGORIEID" primaryKey="true" required="true" type="INTEGER" javaType="primitive" size="" default="" autoIncrement="true" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> </entity> ! <entity name="Tape" javaName="" idMethod="none" skipSql="false" abstract="false" baseClass="" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5212" y="2512" width="57" height="46"> <code>Tape</code> <notes /> --- 30,41 ---- <column name="comments" javaName="" code="COMMENTS" primaryKey="false" required="true" type="VARCHAR" javaType="primitive" size="255" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> </entity> ! <entity name="CATEGORIES" javaName="" idMethod="null" skipSql="false" abstract="false" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5165" y="2702" width="92" height="48"> <code>CATEGORIES</code> <notes /> <column name="categorieid" javaName="" code="CATEGORIEID" primaryKey="true" required="true" type="INTEGER" javaType="primitive" size="" default="" autoIncrement="true" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> + <column name="Item 1" javaName="" code="ITEM_1" primaryKey="false" required="false" type="VARCHAR" javaType="primitive" size="255" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> + <column name="Item 2" javaName="" code="ITEM_2" primaryKey="false" required="false" type="VARCHAR" javaType="primitive" size="255" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> </entity> ! <entity name="Tape" javaName="" idMethod="none" skipSql="false" abstract="false" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5232" y="2527" width="57" height="61"> <code>Tape</code> <notes /> *************** *** 43,47 **** <column name="dispo" javaName="" code="dispo" primaryKey="false" required="false" type="BOOLEANCHAR" javaType="primitive" size="" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> </entity> ! <entity name="CUSTORMER" javaName="" idMethod="null" skipSql="false" abstract="false" baseClass="" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5652" y="2541" width="85" height="46"> <code>CUSTORMER</code> <notes /> --- 43,47 ---- <column name="dispo" javaName="" code="dispo" primaryKey="false" required="false" type="BOOLEANCHAR" javaType="primitive" size="" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> </entity> ! <entity name="CUSTORMER" javaName="" idMethod="null" skipSql="false" abstract="false" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5547" y="2566" width="85" height="61"> <code>CUSTORMER</code> <notes /> *************** *** 49,58 **** <column name="name" javaName="" code="NAME" primaryKey="false" required="false" type="VARCHAR" javaType="primitive" size="32" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> </entity> ! <entity name="Actor" javaName="" idMethod="none" skipSql="false" abstract="false" baseClass="org.devaki.nextobjects.sample.Base" basePeer="org.devaki.nextobjects.sample.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5606" y="2835" width="64" height="33"> <code>Actor</code> <notes /> <column name="actorid" javaName="" code="ACTORID" primaryKey="true" required="true" type="INTEGER" javaType="primitive" size="" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> </entity> ! <entity name="Director" javaName="" idMethod="none" skipSql="false" abstract="false" baseClass="org.devaki.nextobjects.sample.Base" basePeer="org.devaki.nextobjects.sample.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5291" y="2887" width="85" height="46"> <code>Director</code> <notes /> --- 49,58 ---- <column name="name" javaName="" code="NAME" primaryKey="false" required="false" type="VARCHAR" javaType="primitive" size="32" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> </entity> ! <entity name="Actor" javaName="" idMethod="none" skipSql="false" abstract="false" baseClass="org.devaki.nextobjects.sample.Base" basePeer="org.devaki.nextobjects.sample.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5606" y="2835" width="64" height="48"> <code>Actor</code> <notes /> <column name="actorid" javaName="" code="ACTORID" primaryKey="true" required="true" type="INTEGER" javaType="primitive" size="" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> </entity> ! <entity name="Director" javaName="" idMethod="none" skipSql="false" abstract="false" baseClass="org.devaki.nextobjects.sample.Base" basePeer="org.devaki.nextobjects.sample.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5312" y="2878" width="85" height="61"> <code>Director</code> <notes /> *************** *** 60,72 **** <column name="biography" javaName="" code="biography" primaryKey="false" required="false" type="CLOB" javaType="primitive" size="" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> </entity> ! <entity name="People" javaName="" idMethod="none" skipSql="false" abstract="false" baseClass="" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5470" y="2901" width="78" height="72"> ! <code>People</code> ! <notes /> ! <column name="peopleid" javaName="" code="peopleid" primaryKey="true" required="true" type="INTEGER" javaType="primitive" size="" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> ! <column name="firstname" javaName="" code="firstname" primaryKey="false" required="false" type="VARCHAR" javaType="primitive" size="32" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> ! <column name="lastname" javaName="" code="lastname" primaryKey="false" required="false" type="VARCHAR" javaType="primitive" size="32" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> ! <column name="birthdate" javaName="" code="birthdate" primaryKey="false" required="false" type="DATE" javaType="primitive" size="" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> ! </entity> ! <association name="HAVE_DIRECTED" javaName="" idMethod="null" skipSql="false" abstract="false" baseClass="" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5070" y="2830" width="106" height="20"> <code>HAVE_DIRECTED</code> <notes /> --- 60,64 ---- <column name="biography" javaName="" code="biography" primaryKey="false" required="false" type="CLOB" javaType="primitive" size="" default="" autoIncrement="false" inheritance="false" inputValidator="" javaNamingMethod="null" description="" /> </entity> ! <association name="HAVE_DIRECTED" javaName="" idMethod="null" skipSql="false" abstract="false" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5298" y="2805" width="106" height="35"> <code>HAVE_DIRECTED</code> <notes /> *************** *** 74,78 **** <associationLink linkedEntity="Director" cardinality="3" /> </association> ! <association name="IS_OF" javaName="" idMethod="null" skipSql="false" abstract="false" baseClass="" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5101" y="2649" width="50" height="20"> <code>IS_OF</code> <notes /> --- 66,70 ---- <associationLink linkedEntity="Director" cardinality="3" /> </association> ! <association name="IS_OF" javaName="" idMethod="null" skipSql="false" abstract="false" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5301" y="2703" width="50" height="35"> <code>IS_OF</code> <notes /> *************** *** 80,84 **** <associationLink linkedEntity="Movie" cardinality="3" /> </association> ! <association name="RECORDED" javaName="" idMethod="null" skipSql="false" abstract="false" baseClass="" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5204" y="2611" width="71" height="20"> <code>RECORDED</code> <notes /> --- 72,76 ---- <associationLink linkedEntity="Movie" cardinality="3" /> </association> ! <association name="RECORDED" javaName="" idMethod="null" skipSql="false" abstract="false" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5204" y="2611" width="71" height="35"> <code>RECORDED</code> <notes /> *************** *** 86,90 **** <associationLink linkedEntity="Tape" cardinality="1" /> </association> ! <association name="PLAY_IN" javaName="" idMethod="null" skipSql="false" abstract="false" baseClass="" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5621" y="2722" width="64" height="20"> <code>PLAY_IN</code> <notes /> --- 78,82 ---- <associationLink linkedEntity="Tape" cardinality="1" /> </association> ! <association name="PLAY_IN" javaName="" idMethod="null" skipSql="false" abstract="false" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5621" y="2722" width="64" height="35"> <code>PLAY_IN</code> <notes /> *************** *** 92,96 **** <associationLink linkedEntity="Actor" cardinality="3" /> </association> ! <association name="RENT" javaName="" idMethod="null" skipSql="false" abstract="false" baseClass="" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5472" y="2573" width="43" height="20"> <code>RENT</code> <notes /> --- 84,88 ---- <associationLink linkedEntity="Actor" cardinality="3" /> </association> ! <association name="RENT" javaName="" idMethod="null" skipSql="false" abstract="false" basePeer="org.apache.torque.util.BasePeer" alias="" javaNamingMethod="null" heavyIndexing="false" description="" x="5370" y="2542" width="43" height="35"> <code>RENT</code> <notes /> |