This is a sample of using the DmiEntityService
.
NOTE: To run this class in IntelliJ you'll need to uncomment the excludes portion of maven-compiler-plugin
To run this program you'll need to create a file called dmi.credentials
with the following fields:
username=(username)
password=(password)
account=dev0_rt
host=host.name
port=9521
secure=false
hostname.override=
shared.secret=(shared secret)
This example is a thorough usage of DmiEntityService
. This example also shows the benefits of caching and optionally
enabling concurrent joins.
See each file in the model
package for examples of using various usages of fields, joins and associations.
Tips:
- Entity classes must be annotated with
@Entity
and extendColleagueRecord
- Association classes should be annotated with
@AssocationEntity
- Fields and joins will be mapped by default by name, converting camel case to Colleague field names (ie lastName is mapped to LAST.NAME)
- Field name mapping can be overridden using the
@Field
annotation - Joins must be annotated with
@Join
. The field name must correspond to the name of the pointer, or the optional value attribute of@Join
can be used to specify the join. - Data types must correspond to what is returned by
DmiDataService
(see the main README for data types)
See StudentAcadCredRecord and child classes for a thorough example of each use case.