[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model MemoryFacade.java,1.6,1.7 Project.jav
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-01-16 11:43:06
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3369/src/net/sourceforge/bprocessor/model Modified Files: MemoryFacade.java Project.java DatabaseFacade.java Log Message: Cleaning up Index: DatabaseFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/DatabaseFacade.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DatabaseFacade.java 12 Dec 2005 20:18:52 -0000 1.6 --- DatabaseFacade.java 16 Jan 2006 11:42:50 -0000 1.7 *************** *** 37,47 **** */ public abstract void intern(Object o); - - /** - * Update an object - * @param o The object - */ - public abstract void update(Object o); - /** * Remove and object --- 37,40 ---- *************** *** 51,61 **** /** - * Find a attribute by id - * @param id The id - * @return The attribute - */ - public abstract Attribute findAttributeById(Long id); - - /** * Find all construction spaces * @return The construction spaces --- 44,47 ---- *************** *** 64,78 **** /** - * Find a construction space by id - * @param id The id - * @return The construction space - */ - public abstract ConstructionSpace findConstructionSpaceById(Long id); - - /** * Find all domains * @return the set of all domains */ ! public abstract Set getDomains(); /** --- 50,57 ---- /** * Find all domains * @return the set of all domains */ ! public abstract Set getSpaces(); /** *************** *** 81,85 **** * @return The domain */ ! public abstract Space findDomainById(Long id); /** --- 60,64 ---- * @return The domain */ ! public abstract Space findSpaceById(Long id); /** Index: MemoryFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/MemoryFacade.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MemoryFacade.java 12 Dec 2005 20:18:52 -0000 1.6 --- MemoryFacade.java 16 Jan 2006 11:42:50 -0000 1.7 *************** *** 35,41 **** /** The domains */ ! private HashMap domains = new HashMap(); /** The domain id */ ! private long domainId; /** --- 35,41 ---- /** The domains */ ! private HashMap spaces = new HashMap(); /** The domain id */ ! private long spaceId; /** *************** *** 63,67 **** v.setId(new Long(vertexId++)); vertices.put(v.getId(), v); - //System.out.println("v-intern " + v.toString()); } --- 63,66 ---- *************** *** 73,77 **** e.setId(new Long(edgeId++)); edges.put(e.getId(), e); - //System.out.println("e-intern " + e.toString()); } --- 72,75 ---- *************** *** 83,87 **** s.setId(new Long(surfaceId++)); surfaces.put(s.getId(), s); - //System.out.println("s-intern " + s.toString()); } --- 81,84 ---- *************** *** 91,104 **** */ private void intern(Space d) { ! d.setId(new Long(domainId++)); ! domains.put(d.getId(), d); ! } ! ! /** ! * Update an object ! * @param o The object ! */ ! public void update(Object o) { ! } --- 88,93 ---- */ private void intern(Space d) { ! d.setId(new Long(spaceId++)); ! spaces.put(d.getId(), d); } *************** *** 151,168 **** */ private void remove(Space d) { ! domains.remove(d.getId()); d.setId(null); } - - /** - * Find an attribute by id - * @param id The id - * @return The Attribute - */ - public Attribute findAttributeById(Long id) { - return null; - } - /** * Get construction spaces --- 140,147 ---- */ private void remove(Space d) { ! spaces.remove(d.getId()); d.setId(null); } /** * Get construction spaces *************** *** 170,183 **** */ public Set getConstructionSpaces() { ! return filter(domains.values(), ConstructionSpace.class); ! } ! ! /** ! * Find a construction space by id ! * @param id The id ! * @return The construction space ! */ ! public ConstructionSpace findConstructionSpaceById(Long id) { ! return (ConstructionSpace) domains.get(id); } --- 149,153 ---- */ public Set getConstructionSpaces() { ! return filter(spaces.values(), ConstructionSpace.class); } *************** *** 186,191 **** * @return The domains */ ! public Set getDomains() { ! return new HashSet(domains.values()); } --- 156,161 ---- * @return The domains */ ! public Set getSpaces() { ! return new HashSet(spaces.values()); } *************** *** 195,200 **** * @return The Domain */ ! public Space findDomainById(Long id) { ! return (Space) domains.get(id); } --- 165,170 ---- * @return The Domain */ ! public Space findSpaceById(Long id) { ! return (Space) spaces.get(id); } *************** *** 221,225 **** */ public Set getFunctionalSpaces() { ! return filter(domains.values(), FunctionalSpace.class); } --- 191,195 ---- */ public Set getFunctionalSpaces() { ! return filter(spaces.values(), FunctionalSpace.class); } *************** *** 230,234 **** */ public FunctionalSpace findFunctionalSpaceById(Long id) { ! return (FunctionalSpace) domains.get(id); } --- 200,204 ---- */ public FunctionalSpace findFunctionalSpaceById(Long id) { ! return (FunctionalSpace) spaces.get(id); } *************** *** 289,293 **** */ public void clear() { ! domains.clear(); edges.clear(); surfaces.clear(); --- 259,263 ---- */ public void clear() { ! spaces.clear(); edges.clear(); surfaces.clear(); Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Project.java 16 Jan 2006 10:07:32 -0000 1.16 --- Project.java 16 Jan 2006 11:42:50 -0000 1.17 *************** *** 110,114 **** */ public Set getSpaces() { ! return DatabaseFacade.getInstance().getDomains(); } --- 110,114 ---- */ public Set getSpaces() { ! return DatabaseFacade.getInstance().getSpaces(); } *************** *** 119,123 **** */ public Space findSpaceById(Long id) { ! return DatabaseFacade.getInstance().findDomainById(id); } --- 119,123 ---- */ public Space findSpaceById(Long id) { ! return DatabaseFacade.getInstance().findSpaceById(id); } *************** *** 170,179 **** if (back == space) { surface.setBackDomain(null); - DatabaseFacade.getInstance().update(surface); } else { Space front = surface.getFrontDomain(); if (front == space) { surface.setFrontDomain(null); - DatabaseFacade.getInstance().update(surface); } } --- 170,177 ---- |