summaryrefslogtreecommitdiff
path: root/examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEOImpl.java
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-02-17 17:25:57 +0000
committer <>2015-03-17 16:26:24 +0000
commit780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch)
tree598f8b9fa431b228d29897e798de4ac0c1d3d970 /examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEOImpl.java
parent7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff)
downloadberkeleydb-master.tar.gz
Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz.HEADdb-6.1.23master
Diffstat (limited to 'examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEOImpl.java')
-rw-r--r--examples/sql/adf/EX_ADF/Model/src/model/entity/CoffeesEOImpl.java281
1 files changed, 281 insertions, 0 deletions
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});
+ }
+
+
+}