diff options
Diffstat (limited to 'examples/sql/adf/EX_ADF/Model/src/model')
7 files changed, 848 insertions, 0 deletions
diff --git a/examples/sql/adf/EX_ADF/Model/src/model/Model.jpx b/examples/sql/adf/EX_ADF/Model/src/model/Model.jpx new file mode 100644 index 00000000..9b0ab3d3 --- /dev/null +++ b/examples/sql/adf/EX_ADF/Model/src/model/Model.jpx @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="GBK" ?> +<!DOCTYPE JboProject SYSTEM "jbo_03_01.dtd"> +<!----> +<JboProject + xmlns="http://xmlns.oracle.com/bc4j" + Name="Model" + Version="11.1.2.64.36" + SeparateXMLFiles="true" + PackageName="model"> + <DesignTime> + <Attr Name="_useAnsiJoinSyntax" Value="true"/> + <Attr Name="_jprName" Value="../../Model.jpr"/> + <Attr Name="_jbo.SQLBuilder" Value="SQL92"/> + <Attr Name="_jbo.TypeMapEntries" Value="Java"/> + <Attr Name="_NamedConnection" Value="BDBConnection"/> + <Attr Name="_appModuleNames0" Value="uimodel.am.AppModule"/> + </DesignTime> + <Containee + Name="association" + PackageName="model.entity.association" + ObjectType="JboPackage"> + <DesignTime> + <Attr Name="_AS" Value="true"/> + </DesignTime> + </Containee> + <Containee + Name="entity" + PackageName="model.entity" + ObjectType="JboPackage"> + <DesignTime> + <Attr Name="_EO" Value="true"/> + </DesignTime> + </Containee> + <Containee + Name="am" + PackageName="uimodel.am" + ObjectType="JboPackage"> + <DesignTime> + <Attr Name="_AM" Value="true"/> + </DesignTime> + </Containee> + <Containee + Name="view" + PackageName="uimodel.view" + ObjectType="JboPackage"> + <DesignTime> + <Attr Name="_VO" Value="true"/> + <Attr Name="_VL" Value="true"/> + </DesignTime> + </Containee> +</JboProject> diff --git a/examples/sql/adf/EX_ADF/Model/src/model/ModelBundle.properties b/examples/sql/adf/EX_ADF/Model/src/model/ModelBundle.properties new file mode 100644 index 00000000..a5910d8c --- /dev/null +++ b/examples/sql/adf/EX_ADF/Model/src/model/ModelBundle.properties @@ -0,0 +1,6 @@ +# +uimodel.view.CoffeesVO_LABEL=Coffees Vo +uimodel.am.AppModule_LABEL=App Module Client +uimodel.view.SuppliersVO_LABEL=Suppliers Vo +uimodel.view.SuppliersVOToCoffeesVOLink_LABEL=Suppliers Vo To Coffees Vo Link +LOV_SupId_LOVUIHints_NullValueId=<No Selection> diff --git a/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEO.xml b/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEO.xml new file mode 100644 index 00000000..fef443b4 --- /dev/null +++ b/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEO.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="GBK" ?> +<!DOCTYPE Entity SYSTEM "jbo_03_01.dtd"> +<!----> +<Entity + xmlns="http://xmlns.oracle.com/bc4j" + Name="CoffeesEO" + Version="11.1.2.64.36" + DBObjectType="TABLE" + DBObjectName="COFFEESFK" + AliasName="CoffeesEO" + BindingStyle="JDBC" + UseGlueCode="false" + RowClass="model.entity.CoffeesEOImpl"> + <DesignTime> + <Attr Name="_codeGenFlag2" Value="Access"/> + <Attr Name="_isCodegen" Value="true"/> + </DesignTime> + <Attribute + Name="CofName" + IsNotNull="true" + ColumnName="COF_NAME" + SQLType="VARCHAR" + Type="java.lang.String" + ColumnType="VARCHAR" + TableName="COFFEESFK" + PrimaryKey="true"/> + <Attribute + Name="SupId" + ColumnName="SUP_ID" + SQLType="INTEGER" + Type="java.lang.Integer" + ColumnType="INTEGER" + TableName="COFFEESFK"/> + <Attribute + Name="Price" + ColumnName="PRICE" + SQLType="FLOAT" + Type="java.lang.Float" + ColumnType="FLOAT" + TableName="COFFEESFK"/> + <Attribute + Name="Sales" + ColumnName="SALES" + SQLType="INTEGER" + Type="java.lang.Integer" + ColumnType="INTEGER" + TableName="COFFEESFK"/> + <Attribute + Name="Total" + ColumnName="TOTAL" + SQLType="INTEGER" + Type="java.lang.Integer" + ColumnType="INTEGER" + TableName="COFFEESFK"/> + <AccessorAttribute + Name="SuppliersEO" + Association="model.entity.association.SuppliersEOToCoffeesEOAssoc" + AssociationEnd="model.entity.association.SuppliersEOToCoffeesEOAssoc.SuppliersEO" + AssociationOtherEnd="model.entity.association.SuppliersEOToCoffeesEOAssoc.CoffeesEO" + Type="model.entity.SuppliersEOImpl" + IsUpdateable="true"/> + <Key + Name="SqliteAutoindexCoffeesfk1" + PrimaryKey="true"> + <DesignTime> + <Attr Name="_DBObjectName" Value="sqlite_autoindex_COFFEESFK_1"/> + </DesignTime> + <AttrArray Name="Attributes"> + <Item Value="model.entity.CoffeesEO.CofName"/> + </AttrArray> + </Key> + <Key + Name="fk_CoffeesEO"> + <DesignTime> + <Attr Name="_referencedKey" Value="SUPPLIERSPK_PK"/> + <Attr Name="_isForeign" Value="true"/> + <Attr Name="_DBObjectName" Value="FK_COFFEES_EO"/> + <Attr Name="_isCascadeDelete" Value="true"/> + </DesignTime> + <AttrArray Name="Attributes"> + <Item Value="model.entity.CoffeesEO.SupId"/> + </AttrArray> + </Key> +</Entity> diff --git a/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEOImpl.java b/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEOImpl.java new file mode 100644 index 00000000..6f84c250 --- /dev/null +++ b/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEOImpl.java @@ -0,0 +1,281 @@ +package model.entity; + +import oracle.jbo.Key; +import oracle.jbo.server.AttributeDefImpl; +import oracle.jbo.server.EntityDefImpl; +import oracle.jbo.server.EntityImpl; +// --------------------------------------------------------------------- +// --- File generated by Oracle ADF Business Components Design Time. +// --- Mon Aug 19 12:01:47 CST 2013 +// --- Custom code may be added to this class. +// --- Warning: Do not modify method signatures of generated methods. +// --------------------------------------------------------------------- +public class CoffeesEOImpl extends EntityImpl { + public void lock() { + //super.lock(); + } + + protected StringBuffer buildDMLStatement(int i, AttributeDefImpl[] attributeDefImpl, + AttributeDefImpl[] attributeDefImpl2, + AttributeDefImpl[] attributeDefImpl3, boolean b) { + StringBuffer stmt = super.buildDMLStatement(i, attributeDefImpl, attributeDefImpl2, attributeDefImpl3, b); + if (i == DML_UPDATE) { + // Get the alias name (it is equal to the entity definition name) + String alias = this.getEntityDef().getDefName(); + // Remove the alias from the UPDATE statement + int index = stmt.indexOf( " " + alias + " SET "); + if (index != -1) + stmt = stmt.replace( index, index + alias.length() + 1, ""); + } + return stmt; + } + + /** + * AttributesEnum: generated enum for identifying attributes and accessors. Do not modify. + */ + public enum AttributesEnum { + CofName { + public Object get(CoffeesEOImpl obj) { + return obj.getCofName(); + } + + public void put(CoffeesEOImpl obj, Object value) { + obj.setCofName((String)value); + } + } + , + SupId { + public Object get(CoffeesEOImpl obj) { + return obj.getSupId(); + } + + public void put(CoffeesEOImpl obj, Object value) { + obj.setSupId((Integer)value); + } + } + , + Price { + public Object get(CoffeesEOImpl obj) { + return obj.getPrice(); + } + + public void put(CoffeesEOImpl obj, Object value) { + obj.setPrice((Float)value); + } + } + , + Sales { + public Object get(CoffeesEOImpl obj) { + return obj.getSales(); + } + + public void put(CoffeesEOImpl obj, Object value) { + obj.setSales((Integer)value); + } + } + , + Total { + public Object get(CoffeesEOImpl obj) { + return obj.getTotal(); + } + + public void put(CoffeesEOImpl obj, Object value) { + obj.setTotal((Integer)value); + } + } + , + SuppliersEO { + public Object get(CoffeesEOImpl obj) { + return obj.getSuppliersEO(); + } + + public void put(CoffeesEOImpl obj, Object value) { + obj.setSuppliersEO((SuppliersEOImpl)value); + } + } + ; + private static AttributesEnum[] vals = null; + private static int firstIndex = 0; + + public abstract Object get(CoffeesEOImpl object); + + public abstract void put(CoffeesEOImpl object, Object value); + + public int index() { + return AttributesEnum.firstIndex() + ordinal(); + } + + public static int firstIndex() { + return firstIndex; + } + + public static int count() { + return AttributesEnum.firstIndex() + AttributesEnum.staticValues().length; + } + + public static AttributesEnum[] staticValues() { + if (vals == null) { + vals = AttributesEnum.values(); + } + return vals; + } + } + + + public static final int COFNAME = AttributesEnum.CofName.index(); + public static final int SUPID = AttributesEnum.SupId.index(); + public static final int PRICE = AttributesEnum.Price.index(); + public static final int SALES = AttributesEnum.Sales.index(); + public static final int TOTAL = AttributesEnum.Total.index(); + public static final int SUPPLIERSEO = AttributesEnum.SuppliersEO.index(); + + /** + * This is the default constructor (do not remove). + */ + public CoffeesEOImpl() { + } + + + /** + * @return the definition object for this instance class. + */ + public static synchronized EntityDefImpl getDefinitionObject() { + return EntityDefImpl.findDefObject("model.entity.CoffeesEO"); + } + + /** + * Gets the attribute value for CofName, using the alias name CofName. + * @return the value of CofName + */ + public String getCofName() { + return (String)getAttributeInternal(COFNAME); + } + + /** + * Sets <code>value</code> as the attribute value for CofName. + * @param value value to set the CofName + */ + public void setCofName(String value) { + setAttributeInternal(COFNAME, value); + } + + /** + * Gets the attribute value for SupId, using the alias name SupId. + * @return the value of SupId + */ + public Integer getSupId() { + return (Integer)getAttributeInternal(SUPID); + } + + /** + * Sets <code>value</code> as the attribute value for SupId. + * @param value value to set the SupId + */ + public void setSupId(Integer value) { + setAttributeInternal(SUPID, value); + } + + /** + * Gets the attribute value for Price, using the alias name Price. + * @return the value of Price + */ + public Float getPrice() { + return (Float)getAttributeInternal(PRICE); + } + + /** + * Sets <code>value</code> as the attribute value for Price. + * @param value value to set the Price + */ + public void setPrice(Float value) { + setAttributeInternal(PRICE, value); + } + + /** + * Gets the attribute value for Sales, using the alias name Sales. + * @return the value of Sales + */ + public Integer getSales() { + return (Integer)getAttributeInternal(SALES); + } + + /** + * Sets <code>value</code> as the attribute value for Sales. + * @param value value to set the Sales + */ + public void setSales(Integer value) { + setAttributeInternal(SALES, value); + } + + /** + * Gets the attribute value for Total, using the alias name Total. + * @return the value of Total + */ + public Integer getTotal() { + return (Integer)getAttributeInternal(TOTAL); + } + + /** + * Sets <code>value</code> as the attribute value for Total. + * @param value value to set the Total + */ + public void setTotal(Integer value) { + setAttributeInternal(TOTAL, value); + } + + /** + * getAttrInvokeAccessor: generated method. Do not modify. + * @param index the index identifying the attribute + * @param attrDef the attribute + + * @return the attribute value + * @throws Exception + */ + protected Object getAttrInvokeAccessor(int index, AttributeDefImpl attrDef) throws Exception { + if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) { + return AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].get(this); + } + return super.getAttrInvokeAccessor(index, attrDef); + } + + /** + * setAttrInvokeAccessor: generated method. Do not modify. + * @param index the index identifying the attribute + * @param value the value to assign to the attribute + * @param attrDef the attribute + + * @throws Exception + */ + protected void setAttrInvokeAccessor(int index, Object value, AttributeDefImpl attrDef) throws Exception { + if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) { + AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].put(this, value); + return; + } + super.setAttrInvokeAccessor(index, value, attrDef); + } + + /** + * @return the associated entity SuppliersEOImpl. + */ + public SuppliersEOImpl getSuppliersEO() { + return (SuppliersEOImpl)getAttributeInternal(SUPPLIERSEO); + } + + /** + * Sets <code>value</code> as the associated entity SuppliersEOImpl. + */ + public void setSuppliersEO(SuppliersEOImpl value) { + setAttributeInternal(SUPPLIERSEO, value); + } + + /** + * @param cofName key constituent + + * @return a Key object based on given key constituents. + */ + public static Key createPrimaryKey(String cofName) { + return new Key(new Object[]{cofName}); + } + + +} diff --git a/examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEO.xml b/examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEO.xml new file mode 100644 index 00000000..3ad0b5f9 --- /dev/null +++ b/examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEO.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="GBK" ?> +<!DOCTYPE Entity SYSTEM "jbo_03_01.dtd"> +<!----> +<Entity + xmlns="http://xmlns.oracle.com/bc4j" + Name="SuppliersEO" + Version="11.1.2.64.36" + DBObjectType="TABLE" + DBObjectName="SUPPLIERSPK" + AliasName="SuppliersEO" + BindingStyle="JDBC" + UseGlueCode="false" + RowClass="model.entity.SuppliersEOImpl"> + <DesignTime> + <Attr Name="_codeGenFlag2" Value="Access"/> + <Attr Name="_isCodegen" Value="true"/> + </DesignTime> + <Attribute + Name="SupId" + IsNotNull="true" + ColumnName="SUP_ID" + SQLType="INTEGER" + Type="java.lang.Integer" + ColumnType="INTEGER" + TableName="SUPPLIERSPK" + PrimaryKey="true"/> + <Attribute + Name="SupName" + ColumnName="SUP_NAME" + SQLType="VARCHAR" + Type="java.lang.String" + ColumnType="VARCHAR" + TableName="SUPPLIERSPK"/> + <Attribute + Name="Street" + ColumnName="STREET" + SQLType="VARCHAR" + Type="java.lang.String" + ColumnType="VARCHAR" + TableName="SUPPLIERSPK"/> + <Attribute + Name="City" + ColumnName="CITY" + SQLType="VARCHAR" + Type="java.lang.String" + ColumnType="VARCHAR" + TableName="SUPPLIERSPK"/> + <Attribute + Name="State" + ColumnName="STATE" + SQLType="VARCHAR" + Type="java.lang.String" + ColumnType="VARCHAR" + TableName="SUPPLIERSPK"/> + <Attribute + Name="Zip" + ColumnName="ZIP" + SQLType="VARCHAR" + Type="java.lang.String" + ColumnType="VARCHAR" + TableName="SUPPLIERSPK"/> + <AccessorAttribute + Name="CoffeesEO" + Association="model.entity.association.SuppliersEOToCoffeesEOAssoc" + AssociationEnd="model.entity.association.SuppliersEOToCoffeesEOAssoc.CoffeesEO" + AssociationOtherEnd="model.entity.association.SuppliersEOToCoffeesEOAssoc.SuppliersEO" + Type="oracle.jbo.RowIterator" + IsUpdateable="false"/> + <Key + Name="SupplierspkPk" + PrimaryKey="true"> + <DesignTime> + <Attr Name="_DBObjectName" Value="SUPPLIERSPK_PK"/> + </DesignTime> + <AttrArray Name="Attributes"> + <Item Value="model.entity.SuppliersEO.SupId"/> + </AttrArray> + </Key> +</Entity> diff --git a/examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEOImpl.java b/examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEOImpl.java new file mode 100644 index 00000000..92449faa --- /dev/null +++ b/examples/sql/adf/EX_ADF/Model/src/model/entity/SuppliersEOImpl.java @@ -0,0 +1,302 @@ +package model.entity; + +import oracle.jbo.Key; +import oracle.jbo.RowIterator; +import oracle.jbo.server.AttributeDefImpl; +import oracle.jbo.server.EntityDefImpl; +import oracle.jbo.server.EntityImpl; +// --------------------------------------------------------------------- +// --- File generated by Oracle ADF Business Components Design Time. +// --- Mon Aug 19 12:03:06 CST 2013 +// --- Custom code may be added to this class. +// --- Warning: Do not modify method signatures of generated methods. +// --------------------------------------------------------------------- +public class SuppliersEOImpl extends EntityImpl { + public void lock() { + //super.lock(); + } + + protected StringBuffer buildDMLStatement(int i, AttributeDefImpl[] attributeDefImpl, + AttributeDefImpl[] attributeDefImpl2, + AttributeDefImpl[] attributeDefImpl3, boolean b) { + StringBuffer stmt = super.buildDMLStatement(i, attributeDefImpl, attributeDefImpl2, attributeDefImpl3, b); + if (i == DML_UPDATE) { + // Get the alias name (it is equal to the entity definition name) + String alias = this.getEntityDef().getDefName(); + // Remove the alias from the UPDATE statement + int index = stmt.indexOf( " " + alias + " SET "); + if (index != -1) + stmt = stmt.replace( index, index + alias.length() + 1, ""); + } + return stmt; + } + + /** + * AttributesEnum: generated enum for identifying attributes and accessors. Do not modify. + */ + public enum AttributesEnum { + SupId { + public Object get(SuppliersEOImpl obj) { + return obj.getSupId(); + } + + public void put(SuppliersEOImpl obj, Object value) { + obj.setSupId((Integer)value); + } + } + , + SupName { + public Object get(SuppliersEOImpl obj) { + return obj.getSupName(); + } + + public void put(SuppliersEOImpl obj, Object value) { + obj.setSupName((String)value); + } + } + , + Street { + public Object get(SuppliersEOImpl obj) { + return obj.getStreet(); + } + + public void put(SuppliersEOImpl obj, Object value) { + obj.setStreet((String)value); + } + } + , + City { + public Object get(SuppliersEOImpl obj) { + return obj.getCity(); + } + + public void put(SuppliersEOImpl obj, Object value) { + obj.setCity((String)value); + } + } + , + State { + public Object get(SuppliersEOImpl obj) { + return obj.getState(); + } + + public void put(SuppliersEOImpl obj, Object value) { + obj.setState((String)value); + } + } + , + Zip { + public Object get(SuppliersEOImpl obj) { + return obj.getZip(); + } + + public void put(SuppliersEOImpl obj, Object value) { + obj.setZip((String)value); + } + } + , + CoffeesEO { + public Object get(SuppliersEOImpl obj) { + return obj.getCoffeesEO(); + } + + public void put(SuppliersEOImpl obj, Object value) { + obj.setAttributeInternal(index(), value); + } + } + ; + private static AttributesEnum[] vals = null; + private static int firstIndex = 0; + + public abstract Object get(SuppliersEOImpl object); + + public abstract void put(SuppliersEOImpl object, Object value); + + public int index() { + return AttributesEnum.firstIndex() + ordinal(); + } + + public static int firstIndex() { + return firstIndex; + } + + public static int count() { + return AttributesEnum.firstIndex() + AttributesEnum.staticValues().length; + } + + public static AttributesEnum[] staticValues() { + if (vals == null) { + vals = AttributesEnum.values(); + } + return vals; + } + } + + + public static final int SUPID = AttributesEnum.SupId.index(); + public static final int SUPNAME = AttributesEnum.SupName.index(); + public static final int STREET = AttributesEnum.Street.index(); + public static final int CITY = AttributesEnum.City.index(); + public static final int STATE = AttributesEnum.State.index(); + public static final int ZIP = AttributesEnum.Zip.index(); + public static final int COFFEESEO = AttributesEnum.CoffeesEO.index(); + + /** + * This is the default constructor (do not remove). + */ + public SuppliersEOImpl() { + } + + + /** + * @return the definition object for this instance class. + */ + public static synchronized EntityDefImpl getDefinitionObject() { + return EntityDefImpl.findDefObject("model.entity.SuppliersEO"); + } + + /** + * Gets the attribute value for SupId, using the alias name SupId. + * @return the value of SupId + */ + public Integer getSupId() { + return (Integer)getAttributeInternal(SUPID); + } + + /** + * Sets <code>value</code> as the attribute value for SupId. + * @param value value to set the SupId + */ + public void setSupId(Integer value) { + setAttributeInternal(SUPID, value); + } + + /** + * Gets the attribute value for SupName, using the alias name SupName. + * @return the value of SupName + */ + public String getSupName() { + return (String)getAttributeInternal(SUPNAME); + } + + /** + * Sets <code>value</code> as the attribute value for SupName. + * @param value value to set the SupName + */ + public void setSupName(String value) { + setAttributeInternal(SUPNAME, value); + } + + /** + * Gets the attribute value for Street, using the alias name Street. + * @return the value of Street + */ + public String getStreet() { + return (String)getAttributeInternal(STREET); + } + + /** + * Sets <code>value</code> as the attribute value for Street. + * @param value value to set the Street + */ + public void setStreet(String value) { + setAttributeInternal(STREET, value); + } + + /** + * Gets the attribute value for City, using the alias name City. + * @return the value of City + */ + public String getCity() { + return (String)getAttributeInternal(CITY); + } + + /** + * Sets <code>value</code> as the attribute value for City. + * @param value value to set the City + */ + public void setCity(String value) { + setAttributeInternal(CITY, value); + } + + /** + * Gets the attribute value for State, using the alias name State. + * @return the value of State + */ + public String getState() { + return (String)getAttributeInternal(STATE); + } + + /** + * Sets <code>value</code> as the attribute value for State. + * @param value value to set the State + */ + public void setState(String value) { + setAttributeInternal(STATE, value); + } + + /** + * Gets the attribute value for Zip, using the alias name Zip. + * @return the value of Zip + */ + public String getZip() { + return (String)getAttributeInternal(ZIP); + } + + /** + * Sets <code>value</code> as the attribute value for Zip. + * @param value value to set the Zip + */ + public void setZip(String value) { + setAttributeInternal(ZIP, value); + } + + /** + * getAttrInvokeAccessor: generated method. Do not modify. + * @param index the index identifying the attribute + * @param attrDef the attribute + + * @return the attribute value + * @throws Exception + */ + protected Object getAttrInvokeAccessor(int index, AttributeDefImpl attrDef) throws Exception { + if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) { + return AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].get(this); + } + return super.getAttrInvokeAccessor(index, attrDef); + } + + /** + * setAttrInvokeAccessor: generated method. Do not modify. + * @param index the index identifying the attribute + * @param value the value to assign to the attribute + * @param attrDef the attribute + + * @throws Exception + */ + protected void setAttrInvokeAccessor(int index, Object value, AttributeDefImpl attrDef) throws Exception { + if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) { + AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].put(this, value); + return; + } + super.setAttrInvokeAccessor(index, value, attrDef); + } + + /** + * @return the associated entity oracle.jbo.RowIterator. + */ + public RowIterator getCoffeesEO() { + return (RowIterator)getAttributeInternal(COFFEESEO); + } + + /** + * @param supId key constituent + + * @return a Key object based on given key constituents. + */ + public static Key createPrimaryKey(Integer supId) { + return new Key(new Object[]{supId}); + } + + +} diff --git a/examples/sql/adf/EX_ADF/Model/src/model/entity/association/SuppliersEOToCoffeesEOAssoc.xml b/examples/sql/adf/EX_ADF/Model/src/model/entity/association/SuppliersEOToCoffeesEOAssoc.xml new file mode 100644 index 00000000..19550461 --- /dev/null +++ b/examples/sql/adf/EX_ADF/Model/src/model/entity/association/SuppliersEOToCoffeesEOAssoc.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="GBK" ?> +<!DOCTYPE Association SYSTEM "jbo_03_01.dtd"> +<!----> +<Association + xmlns="http://xmlns.oracle.com/bc4j" + Name="SuppliersEOToCoffeesEOAssoc" + Version="11.1.2.64.36"> + <DesignTime> + <Attr Name="_isCodegen" Value="true"/> + </DesignTime> + <AssociationEnd + Name="SuppliersEO" + Cardinality="1" + Source="true" + Owner="model.entity.SuppliersEO" + CascadeDelete="true" + DeleteContainee="true" + CascadeUpdate="true"> + <DesignTime> + <Attr Name="_aggregation" Value="0"/> + <Attr Name="_finderName" Value="SuppliersEO"/> + <Attr Name="_foreignKey" Value="model.entity.SuppliersEO.SupplierspkPk"/> + <Attr Name="_isUpdateable" Value="true"/> + <Attr Name="_minCardinality" Value="1"/> + </DesignTime> + <AttrArray Name="Attributes"> + <Item Value="model.entity.SuppliersEO.SupId"/> + </AttrArray> + </AssociationEnd> + <AssociationEnd + Name="CoffeesEO" + Cardinality="-1" + Owner="model.entity.CoffeesEO" + HasOwner="true"> + <DesignTime> + <Attr Name="_aggregation" Value="0"/> + <Attr Name="_finderName" Value="CoffeesEO"/> + <Attr Name="_foreignKey" Value="model.entity.CoffeesEO.fk_CoffeesEO"/> + <Attr Name="_isUpdateable" Value="true"/> + </DesignTime> + <AttrArray Name="Attributes"> + <Item Value="model.entity.CoffeesEO.SupId"/> + </AttrArray> + </AssociationEnd> +</Association> |
