JBoss Tools SVN: r2272 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-03 13:47:44 -0400 (Tue, 03 Jul 2007)
New Revision: 2272
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/LoadedDeclarations.java
Log:
EXIN-217 Preparation to collecting all changed declarations before merging them to model.
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/LoadedDeclarations.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/LoadedDeclarations.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/LoadedDeclarations.java 2007-07-03 17:47:44 UTC (rev 2272)
@@ -0,0 +1,21 @@
+package org.jboss.tools.seam.internal.core.scanner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.seam.internal.core.SeamComponent;
+import org.jboss.tools.seam.internal.core.SeamFactory;
+
+public class LoadedDeclarations {
+ List<SeamComponent> components = new ArrayList<SeamComponent>();
+ List<SeamFactory> factories = new ArrayList<SeamFactory>();
+
+ public List<SeamComponent> getComponents() {
+ return components;
+ }
+
+ public List<SeamFactory> getFactories() {
+ return factories;
+ }
+
+}
17 years, 6 months
JBoss Tools SVN: r2271 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-03 13:47:09 -0400 (Tue, 03 Jul 2007)
New Revision: 2271
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamFactory.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java
Log:
EXIN-217 Preparation to collecting all changed declarations before merging them to model.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-07-03 17:17:00 UTC (rev 2270)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-07-03 17:47:09 UTC (rev 2271)
@@ -20,10 +20,8 @@
/**
* @author Viacheslav Kabanovich
*/
-public class SeamAnnotatedFactory implements ISeamAnnotatedFactory {
+public class SeamAnnotatedFactory extends SeamFactory implements ISeamAnnotatedFactory {
IMethod javaSource = null;
- String name = null;
- ScopeType scopeType = ScopeType.UNSPECIFIED;
public IMethod getSourceMethod() {
return javaSource;
@@ -33,22 +31,6 @@
this.javaSource = method;
}
- public String getName() {
- return name;
- }
-
- public ScopeType getScope() {
- return scopeType;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setScope(ScopeType type) {
- this.scopeType = type;
- }
-
public IMember getSourceMember() {
return javaSource;
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2007-07-03 17:17:00 UTC (rev 2270)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2007-07-03 17:47:09 UTC (rev 2271)
@@ -193,5 +193,17 @@
public Set<ISeamXmlComponentDeclaration> getXmlDeclarations() {
return xmlDeclarations;
}
+
+ public void addDeclaration(ISeamComponentDeclaration declaration) {
+ if(allDeclarations.contains(declaration)) return;
+ allDeclarations.add(declaration);
+ if(declaration instanceof ISeamJavaComponentDeclaration) {
+ javaDeclarations.add((ISeamJavaComponentDeclaration)declaration);
+ } else if(declaration instanceof ISeamXmlComponentDeclaration) {
+ xmlDeclarations.add((ISeamXmlComponentDeclaration)xmlDeclarations);
+ } else if(declaration instanceof ISeamPropertiesDeclaration) {
+ propertyDeclarations.add((ISeamPropertiesDeclaration)declaration);
+ }
+ }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentDeclaration.java 2007-07-03 17:17:00 UTC (rev 2270)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentDeclaration.java 2007-07-03 17:47:09 UTC (rev 2271)
@@ -1,5 +1,6 @@
package org.jboss.tools.seam.internal.core;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
@@ -21,5 +22,19 @@
source = path;
}
+ public int getLength() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+ public IResource getResource() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getStartPosition() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
}
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamFactory.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamFactory.java 2007-07-03 17:47:09 UTC (rev 2271)
@@ -0,0 +1,26 @@
+package org.jboss.tools.seam.internal.core;
+
+import org.jboss.tools.seam.core.ISeamFactory;
+import org.jboss.tools.seam.core.ScopeType;
+
+public class SeamFactory implements ISeamFactory {
+ String name = null;
+ ScopeType scopeType = ScopeType.UNSPECIFIED;
+
+ public String getName() {
+ return name;
+ }
+
+ public ScopeType getScope() {
+ return scopeType;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setScope(ScopeType type) {
+ this.scopeType = type;
+ }
+
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-07-03 17:17:00 UTC (rev 2270)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-07-03 17:47:09 UTC (rev 2271)
@@ -3,10 +3,12 @@
import java.util.HashSet;
import java.util.Set;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IType;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
import org.jboss.tools.seam.core.IRole;
-import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
import org.jboss.tools.seam.core.ISeamComponentMethod;
import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
import org.jboss.tools.seam.core.ScopeType;
@@ -19,10 +21,16 @@
protected ScopeType scopeType = ScopeType.UNSPECIFIED;
protected boolean stateful = false;
protected boolean entity = false;
+
+ protected IType type;
protected Set<IBijectedAttribute> bijectedAttributes = new HashSet<IBijectedAttribute>();
protected Set<ISeamComponentMethod> componentMethods = new HashSet<ISeamComponentMethod>();
protected Set<IRole> roles = new HashSet<IRole>();
+
+ public void setType(IType type) {
+ this.type = type;
+ }
public String getClassName() {
return className;
@@ -115,4 +123,8 @@
this.entity = entity;
}
+ public IMember getSourceMember() {
+ return type;
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-07-03 17:17:00 UTC (rev 2270)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-07-03 17:47:09 UTC (rev 2271)
@@ -10,19 +10,22 @@
******************************************************************************/
package org.jboss.tools.seam.internal.core;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
-import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
import org.jboss.tools.seam.core.ISeamFactory;
+import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.ISeamContextVariable;
+import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
import org.jboss.tools.seam.core.ScopeType;
/**
@@ -30,9 +33,11 @@
*/
public class SeamProject implements ISeamProject {
IProject project;
- Set<SeamComponent> allComponents = new HashSet<SeamComponent>();
+ Map<String, SeamComponent> allComponents = new HashMap<String, SeamComponent>();
protected Set<ISeamFactory> allFactories = new HashSet<ISeamFactory>();
Set<ISeamContextVariable> allVariables = new HashSet<ISeamContextVariable>();
+
+ Map<String, SeamJavaComponentDeclaration> javaDeclarations = new HashMap<String, SeamJavaComponentDeclaration>();
public SeamProject() {}
@@ -65,13 +70,13 @@
protected void store() {
}
-// public ISeamComponent getComponentByName(String name) {
-// return components.get(name);
-// }
+ public ISeamComponent getComponentByName(String name) {
+ return allComponents.get(name);
+ }
public Set<ISeamComponent> getComponents() {
Set<ISeamComponent> result = new HashSet<ISeamComponent>();
- result.addAll(allComponents);
+ result.addAll(allComponents.values());
return result;
}
@@ -83,21 +88,48 @@
public void registerComponents(SeamComponentDeclaration[] list, IPath source) {
pathRemoved(source);
if(list == null) return;
- //TODO
+
for (int i = 0; i < list.length; i++) {
list[i].setSourcePath(source);
-
- //TODO !!!
-// allComponents.add(list[i]);
+ String name = list[i].getName();
+ SeamComponent c = getComponent(name);
+ if(c == null) {
+ c = newComponent(name);
+ allComponents.put(name, c);
+ }
+ c.addDeclaration(list[i]);
+ if(list[i] instanceof ISeamJavaComponentDeclaration) {
+ javaDeclarations.put(c.getClassName(), (SeamJavaComponentDeclaration)list[i]);
+ Set<ISeamComponent> cs = getComponentsByClass(c.getClassName());
+ for (ISeamComponent ci: cs) {
+ if(ci == c) continue;
+ SeamComponent cii = (SeamComponent)ci;
+ cii.addDeclaration(list[i]);
+ }
+ } else if(list[i] instanceof ISeamXmlComponentDeclaration) {
+ ISeamXmlComponentDeclaration xml = (ISeamXmlComponentDeclaration)list[i];
+ String className = xml.getClassName();
+ SeamJavaComponentDeclaration j = javaDeclarations.get(className);
+ if(j != null) c.addDeclaration(j);
+ }
}
}
/**
* Package local method called by builder.
+ * @param component
* @param source
+ */
+ public void registerFactories(ISeamFactory[] list, IPath source) {
+
+ }
+
+ /**
+ * Package local method called by builder.
+ * @param source
*/
public void pathRemoved(IPath source) {
- Iterator<SeamComponent> iterator = allComponents.iterator();
+ Iterator<SeamComponent> iterator = allComponents.values().iterator();
while(iterator.hasNext()) {
ISeamComponent c = iterator.next();
Iterator<ISeamComponentDeclaration> ds = c.getAllDeclarations().iterator();
@@ -111,13 +143,11 @@
}
}
+ //deprecated
public Set<ISeamComponent> getComponentsByName(String name) {
Set<ISeamComponent> result = new HashSet<ISeamComponent>();
- for(SeamComponent component: allComponents) {
- if(name.equals(component.getName())) {
- result.add(component);
- }
- }
+ ISeamComponent c = getComponentByName(name);
+ if(c != null) result.add(c);
return result;
}
@@ -126,7 +156,7 @@
*/
public Set<ISeamComponent> getComponentsByClass(String className) {
Set<ISeamComponent> result = new HashSet<ISeamComponent>();
- for(SeamComponent component: allComponents) {
+ for(SeamComponent component: allComponents.values()) {
if(className.equals(component.getClassName())) {
result.add(component);
}
@@ -139,7 +169,7 @@
*/
public Set<ISeamComponent> getComponentsByScope(ScopeType type) {
Set<ISeamComponent> result = new HashSet<ISeamComponent>();
- for(SeamComponent component: allComponents) {
+ for(SeamComponent component: allComponents.values()) {
if(type.equals(component.getScope())) {
result.add(component);
}
@@ -151,7 +181,7 @@
* @see org.jboss.tools.seam.core.ISeamProject#addComponent(org.jboss.tools.seam.core.ISeamComponent)
*/
public void addComponent(ISeamComponent component) {
- allComponents.add((SeamComponent)component);
+ allComponents.put(component.getName(), (SeamComponent)component);
}
/**
@@ -229,5 +259,15 @@
public void removeFactory(ISeamFactory factory) {
allFactories.remove(factory);
}
+
+ SeamComponent getComponent(String name) {
+ return allComponents.get(name);
+ }
+
+ SeamComponent newComponent(String name) {
+ SeamComponent c = new SeamComponent();
+ c.setName(name);
+ return c;
+ }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java 2007-07-03 17:17:00 UTC (rev 2270)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java 2007-07-03 17:47:09 UTC (rev 2271)
@@ -6,6 +6,7 @@
import java.util.List;
import java.util.Map;
+import org.eclipse.core.resources.IResource;
import org.jboss.tools.seam.core.ISeamPropertiesDeclaration;
import org.jboss.tools.seam.core.ISeamProperty;
17 years, 6 months
JBoss Tools SVN: r2270 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-07-03 13:17:00 -0400 (Tue, 03 Jul 2007)
New Revision: 2270
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/BijectedAttributeType.java
Log:
http://jira.jboss.com/jira/browse/EXIN-216 Upper Case for BijectedAttributesTypes
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/BijectedAttributeType.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/BijectedAttributeType.java 2007-07-03 17:01:04 UTC (rev 2269)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/BijectedAttributeType.java 2007-07-03 17:17:00 UTC (rev 2270)
@@ -17,7 +17,7 @@
public enum BijectedAttributeType {
IN,
OUT,
- Databinder,
- DataModelSelection,
- DataModelSelectionIndex
+ DATA_BINDER,
+ DATA_MODEL_SELECTION,
+ DATA_MODEL_SELECTION_INDEX
}
\ No newline at end of file
17 years, 6 months
JBoss Tools SVN: r2269 - trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-03 13:01:04 -0400 (Tue, 03 Jul 2007)
New Revision: 2269
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Auction.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Auction.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Auction2.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Bid.java
Log:
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Auction.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Auction.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Auction.hbm.xml 2007-07-03 17:01:04 UTC (rev 2269)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+ package="mapping.bidi">
+
+ <class name="Auction" table="TAuction">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="description"/>
+ <property name="end" column="endDatetime"/>
+ <bag name="bids" inverse="true"
+ cascade="persist">
+ <key column="auctionId"/>
+ <one-to-many class="Bid"/>
+ </bag>
+ <one-to-one name="successfulBid"
+ property-ref="abc">
+ <formula>id</formula>
+ <formula>1</formula>
+ </one-to-one>
+ </class>
+
+ <class name="Bid" table="TBid">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="amount"
+ scale="19"
+ precision="31" />
+ <property name="datetime"
+ column="createdDatetime"/>
+ <properties name="abc">
+ <many-to-one name="item"
+ column="auctionId"
+ cascade="persist"/>
+ <property name="successful"
+ column="success"/>
+ </properties>
+ </class>
+
+</hibernate-mapping>
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Auction.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Auction.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Auction.java 2007-07-03 17:01:04 UTC (rev 2269)
@@ -0,0 +1,48 @@
+//$Id: Auction.java 5733 2005-02-14 15:56:06Z oneovthafew $
+package mapping.bidi;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author Gavin King
+ */
+public class Auction {
+ private Long id;
+ private String description;
+ private List bids = new ArrayList();
+ private Bid successfulBid;
+ private Date end;
+
+ public Date getEnd() {
+ return end;
+ }
+ public void setEnd(Date end) {
+ this.end = end;
+ }
+ public List getBids() {
+ return bids;
+ }
+ public void setBids(List bids) {
+ this.bids = bids;
+ }
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ public Bid getSuccessfulBid() {
+ return successfulBid;
+ }
+ public void setSuccessfulBid(Bid successfulBid) {
+ this.successfulBid = successfulBid;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Auction2.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Auction2.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Auction2.hbm.xml 2007-07-03 17:01:04 UTC (rev 2269)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+ package="mapping.bidi">
+
+ <class name="Auction" table="TAuction2">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="description"/>
+ <property name="end" column="endDatetime"/>
+ <bag name="bids" inverse="true"
+ cascade="persist">
+ <key column="auctionId"/>
+ <one-to-many class="Bid"/>
+ </bag>
+ <many-to-one name="successfulBid"/>
+ </class>
+
+ <class name="Bid" table="TBid2">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="amount" scale="19" precision="31"/>
+ <property name="datetime"
+ column="createdDatetime"/>
+ <many-to-one name="item"
+ column="auctionId"
+ cascade="persist"/>
+ <property name="successful">
+ <formula>exists(select a.id from TAuction2 a where a.successfulBid=id)</formula>
+ </property>
+ </class>
+
+</hibernate-mapping>
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Bid.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Bid.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/Bid.java 2007-07-03 17:01:04 UTC (rev 2269)
@@ -0,0 +1,47 @@
+//$Id: Bid.java 5733 2005-02-14 15:56:06Z oneovthafew $
+package mapping.bidi;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author Gavin King
+ */
+public class Bid {
+ private Long id;
+ private Auction item;
+ private BigDecimal amount;
+ private boolean successful;
+ private Date datetime;
+
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ public BigDecimal getAmount() {
+ return amount;
+ }
+ public void setAmount(BigDecimal amount) {
+ this.amount = amount;
+ }
+ public Auction getItem() {
+ return item;
+ }
+ public void setItem(Auction item) {
+ this.item = item;
+ }
+ public boolean isSuccessful() {
+ return successful;
+ }
+ public void setSuccessful(boolean successful) {
+ this.successful = successful;
+ }
+ public Date getDatetime() {
+ return datetime;
+ }
+ public void setDatetime(Date datetime) {
+ this.datetime = datetime;
+ }
+}
17 years, 6 months
JBoss Tools SVN: r2268 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-07-03 13:01:03 -0400 (Tue, 03 Jul 2007)
New Revision: 2268
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaComponentDeclaration.java
Log:
http://jira.jboss.com/jira/browse/EXIN-216 ISeamComponetDeclaration should extends ISeamSourceReference
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentDeclaration.java 2007-07-03 17:00:48 UTC (rev 2267)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamComponentDeclaration.java 2007-07-03 17:01:03 UTC (rev 2268)
@@ -14,7 +14,7 @@
* @author Alexey Kazakov
*
*/
-public interface ISeamComponentDeclaration {
+public interface ISeamComponentDeclaration extends ISeamTextSourceReference {
public String getName();
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaComponentDeclaration.java 2007-07-03 17:00:48 UTC (rev 2267)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamJavaComponentDeclaration.java 2007-07-03 17:01:03 UTC (rev 2268)
@@ -16,7 +16,7 @@
* @author Alexey Kazakov
*
*/
-public interface ISeamJavaComponentDeclaration extends ISeamComponentDeclaration {
+public interface ISeamJavaComponentDeclaration extends ISeamComponentDeclaration, ISeamJavaSourceReference {
public String getClassName();
17 years, 6 months
JBoss Tools SVN: r2267 - trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-03 13:00:48 -0400 (Tue, 03 Jul 2007)
New Revision: 2267
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/Model.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/ProductLine.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/ProductLine.java
Log:
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/Model.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/Model.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/Model.java 2007-07-03 17:00:48 UTC (rev 2267)
@@ -0,0 +1,44 @@
+//$Id: Model.java 4460 2004-08-29 12:04:14Z oneovthafew $
+package mapping.batchfetch;
+
+/**
+ * @author Gavin King
+ */
+public class Model {
+ private String id;
+ private String name;
+ private String description;
+ private ProductLine productLine;
+
+ Model() {}
+
+ public Model(ProductLine pl) {
+ this.productLine = pl;
+ pl.getModels().add(this);
+ }
+
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public String getId() {
+ return id;
+ }
+ public void setId(String id) {
+ this.id = id;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public ProductLine getProductLine() {
+ return productLine;
+ }
+ public void setProductLine(ProductLine productLine) {
+ this.productLine = productLine;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/ProductLine.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/ProductLine.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/ProductLine.hbm.xml 2007-07-03 17:00:48 UTC (rev 2267)
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="mapping.batchfetch">
+
+<!--
+
+ This mapping demonstrates the use of batch fetching
+ for collections and entities.
+
+-->
+
+ <class name="ProductLine"
+ batch-size="64">
+
+ <id name="id"
+ column="productId"
+ length="32">
+ <generator class="uuid.hex"/>
+ </id>
+
+ <property name="description"
+ not-null="true"
+ length="200"/>
+
+ <set name="models"
+ batch-size="64"
+ cascade="all"
+ inverse="true">
+ <key column="productId"/>
+ <one-to-many class="Model"/>
+ </set>
+
+ </class>
+
+ <class name="Model"
+ batch-size="64">
+
+ <id name="id"
+ column="modelId"
+ length="32">
+ <generator class="uuid.hex"/>
+ </id>
+
+ <property name="name"
+ not-null="true"
+ length="25"/>
+
+ <property name="description"
+ not-null="true"
+ length="200"/>
+
+ <many-to-one name="productLine"
+ column="productId"
+ not-null="true"/>
+
+ </class>
+
+</hibernate-mapping>
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/ProductLine.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/ProductLine.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/ProductLine.java 2007-07-03 17:00:48 UTC (rev 2267)
@@ -0,0 +1,34 @@
+//$Id: ProductLine.java 4460 2004-08-29 12:04:14Z oneovthafew $
+package mapping.batchfetch;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Gavin King
+ */
+public class ProductLine {
+
+ private String id;
+ private String description;
+ private Set models = new HashSet();
+
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public String getId() {
+ return id;
+ }
+ public void setId(String id) {
+ this.id = id;
+ }
+ public Set getModels() {
+ return models;
+ }
+ public void setModels(Set models) {
+ this.models = models;
+ }
+}
17 years, 6 months
JBoss Tools SVN: r2266 - trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batch.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-03 13:00:31 -0400 (Tue, 03 Jul 2007)
New Revision: 2266
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batch/DataPoint.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batch/DataPoint.java
Log:
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batch/DataPoint.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batch/DataPoint.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batch/DataPoint.hbm.xml 2007-07-03 17:00:31 UTC (rev 2266)
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+ package="mapping.batch">
+
+ <class name="DataPoint"
+ dynamic-update="true">
+ <!--rowid="rowid"--> <!-- remove this if not oracle -->
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="x">
+ <column name="xval" not-null="true" length="4" unique-key="xy"/>
+ </property>
+ <property name="y">
+ <column name="yval" not-null="true" length="4" unique-key="xy"/>
+ </property>
+ <property name="description"/>
+ </class>
+
+</hibernate-mapping>
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batch/DataPoint.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batch/DataPoint.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batch/DataPoint.java 2007-07-03 17:00:31 UTC (rev 2266)
@@ -0,0 +1,62 @@
+//$Id: DataPoint.java 4343 2004-08-16 11:46:19Z oneovthafew $
+package mapping.batch;
+
+import java.math.BigDecimal;
+
+/**
+ * @author Gavin King
+ */
+public class DataPoint {
+ private long id;
+ private BigDecimal x;
+ private BigDecimal y;
+ private String description;
+ /**
+ * @return Returns the description.
+ */
+ public String getDescription() {
+ return description;
+ }
+ /**
+ * @param description The description to set.
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ /**
+ * @return Returns the id.
+ */
+ public long getId() {
+ return id;
+ }
+ /**
+ * @param id The id to set.
+ */
+ public void setId(long id) {
+ this.id = id;
+ }
+ /**
+ * @return Returns the x.
+ */
+ public BigDecimal getX() {
+ return x;
+ }
+ /**
+ * @param x The x to set.
+ */
+ public void setX(BigDecimal x) {
+ this.x = x;
+ }
+ /**
+ * @return Returns the y.
+ */
+ public BigDecimal getY() {
+ return y;
+ }
+ /**
+ * @param y The y to set.
+ */
+ public void setY(BigDecimal y) {
+ this.y = y;
+ }
+}
17 years, 6 months
JBoss Tools SVN: r2265 - trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-03 13:00:17 -0400 (Tue, 03 Jul 2007)
New Revision: 2265
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/A.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/A.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/B.java
Log:
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/A.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/A.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/A.hbm.xml 2007-07-03 17:00:17 UTC (rev 2265)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+
+ This mapping demonstrates content-based discrimination for the
+ table-per-hierarchy mapping strategy, using a formula
+ discriminator.
+
+-->
+
+<hibernate-mapping
+ package="mapping.array">
+
+ <class name="A" lazy="true" table="aaa">
+
+ <id name="id">
+ <generator class="native"/>
+ </id>
+
+ <array name="bs" cascade="all" fetch="join">
+ <key column="a_id"/>
+ <list-index column="idx"/>
+ <one-to-many class="B"/>
+ </array>
+
+ </class>
+
+ <class name="B" lazy="true" table="bbb">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ </class>
+
+
+</hibernate-mapping>
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/A.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/A.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/A.java 2007-07-03 17:00:17 UTC (rev 2265)
@@ -0,0 +1,26 @@
+//$Id: A.java 6527 2005-04-26 16:58:52Z oneovthafew $
+package mapping.array;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class A {
+ private Integer id;
+ private B[] bs;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public B[] getBs() {
+ return bs;
+ }
+
+ public void setBs(B[] bs) {
+ this.bs = bs;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/B.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/B.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/B.java 2007-07-03 17:00:17 UTC (rev 2265)
@@ -0,0 +1,17 @@
+//$Id: B.java 6527 2005-04-26 16:58:52Z oneovthafew $
+package mapping.array;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class B {
+ private Integer id;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+}
17 years, 6 months
JBoss Tools SVN: r2264 - trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-03 12:59:58 -0400 (Tue, 03 Jul 2007)
New Revision: 2264
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/array/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batch/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/batchfetch/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/bidi/
Log:
17 years, 6 months
JBoss Tools SVN: r2263 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-03 12:55:05 -0400 (Tue, 03 Jul 2007)
New Revision: 2263
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
Log:
EXIN-217 Implementation corrected after moving factories to project.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2007-07-03 16:48:03 UTC (rev 2262)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2007-07-03 16:55:05 UTC (rev 2263)
@@ -19,7 +19,6 @@
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
import org.jboss.tools.seam.core.IRole;
-import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
import org.jboss.tools.seam.core.ISeamComponentMethod;
@@ -81,14 +80,6 @@
}
/**
- * @see org.jboss.tools.seam.core.ISeamComponent#getFactories()
- */
- public Set<ISeamAnnotatedFactory> getFactories() {
- ISeamJavaComponentDeclaration javaDeclaration = getJavaDeclaration();
- return (javaDeclaration == null) ? null : javaDeclaration.getFactories();
- }
-
- /**
* @see org.jboss.tools.seam.core.ISeamComponent#getMethods()
*/
public Set<ISeamComponentMethod> getMethods() {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-07-03 16:48:03 UTC (rev 2262)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-07-03 16:55:05 UTC (rev 2263)
@@ -21,7 +21,6 @@
protected boolean entity = false;
protected Set<IBijectedAttribute> bijectedAttributes = new HashSet<IBijectedAttribute>();
- protected Set<ISeamAnnotatedFactory> annotatedFactories = new HashSet<ISeamAnnotatedFactory>();
protected Set<ISeamComponentMethod> componentMethods = new HashSet<ISeamComponentMethod>();
protected Set<IRole> roles = new HashSet<IRole>();
@@ -37,10 +36,6 @@
bijectedAttributes.add(attribute);
}
- public void addFactory(ISeamAnnotatedFactory factory) {
- annotatedFactories.add(factory);
- }
-
public void addMethod(ISeamComponentMethod method) {
componentMethods.add(method);
}
@@ -76,10 +71,6 @@
return result;
}
- public Set<ISeamAnnotatedFactory> getFactories() {
- return annotatedFactories;
- }
-
public Set<ISeamComponentMethod> getMethods() {
return componentMethods;
}
@@ -112,10 +103,6 @@
bijectedAttributes.remove(attribute);
}
- public void removeFactory(ISeamAnnotatedFactory factory) {
- annotatedFactories.remove(factory);
- }
-
public void removeMethod(ISeamComponentMethod method) {
componentMethods.remove(method);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-07-03 16:48:03 UTC (rev 2262)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-07-03 16:55:05 UTC (rev 2263)
@@ -17,8 +17,10 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
+import org.jboss.tools.seam.core.ISeamFactory;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ScopeType;
@@ -29,6 +31,7 @@
public class SeamProject implements ISeamProject {
IProject project;
Set<SeamComponent> allComponents = new HashSet<SeamComponent>();
+ protected Set<ISeamFactory> allFactories = new HashSet<ISeamFactory>();
Set<ISeamContextVariable> allVariables = new HashSet<ISeamContextVariable>();
public SeamProject() {}
@@ -82,7 +85,7 @@
if(list == null) return;
//TODO
for (int i = 0; i < list.length; i++) {
-// list[i].setSourcePath(source);
+ list[i].setSourcePath(source);
//TODO !!!
// allComponents.add(list[i]);
@@ -191,4 +194,40 @@
return result;
}
+ public void addFactory(ISeamFactory factory) {
+ allFactories.add(factory);
+ }
+
+ public Set<ISeamFactory> getFactories() {
+ return allFactories;
+ }
+
+ public Set<ISeamFactory> getFactories(String name, ScopeType scope) {
+ Set<ISeamFactory> result = new HashSet<ISeamFactory>();
+ for (ISeamFactory f: allFactories) {
+ if(name.equals(f.getName()) && scope.equals(f.getScope())) result.add(f);
+ }
+ return result;
+ }
+
+ public Set<ISeamFactory> getFactoriesByName(String name) {
+ Set<ISeamFactory> result = new HashSet<ISeamFactory>();
+ for (ISeamFactory f: allFactories) {
+ if(name.equals(f.getName())) result.add(f);
+ }
+ return result;
+ }
+
+ public Set<ISeamFactory> getFactoriesByScope(ScopeType scope) {
+ Set<ISeamFactory> result = new HashSet<ISeamFactory>();
+ for (ISeamFactory f: allFactories) {
+ if(scope.equals(f.getScope())) result.add(f);
+ }
+ return result;
+ }
+
+ public void removeFactory(ISeamFactory factory) {
+ allFactories.remove(factory);
+ }
+
}
17 years, 6 months