Configuring Project-Specific Columns
If your project added custom data fields to the SWMAN_SHEET, SWMAN_SHEET_HIST, SWMAN_STEP OR SWMAN_SAFETY_DOCS tables, then additional configuration is required to get Web Switching and Web Safety to utilize those new fields. Web Switching and Web Safety use EclipseLink to manage writing and reading of data to and from the database. For this package to work, a mapping has to be defined for each Java class that accesses the previously mentioned tables. This mapping for the most part is defined in the code, but any additional mappings have to be defined in the eclipselink-orm.xml file. The below set of directions should be used to define your project version of this file.
1. In your [project]/jconfig directory, create a subdirectory structure as follows:
[project]/jconfig/override/fwserver.jar/META-INF/
 
2. Copy the Product version of the eclipselink-orm.xml file used by the switching and safety classes.
Note: This file can be found in the product/jconfig/override/fwserver.jar/META-INF/ directory.
3. Save the file to the META-INF directory that you created in step 1.
4. You should find the following entries:
<mapped-superclass class="com.splwg.oms.model.entity.swman.SwmanSheetBase">
<entity class="com.splwg.oms.model.entity.swman.SwmanSheet">
<entity class="com.splwg.oms.model.entity.swman.SwmanSheetView">
<mapped-superclass class="com.splwg.oms.model.entity.swman.SwmanStepBase">
<entity class="com.splwg.oms.model.entity.swman.SwmanStep">
<entity class="com.splwg.oms.model.entity.swman.SwmanStepView">
<entity class="com.splwg.oms.model.entity.safety.SafetyDocument">
For Web Switching project-specific extensions, define shared sheet and step <basic> mappings in the mapped superclasses:
com.splwg.oms.model.entity.swman.SwmanSheetBase
com.splwg.oms.model.entity.swman.SwmanStepBase
SwmanSheet and SwmanSheetView inherit mappings from SwmanSheetBase. SwmanStep and SwmanStepView inherit mappings from SwmanStepBase.
For example:
<entity-mappings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eclipse.org/eclipselink/xsds/persistence/orm http://www.eclipse.org/eclipselink/xsds/eclipselink_orm_2_1.xsd" version="2.1">
<mapped-superclass class="com.splwg.oms.model.entity.swman.SwmanSheetBase">
<attributes>
<basic name="AlternateFinishDate" access="VIRTUAL" attribute-type="Date">
<column name="ALTERNATEFINISHDATE"/>
<temporal>TIMESTAMP</temporal>
</basic>
<basic name="AlternateStartDate" access="VIRTUAL" attribute-type="String">
<column name="ALTERNATESTARTDATE"/>
<temporal>TIMESTAMP</temporal>
</basic>
<basic name="ChargeNumber1" access="VIRTUAL" attribute-type="String">
<column name="CHARGENUMBER1"/>
</basic>
. . .
<basic name="Description" access="VIRTUAL" attribute-type="String">
 
<column name="DESCRIPTION"/>
</basic>
<basic name="FEEDER_NAME" access="VIRTUAL" attribute-type="String">
 
<column name="FEEDER_NAME"/>
</basic>
<basic name="SubStation" access="VIRTUAL" attribute-type="String">
<column name="SUBSTATION"/>
</basic>
</attributes>
</mapped-superclass>
. . .
</entity-mappings>
 
 
SwmanSheetBase should include project-specific sheet extension fields not defined in the code class but referenced by JBot sheet configuration.
SwmanStepBase should include project-specific step extension fields not defined in the code class but referenced by JBot switching step configuration.
SwmanStep and SwmanStepView both inherit step extension mappings from SwmanStepBase.
SwmanSheet and SwmanSheetView both inherit sheet extension mappings from SwmanSheetBase.
When adding new extension fields, update the mapped superclass once and do not duplicate the same <basic> mapping in both entity and view entity blocks.
You need SWMAN_STEP columns for each extra field configured for your condition classes. The columns follow the convention of CONDITION_<field name>, and the SwmanStep class holds them as Condition.<field name>.
5. Add your project specific mappings to the eclipselink-orm.xml file and save it. Double check your mappings to be sure there are no duplicates due to capitalization or inconsistent data. Also check for truncating due to the Oracle 30-character column name limit.
 
Web Switching/Web Safety Crew Columns
If your project wishes to add additional contractor crew fields, then you will need to be updated following entities using the previously described steps.
com.splwg.oms.model.entity.swman.SwmanContractorCrew
com.splwg.oms.model.entity.swman.Crew
The swman.SwmanContractorCrew entity maps to the database table SWMAN_CONTRACTOR_CREWS. If you make a change to this entity, then that same change will need to be made to the swman.Crew entity as well.
The swman.Crew entity maps to the database view SWMAN_CREWS_VIEW.
After extending the crew entities you can then reference the new columns anywhere the Web Switching and Web Safety crews are displayed. These entities are only used by Web Switching and Web Safety.
The Product eclipselink-orm.xml file has the new entity classes defined and also includes a description of where to add any new columns for these entities.