diff options
author | Martin Taal | 2010-02-19 08:13:30 +0000 |
---|---|---|
committer | Martin Taal | 2010-02-19 08:13:30 +0000 |
commit | 35e4d303a48b1754cb8786555fa6cf534e482f72 (patch) | |
tree | 81ce6116767b6ea2e96ab20f10ebf056d553d98a /plugins/org.eclipse.emf.cdo.examples.company | |
parent | b270e15246d69113f0f677c980354dd0a6be551b (diff) | |
download | cdo-35e4d303a48b1754cb8786555fa6cf534e482f72.tar.gz cdo-35e4d303a48b1754cb8786555fa6cf534e482f72.tar.xz cdo-35e4d303a48b1754cb8786555fa6cf534e482f72.zip |
[300621] [Hibernate] CDO_Package_Unit type has a field which is too long for Derby
[300645] [Hibernate] Ensure that the Teneo extension mechanism works in combination with CDO
[300659] [Hibernate] Handle unknown edatatypes as a string
[300695] CDOENumStringType.nullSafeGet require identical name and literal for EEnum
[283237] [Hibernate] Externalize strings and NON-NLS where appropriate
[300256]: [Hibernate] several changes: properties can be set in config file
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.examples.company')
5 files changed, 27 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples.company/model/company.ecore b/plugins/org.eclipse.emf.cdo.examples.company/model/company.ecore index 344abba201..9d7f741c4a 100644 --- a/plugins/org.eclipse.emf.cdo.examples.company/model/company.ecore +++ b/plugins/org.eclipse.emf.cdo.examples.company/model/company.ecore @@ -3,6 +3,9 @@ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="company" nsURI="http://www.eclipse.org/emf/CDO/examples/company/1.0.0" nsPrefix="company"> + <eAnnotations source="teneo.jpa"> + <details key="value" value="@hbGenericGenerators({@GenericGenerator(name="system-uuid", strategy = "org.eclipse.emf.cdo.examples.hibernate.server.CDOExampleUUIDHexGenerator")})"/> + </eAnnotations> <eClassifiers xsi:type="ecore:EClass" name="Address"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="street" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> @@ -61,7 +64,11 @@ eType="#//Customer" eOpposite="#//Customer/salesOrders"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="Category"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="teneo.jpa"> + <details key="value" value="@Id @GeneratedValue(generator="system-uuid")"/> + </eAnnotations> + </eStructuralFeatures> <eStructuralFeatures xsi:type="ecore:EReference" name="categories" upperBound="-1" eType="#//Category" containment="true"/> <eStructuralFeatures xsi:type="ecore:EReference" name="products" upperBound="-1" @@ -75,7 +82,11 @@ </eStructuralFeatures> <eStructuralFeatures xsi:type="ecore:EReference" name="orderDetails" upperBound="-1" eType="#//OrderDetail" eOpposite="#//OrderDetail/product"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="vat" eType="#//VAT" defaultValueLiteral="vat15"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="vat" eType="#//VAT" defaultValueLiteral="vat15"> + <eAnnotations source="teneo.jpa"> + <details key="value" value="@Basic(optional=false)
@Column(nullable=false)"/> + </eAnnotations> + </eStructuralFeatures> <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" transient="true"/> </eClassifiers> diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Category.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Category.java index abc51c4cfb..827917066f 100644 --- a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Category.java +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Category.java @@ -47,7 +47,7 @@ public interface Category extends EObject * @return the value of the '<em>Name</em>' attribute. * @see #setName(String) * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCategory_Name() - * @model + * @model annotation="teneo.jpa value='@Id @GeneratedValue(generator=\"system-uuid\")'" * @generated */ String getName(); diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/CompanyPackage.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/CompanyPackage.java index 9f87705855..07bb48a9e8 100644 --- a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/CompanyPackage.java +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/CompanyPackage.java @@ -27,7 +27,9 @@ import org.eclipse.emf.ecore.EReference; * <!-- end-user-doc --> * * @see org.eclipse.emf.cdo.examples.company.CompanyFactory - * @model kind="package" + * @model kind="package" annotation="teneo.jpa value='@hbGenericGenerators( {@GenericGenerator(name=\"system-uuid\", + * strategy = + * \"org.eclipse.emf.cdo.examples.hibernate.server.CDOExampleUUIDHexGenerator\")})'" * @generated */ public interface CompanyPackage extends EPackage diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Product.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Product.java index 9eccaddcc7..86ea3178da 100644 --- a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Product.java +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Product.java @@ -94,7 +94,7 @@ public interface Product extends EObject * @see org.eclipse.emf.cdo.examples.company.VAT * @see #setVat(VAT) * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getProduct_Vat() - * @model default="vat15" + * @model default="vat15" annotation="teneo.jpa value='@Basic(optional=false)\n@Column(nullable=false)'" * @generated */ VAT getVat(); diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyPackageImpl.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyPackageImpl.java index 3a2a3f86d0..9639de7109 100644 --- a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyPackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyPackageImpl.java @@ -828,10 +828,19 @@ public class CompanyPackageImpl extends EPackageImpl implements CompanyPackage protected void createTeneoAnnotations() { String source = "teneo.jpa"; + addAnnotation( + this, + source, + new String[] { + "value", + "@hbGenericGenerators({@GenericGenerator(name=\"system-uuid\", strategy = \"org.eclipse.emf.cdo.examples.hibernate.server.CDOExampleUUIDHexGenerator\")})" }); addAnnotation(orderEClass, source, new String[] { "value", "@Entity(name=\"BaseOrder\")" }); addAnnotation(orderAddressEClass, source, new String[] { "value", "@AssociationOverride(name=\"orderDetails\", joinColumns=@JoinColumn(name=\"orderdetails_orderaddressid\"))" }); + addAnnotation(getCategory_Name(), source, + new String[] { "value", "@Id @GeneratedValue(generator=\"system-uuid\")" }); addAnnotation(getProduct_Name(), source, new String[] { "value", "@Id" }); + addAnnotation(getProduct_Vat(), source, new String[] { "value", "@Basic(optional=false)\n@Column(nullable=false)" }); } } // CompanyPackageImpl |