Showing posts with label trusted. Show all posts
Showing posts with label trusted. Show all posts

Tuesday, April 5, 2016

ADF 12c Groovy Expression to get Primary Key from Sequence to EO

<Attribute
    Name="LnId"
    ColumnName="LN_ID"
    SQLType="NUMERIC"
    Type="java.math.BigDecimal"
    ColumnType="NUMBER"
    TableName="ABC_TABLE"
    PrimaryKey="true"
    IsEffectiveDateSequenceFlag="true">
    <TransientExpression
      trustMode="trusted"><![CDATA[(new oracle.jbo.server.SequenceImpl("SEQ_NAME", object.getDBTransaction())).
getSequenceNumber()]]></TransientExpression>
  </Attribute>