Friday, January 13, 2012

problem with JBO-25058 / entity refactoring


I had a problem after refactoring entity objects in Jdev and these blogs helped....

Andrejus Baranovskis' original posting here...

one-size-doesnt-fit-all

After reviewing the suggestions above / thanks guys!! / -- what i ended up doing was looking in my pagedef files and I found an attribute that was not re-factored out. So I remove the culprit and now the error is gone -- good bye~!  

Tuesday, January 3, 2012

Setup View Object Bind Variable Data Control


1. Include a Bind Variable in your View Query that will be set for that query
- Make sure the Type is the proper setting 



2. Select Java and edit/add t
he Java Classes - include the bind accessors














3. Add the Client Interface Method.



















4. We now have a new Data Control generated from the Client Interface:

Friday, December 23, 2011

Remove an AppMod // Data Controller


Remove an Application Module:
check in the XXXModel.jpx source code

Remove Data Controller:
Under the Model path
$JdevHome\Model\adfmsrc\model\DataControls.dcx

remove the DC -- AdapterDataControl for the unwanted DC


 <AdapterDataControl id="StockVOImpl" FactoryClass="oracle.adf.model.adapter.DataControlFactoryImpl"
                      ImplDef="oracle.adf.model.adapter.bean.BeanDCDefinition" SupportsTransactions="false"
                      SupportsSortCollection="true" SupportsResetState="false" SupportsRangesize="false"
                      SupportsFindMode="false" SupportsUpdates="true" Definition="modelList.StockVOImpl"
                      BeanClass="model.List.StockVOImpl" xmlns="http://xmlns.oracle.com/adfm/datacontrol">
    <CreatableTypes>
      <TypeInfo FullName="model.List.StockVOImpl"/>
    </CreatableTypes>
    <Source>
      <bean-definition BeanClass="model.List.StockIVOImpl"
                       xmlns="http://xmlns.oracle.com/adfm/adapter/bean"/>
    </Source>
  </AdapterDataControl>



Tuesday, December 13, 2011

Defining Relationships Between Parent and Child Tables


From: Oracle 10g Docs:  Maintaining Data Integrity in Application Development


Several relationships between parent and child tables can be determined by the other types of integrity constraints defined on the foreign key in the child table.
No Constraints on the Foreign Key  When no other constraints are defined on the foreign key, any number of rows in the child table can reference the same parent key value. This model allows nulls in the foreign key.
This model establishes a one-to-many relationship between the parent and foreign keys that allows undetermined values (nulls) in the foreign key. An example of such a relationship is shown in Figure 6-3, "Tables with Referential Integrity Constraints" between the employee and department tables. Each department (parent key) has many employees (foreign key), and some employees might not be in a department (nulls in the foreign key).
NOT NULL Constraint on the Foreign Key  When nulls are not allowed in a foreign key, each row in the child table must explicitly reference a value in the parent key because nulls are not allowed in the foreign key.


Any number of rows in the child table can reference the same parent key value, so this model establishes a one-to-many relationship between the parent and foreign keys. However, each row in the child table must have a reference to a parent key value; the absence of a value (a null) in the foreign key is not allowed. The same example in the previous section can be used to illustrate such a relationship. However, in this case, employees must have a reference to a specific department.


UNIQUE Constraint on the Foreign Key  When a UNIQUE constraint is defined on the foreign key, only one row in the child table can reference a given parent key value. This model allows nulls in the foreign key.


This model establishes a one-to-one relationship between the parent and foreign keys that allows undetermined values (nulls) in the foreign key. For example, assume that the employee table had a column named MEMBERNO, referring to an employee membership number in the company insurance plan. Also, a table named INSURANCE has a primary key named MEMBERNO, and other columns of the table keep respective information relating to an employee insurance policy. The MEMBERNO in the employee table should be both a foreign key and a unique key:
  • To enforce referential integrity rules between the EMP_TAB and INSURANCE tables (the FOREIGN KEY constraint)
  • To guarantee that each employee has a unique membership number (the UNIQUE key constraint)
UNIQUE and NOT NULL Constraints on the Foreign Key  When both UNIQUE and NOT NULL constraints are defined on the foreign key, only one row in the child table can reference a given parent key value, and because NULL values are not allowed in the foreign key, each row in the child table must explicitly reference a value in the parent key.


This model establishes a one-to-one relationship between the parent and foreign keys that does not allow undetermined values (nulls) in the foreign key. If you expand the previous example by adding a NOT NULL constraint on the MEMBERNO column of the employee table, in addition to guaranteeing that each employee has a unique membership number, you also ensure that no undetermined values (nulls) are allowed in the MEMBERNO column of the employee table.

Monday, December 12, 2011

Increasing JVM Size of Admin Server

There  are 2 different type of servers within the Weblogic Server
1. Admin Server
2. Managed Server

To Increase the JVM Size of Admin Server

The Size of the Admin server can be increased by changing Xmx and Xms values in setDomainEnv.sh which is located in $HOME/user_projects/domains/<Domain>/bin

There are two blocks for XMX and XMS in setDomainEnv.sh. Depending up on type of JVM make changes in second block.

For windoze

XMS_JROCKIT_64BIT=”256″
export XMS_JROCKIT_64BIT
XMS_JROCKIT_32BIT=”256″
export XMS_JROCKIT_32BIT
XMX_JROCKIT_64BIT=”512″
export XMX_JROCKIT_64BIT
XMX_JROCKIT_32BIT=”512″
export XMX_JROCKIT_32BIT

Friday, December 9, 2011

Run Application Module

As we all know we can right click on the AppMod and hit run to see the data in the AppMod setup.

I had a few problems with this:
1) I need to remember that JDev / ADF will add a DS after the connection name.
2) The Model project properties need to be set for the proper connection.



Wednesday, November 30, 2011

Default Mappings Between Oracle SQL Types and Java Types

SQL Data Types
JDBC Type Codes
Standard Java Types
Oracle Extension Java Types

STANDARD JDBC TYPES:


CHAR
java.sql.Types.CHAR
java.lang.String
oracle.sql.CHAR
VARCHAR2
java.sql.Types.VARCHAR
java.lang.String
oracle.sql.CHAR
LONG
java.sql.Types.LONGVARCHAR
java.lang.String
oracle.sql.CHAR
NUMBER
java.sql.Types.NUMERIC
java.math.BigDecimal
oracle.sql.NUMBER
NUMBER
java.sql.Types.DECIMAL
java.math.BigDecimal
oracle.sql.NUMBER
NUMBER
java.sql.Types.BIT
boolean
oracle.sql.NUMBER
NUMBER
java.sql.Types.TINYINT
byte
oracle.sql.NUMBER
NUMBER
java.sql.Types.SMALLINT
short
oracle.sql.NUMBER
NUMBER
java.sql.Types.INTEGER
int
oracle.sql.NUMBER
NUMBER
java.sql.Types.BIGINT
long
oracle.sql.NUMBER
NUMBER
java.sql.Types.REAL
float
oracle.sql.NUMBER
NUMBER
java.sql.Types.FLOAT
double
oracle.sql.NUMBER
NUMBER
java.sql.Types.DOUBLE
double
oracle.sql.NUMBER
RAW
java.sql.Types.BINARY
byte[]
oracle.sql.RAW
RAW
java.sql.Types.VARBINARY
byte[]
oracle.sql.RAW
LONGRAW
java.sql.Types.LONGVARBINARY
byte[]
oracle.sql.RAW
DATE
java.sql.Types.DATE
java.sql.Date
oracle.sql.DATE
DATE
java.sql.Types.TIME
java.sql.Time
oracle.sql.DATE
TIMESTAMP
java.sql.Types.TIMESTAMP
javal.sql.Timestamp
oracle.sql.TIMESTAMP
BLOB
java.sql.Types.BLOB
java.sql.Blob
oracle.sql.BLOB
CLOB
java.sql.Types.CLOB
java.sql.Clob
oracle.sql.CLOB
user-defined object
java.sql.Types.STRUCT
java.sql.Struct
oracle.sql.STRUCT
user-defined reference
java.sql.Types.REF
java.sql.Ref
oracle.sql.REF
user-defined collection
java.sql.Types.ARRAY
java.sql.Array
oracle.sql.ARRAY
ROWID
java.sql.Types.ROWID
java.sql.RowId
oracle.sql.ROWID
NCLOB
java.sql.Types.NCLOB
java.sql.NClob
oracle.sql.NCLOB
NCHAR
java.sql.Types.NCHAR
java.lang.String
oracle.sql.CHAR

ORACLE EXTENSIONS:


BFILE
oracle.jdbc.OracleTypes.BFILE
NA
oracle.sql.BFILE
REF CURSOR
oracle.jdbc.OracleTypes.CURSOR
java.sql.ResultSet
oracle.jdbc.OracleResultSet
TIMESTAMP
oracle.jdbc.OracleTypes.TIMESTAMP
java.sql.Timestamp
oracle.sql.TIMESTAMP
TIMESTAMP WITH TIME ZONE
oracle.jdbc.OracleTypes.TIMESTAMPTZ
java.sql.Timestamp
oracle.sql.TIMESTAMPTZ
TIMESTAMP WITH LOCAL TIME ZONE
oracle.jdbc.OracleTypes.TIMESTAMPLTZ
java.sql.Timestamp
oracle.sql.TIMESTAMPLTZ