[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Entity.java,NONE,1.1 Edge.java,1.23,1
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2005-12-19 19:38:04
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31996/src/net/sourceforge/bprocessor/model Modified Files: Edge.java Vertex.java Surface.java Space.java Added Files: Entity.java Log Message: Entity added as superclass for Space, Surface, Edge and Vertex Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** Surface.java 19 Dec 2005 07:50:06 -0000 1.56 --- Surface.java 19 Dec 2005 19:37:54 -0000 1.57 *************** *** 7,11 **** package net.sourceforge.bprocessor.model; - import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; --- 7,10 ---- *************** *** 26,36 **** * usage="read-write" */ ! public class Surface implements Serializable { /** The logger */ private static Logger log = Logger.getLogger(Surface.class); - /** The id */ - private Long id; - /** Constructor */ private boolean constructor; --- 25,32 ---- * usage="read-write" */ ! public class Surface extends Entity { /** The logger */ private static Logger log = Logger.getLogger(Surface.class); /** Constructor */ private boolean constructor; *************** *** 74,96 **** /** - * Get the id - * @return The id - * @hibernate.id - * column="SURFACE_ID" - * generator-class="increment" - */ - public Long getId() { - return id; - } - - /** - * Set the id - * @param id The id - */ - public void setId(Long id) { - this.id = id; - } - - /** * Get the name * @return The name --- 70,73 ---- Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Space.java 12 Dec 2005 20:18:52 -0000 1.9 --- Space.java 19 Dec 2005 19:37:54 -0000 1.10 *************** *** 7,11 **** package net.sourceforge.bprocessor.model; - import java.io.Serializable; import java.util.HashSet; import java.util.Set; --- 7,10 ---- *************** *** 20,26 **** * column="DOMAIN_ID" */ ! public class Space implements Serializable { ! /** The id */ ! private Long id; /** The name */ private String name; --- 19,23 ---- * column="DOMAIN_ID" */ ! public class Space extends Entity { /** The name */ private String name; *************** *** 66,88 **** /** - * Get the id - * @return The id - * @hibernate.id - * column="DOMAIN_ID" - * generator-class="increment" - */ - public Long getId() { - return id; - } - - /** - * Set the id - * @param id The id - */ - public void setId(Long id) { - this.id = id; - } - - /** * Get the name * @return The name --- 63,66 ---- Index: Vertex.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Vertex.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Vertex.java 19 Dec 2005 07:50:05 -0000 1.17 --- Vertex.java 19 Dec 2005 19:37:54 -0000 1.18 *************** *** 7,11 **** package net.sourceforge.bprocessor.model; - import java.io.Serializable; import java.util.HashSet; import java.util.Iterator; --- 7,10 ---- *************** *** 22,34 **** * usage="read-write" */ ! public class Vertex implements Serializable { /** The logger */ private static Logger log = Logger.getLogger(Vertex.class); - /** The id */ - private Long id; - - - /** The x coordinate */ private double x; --- 21,28 ---- * usage="read-write" */ ! public class Vertex extends Entity { /** The logger */ private static Logger log = Logger.getLogger(Vertex.class); /** The x coordinate */ private double x; *************** *** 60,82 **** /** - * Get the id - * @return The id - * @hibernate.id - * column="VERTEX_ID" - * generator-class="increment" - */ - public Long getId() { - return id; - } - - /** - * Set the id - * @param id The id - */ - public void setId(Long id) { - this.id = id; - } - - /** * Get the name * @return The name --- 54,57 ---- Index: Edge.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Edge.java 19 Dec 2005 07:50:05 -0000 1.23 --- Edge.java 19 Dec 2005 19:37:53 -0000 1.24 *************** *** 7,12 **** package net.sourceforge.bprocessor.model; - import java.io.Serializable; - import org.apache.log4j.Logger; --- 7,10 ---- *************** *** 23,33 **** * usage="read-write" */ ! public class Edge implements Serializable { /** The logger */ private static Logger log = Logger.getLogger(Edge.class); - /** The id */ - private Long id; - /** The start vertex */ private Vertex from; --- 21,28 ---- * usage="read-write" */ ! public class Edge extends Entity { /** The logger */ private static Logger log = Logger.getLogger(Edge.class); /** The start vertex */ private Vertex from; *************** *** 56,93 **** /** - * Get the id - * @return The id - * @hibernate.id - * column="EDGE_ID" - * generator-class="increment" - */ - public Long getId() { - return id; - } - - /** - * Set the id - * @param id The id - */ - public void setId(Long id) { - this.id = id; - } - - /** - * Get the name - * @return The name - * @hibernate.property - */ - public String getName() { - String name; - if (id == null) { - name = "E"; - } else { - name = "E" + id; - } - return name; - } - - /** * Get the to vertex * @return The end vertex --- 51,54 ---- *************** *** 144,147 **** --- 105,124 ---- } + + /** + * Get the name + * @return The name + * @hibernate.property + */ + public String getName() { + String name; + if (id == null) { + name = "E"; + } else { + name = "E" + id; + } + return name; + } + /** * Return the other vertex than the given one, if the given one is one of them --- NEW FILE: Entity.java --- //--------------------------------------------------------------------------------- // $Id: Entity.java,v 1.1 2005/12/19 19:37:54 henryml Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model; import java.io.Serializable; /** * The entity class */ public class Entity implements Serializable { /** The id */ protected Long id; /** * Get the id * @return The id * @hibernate.id * column="EDGE_ID" * generator-class="increment" */ public Long getId() { return id; } /** * Set the id * @param id The id */ public void setId(Long id) { this.id = id; } /** * Get the name * @return The name */ public String getName() { return "Entity"; } } |