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:
<entity class="com.splwg.oms.model.entity.swman.SwmanSheet">
<entity class="com.splwg.oms.model.entity.swman.SwmanSheetView">
<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">
Each <entity> should contain an <attributes> Element with multiple <basic> elements that list the attribute name used in the configuration as well as the database column name.
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">
<entity class="com.splwg.oms.model.entity.swman.SwmanSheet">
<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>
. . .
</attributes>
</entity>
<entity class="com.splwg.oms.model.entity.swman.SwmanSheetView">
<attributes>
<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>
</entity>
. . .
</entity-mappings>
 
 
SwmanSheet will include all the fields not defined in the code class, but yet are referenced by the JBot sheet configuration.
SwmanStep will include all the fields not defined in the code class, but yet are referenced by the JBot switching step configuration.
SwmanStepView should include the subset of SwmanStep attributes that are populated from model attributes in the ATT_SUPPLEMENTAL_ATTRIBUTES database table or view, any columns displayed in the Misc Log or copied from the Misc Log to a standard sheet, and columns displayed in the Device to Sheet Operation List dialog, which is initiated from the Control Tool's Switching Plan(s)... button.
SwmanSheetView should include the subset of SwmanSheet attributes that are displayed in the Open Sheet and New Sheet dialogs.
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.