Convention

Data Convention

Type Data Java Data
NUMBER BigDecimal
VARCHAR String
DATE Timestamp

Naming Convention

I have a small comparison.

Type Name Field Name
last_name last_name
last_name lastName
LAST_NAME lastName
LASTNAME lastName

Annotation OracleParameter

Use annotation OracleParameter in case

  • Both field names are not the same
  • Type input/output is a complex type

Please take a look ComplexCustomerPojo.java and complex_example_pack.sql.

You will see how to use annotation OracleParameter

@OracleParameter(
    value = "original_address",
    input = @OracleType(structName = "complex_example_pack.address"),
    output = @OracleType(structName = "complex_example_pack.address")
)
private Address address;

@OracleParameter(
    value = "other_address",
    input = @OracleType(structName = "complex_example_pack.address", arrayName = "complex_example_pack.address_array"),
    output = @OracleType(structName = "complex_example_pack.address", arrayName = "complex_example_pack.address_array")
)
private Address[] addresses;