EL-Accessors-NPE-ISSUE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<sessions version="4.5" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<session xsi:type="server-session"> | |
<name>TLResrLogin</name> | |
<event-listener-classes/> | |
<primary-project xsi:type="class">TLResrLogin</primary-project> | |
<login xsi:type="database-login"> | |
<platform-class>org.eclipse.persistence.platform.database.OraclePlatform</platform-class> | |
<password>XXX</password> | |
<external-connection-pooling>true</external-connection-pooling> | |
<sequencing> | |
<default-sequence xsi:type="native-sequence"> | |
<name>Native</name> | |
<preallocation-size>1</preallocation-size> | |
</default-sequence> | |
</sequencing> | |
<datasource lookup="string">java:comp/env/jdbc/TropicsRESRDS</datasource> | |
<bind-all-parameters>true</bind-all-parameters> | |
<byte-array-binding>false</byte-array-binding> | |
<string-binding>true</string-binding> | |
<optimize-data-conversion>false</optimize-data-conversion> | |
<trim-strings>false</trim-strings> | |
<batch-writing>false</batch-writing> | |
<jdbc-batch-writing>false</jdbc-batch-writing> | |
</login> | |
<connection-pools> | |
<read-connection-pool> | |
<name>ReadConnectionPool</name> | |
<exclusive>false</exclusive> | |
</read-connection-pool> | |
<write-connection-pool> | |
<name>default</name> | |
</write-connection-pool> | |
</connection-pools> | |
<connection-policy/> | |
</session> | |
</sessions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TLRervBooking extends AbstractEclipselinkMapping { | |
private static final long serialVersionUID = 343534554893735L; | |
public TLResrBooking(Project parentProject) { | |
parentProject.addDescriptor(buildBookingDescriptor()); | |
} | |
public RelationalDescriptor buildBookingDescriptor() { | |
ExpressionBuilder expBuilder = new ExpressionBuilder(); | |
RelationalDescriptor descriptor = new RelationalDescriptor(); | |
descriptor.setJavaClass(Booking.class); | |
descriptor.addTableName("RS_TKT_BOOKING"); | |
descriptor.addPrimaryKeyFieldName("RS_TKT_BOOKING.RS_BKG_ID"); | |
// RelationalDescriptor properties. | |
setClusterConfiguration(descriptor); // setCacheSynchronizationType to descriptor as ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES | |
specifyIdentityMapClass(descriptor); // calls descriptor.useSoftCacheWeakIdentityMap(); | |
descriptor.setIdentityMapSize(100); | |
descriptor.useRemoteSoftCacheWeakIdentityMap(); | |
descriptor.setRemoteIdentityMapSize(100); | |
descriptor.setSequenceNumberFieldName("RS_TKT_BOOKING.RS_BKG_ID"); | |
descriptor.setSequenceNumberName("RS_TKT_BKG_SEQ"); | |
VersionLockingPolicy lockingPolicy = new VersionLockingPolicy(); | |
lockingPolicy.setWriteLockFieldName("RS_BOOKING.CONCURRENCYCOUNTER"); | |
lockingPolicy.storeInObject(); | |
descriptor.setOptimisticLockingPolicy(lockingPolicy); | |
descriptor.setAlias("Booking"); | |
// Query manager. | |
descriptor.getDescriptorQueryManager().checkCacheForDoesExist(); | |
//Named Queries | |
// Event manager. | |
descriptor.getDescriptorEventManager().setPreInsertSelector("aboutToUpdate"); | |
descriptor.getDescriptorEventManager().setAboutToUpdateSelector("aboutToUpdate"); | |
//mappings | |
DirectToFieldMapping bkgIDMapping = new DirectToFieldMapping(); | |
bkgIDMapping.setAttributeName("bkgID"); | |
bkgIDMapping.setFieldName("RS_TKT_BOOKING.RS_BKG_ID"); | |
descriptor.addMapping(bkgIDMapping); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TLResrLogin extends org.eclipse.persistence.sessions.Project | |
{ | |
public TLResrLogin() | |
{ | |
setName("ResrLogin"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment