Commit 51afe037 by Nilu

adding occupation BO and data

parent b8d5855d
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_occupation</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="code" type="String" nullable="false" length="4"/>
<column name="name" type="String" nullable="false" length="250"/>
<column name="level" type="String" nullable="false" length="200"/>
<column name="parent_occupation_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_occupation" indexName="idx_tl_occupation_parent_occupation_id" isUnique="false"><column name="parent_occupation_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
-- DROP TABLE tl_occupation;
CREATE TABLE tl_occupation (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
code varchar(4) NOT NULL,
name varchar(250) NOT NULL,
level varchar(200) NOT NULL,
parent_occupation_id numeric(12) NULL
);
ALTER TABLE tl_occupation ADD
CONSTRAINT PK_tl_occupation PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_occupation_parent_occupation_id
ON tl_occupation (parent_occupation_id);
-- DROP TABLE tl_occupation;
CREATE TABLE tl_occupation (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
code varchar2(4) NOT NULL,
name varchar2(250) NOT NULL,
level varchar2(200) NOT NULL,
parent_occupation_id number(12) NULL
);
ALTER TABLE tl_occupation ADD
CONSTRAINT PK_tl_occupation PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_occupation_parent_occupation_id
ON tl_occupation (parent_occupation_id);
-- @AutoRun
-- drop table tl_occupation;
CREATE TABLE tl_occupation (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
code varchar(4) NOT NULL,
name varchar(250) NOT NULL,
level varchar(200) NOT NULL,
parent_occupation_id numeric(12) NULL
);
ALTER TABLE tl_occupation ADD
CONSTRAINT pk_tl_occupation PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_occupation_parent_occupation_id
ON tl_occupation (parent_occupation_id);
/*
* IMPORTANT!!!! XSL Autogenerated class, DO NOT EDIT!!!!!
* Template: Infrastructure8.2 rev3 [oneit.objstore.BusinessObjectTemplate.xsl]
*
* Version: 1.0
* Vendor: Apache Software Foundation (Xalan XSLTC)
* Vendor URL: http://xml.apache.org/xalan-j
*/
package performa.orm;
import java.io.*;
import java.util.*;
import oneit.appservices.config.*;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.attributes.*;
import oneit.objstore.rdbms.filters.*;
import oneit.objstore.parser.*;
import oneit.objstore.validator.*;
import oneit.objstore.utils.*;
import oneit.utils.*;
import oneit.utils.filter.Filter;
import oneit.utils.transform.*;
import oneit.utils.parsers.FieldException;
import performa.orm.types.*;
public abstract class BaseOccupation extends BaseBusinessClass
{
// Reference instance for the object
public static final Occupation REFERENCE_Occupation = new Occupation ();
// Reference instance for the object
public static final Occupation DUMMY_Occupation = new DummyOccupation ();
// Static constants corresponding to field names
public static final String FIELD_Code = "Code";
public static final String FIELD_Name = "Name";
public static final String FIELD_Level = "Level";
public static final String SINGLEREFERENCE_ParentOccupation = "ParentOccupation";
public static final String BACKREF_ParentOccupation = "";
public static final String MULTIPLEREFERENCE_ChildOccupations = "ChildOccupations";
public static final String BACKREF_ChildOccupations = "";
// Static constants corresponding to searches
public static final String SEARCH_All = "All";
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper<Occupation> HELPER_Code = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Occupation> HELPER_Name = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper<Occupation, OccupationLevel> HELPER_Level = new EnumeratedAttributeHelper<Occupation, OccupationLevel> (OccupationLevel.FACTORY_OccupationLevel);
// Private attributes corresponding to business object data
private String _Code;
private String _Name;
private OccupationLevel _Level;
// Private attributes corresponding to single references
private SingleAssociation<Occupation, Occupation> _ParentOccupation;
// Private attributes corresponding to multiple references
private MultipleAssociation<Occupation, Occupation> _ChildOccupations;
// Map of maps of metadata
private static final Map ATTRIBUTES_METADATA_Occupation = new HashMap ();
// Arrays of validators for each attribute
private static final AttributeValidator[] FIELD_Code_Validators;
private static final AttributeValidator[] FIELD_Name_Validators;
private static final AttributeValidator[] FIELD_Level_Validators;
// Arrays of behaviour decorators
private static final OccupationBehaviourDecorator[] Occupation_BehaviourDecorators;
static
{
try
{
String tmp_ChildOccupations = Occupation.BACKREF_ParentOccupation;
String tmp_ParentOccupation = Occupation.BACKREF_ChildOccupations;
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
setupAssocMetaData_ChildOccupations();
setupAssocMetaData_ParentOccupation();
FIELD_Code_Validators = (AttributeValidator[])setupAttribMetaData_Code(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Name_Validators = (AttributeValidator[])setupAttribMetaData_Name(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Level_Validators = (AttributeValidator[])setupAttribMetaData_Level(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_Occupation.initialiseReference ();
DUMMY_Occupation.initialiseReference ();
Occupation_BehaviourDecorators = BaseBusinessClass.getBBCBehaviours(Occupation.class).toArray(new OccupationBehaviourDecorator[0]);
}
catch (RuntimeException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR1, e, "Error initialising");
throw e;
}
}
// Meta Info setup
private static void setupAssocMetaData_ChildOccupations()
{
Map metaInfo = new HashMap ();
metaInfo.put ("backreferenceName", "ParentOccupation");
metaInfo.put ("name", "ChildOccupations");
metaInfo.put ("type", "Occupation");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Occupation.ChildOccupations:", metaInfo);
ATTRIBUTES_METADATA_Occupation.put (MULTIPLEREFERENCE_ChildOccupations, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static void setupAssocMetaData_ParentOccupation()
{
Map metaInfo = new HashMap ();
metaInfo.put ("backreferenceName", "ChildOccupations");
metaInfo.put ("dbcol", "parent_occupation_id");
metaInfo.put ("name", "ParentOccupation");
metaInfo.put ("type", "Occupation");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Occupation.ParentOccupation:", metaInfo);
ATTRIBUTES_METADATA_Occupation.put (SINGLEREFERENCE_ParentOccupation, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static List setupAttribMetaData_Code(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "code");
metaInfo.put ("isUnique", "true");
metaInfo.put ("length", "4");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "Code");
metaInfo.put ("type", "String");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Occupation.Code:", metaInfo);
ATTRIBUTES_METADATA_Occupation.put (FIELD_Code, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Occupation.class, "Code", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Occupation.Code:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_Name(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "name");
metaInfo.put ("length", "250");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "Name");
metaInfo.put ("type", "String");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Occupation.Name:", metaInfo);
ATTRIBUTES_METADATA_Occupation.put (FIELD_Name, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Occupation.class, "Name", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Occupation.Name:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_Level(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "level");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "Level");
metaInfo.put ("type", "OccupationLevel");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Occupation.Level:", metaInfo);
ATTRIBUTES_METADATA_Occupation.put (FIELD_Level, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Occupation.class, "Level", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Occupation.Level:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION
// This constructor should not be called
protected BaseOccupation ()
{
}
protected BBCBehaviourDecorator[] getBehaviours()
{
return Occupation_BehaviourDecorators;
}
// Initialise the attributes
protected void _initialiseNewObjAttributes (ObjectTransaction transaction) throws StorageException
{
super._initialiseNewObjAttributes (transaction);
_Code = (String)(HELPER_Code.initialise (_Code));
_Name = (String)(HELPER_Name.initialise (_Name));
_Level = (OccupationLevel)(HELPER_Level.initialise (_Level));
}
// Initialise the associations
protected void _initialiseAssociations ()
{
super._initialiseAssociations ();
_ParentOccupation = new SingleAssociation<Occupation, Occupation> (this, SINGLEREFERENCE_ParentOccupation, Occupation.MULTIPLEREFERENCE_ChildOccupations, Occupation.REFERENCE_Occupation, "tl_occupation");
_ChildOccupations = new MultipleAssociation<Occupation, Occupation> (this, MULTIPLEREFERENCE_ChildOccupations, Occupation.SINGLEREFERENCE_ParentOccupation, Occupation.REFERENCE_Occupation);
}
// Initialise the associations
protected BaseBusinessClass initialiseReference ()
{
super.initialiseReference ();
_ParentOccupation = new SingleAssociation<Occupation, Occupation> (this, SINGLEREFERENCE_ParentOccupation, Occupation.MULTIPLEREFERENCE_ChildOccupations, Occupation.REFERENCE_Occupation, "tl_occupation");
_ChildOccupations = new MultipleAssociation<Occupation, Occupation> (this, MULTIPLEREFERENCE_ChildOccupations, Occupation.SINGLEREFERENCE_ParentOccupation, Occupation.REFERENCE_Occupation);
return this;
}
/**
* Get the attribute Code
*/
public String getCode ()
{
assertValid();
String valToReturn = _Code;
for (OccupationBehaviourDecorator bhd : Occupation_BehaviourDecorators)
{
valToReturn = bhd.getCode ((Occupation)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preCodeChange (String newCode) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postCodeChange () throws FieldException
{
}
public FieldWriteability getWriteability_Code ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute Code. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setCode (String newCode) throws FieldException
{
boolean oldAndNewIdentical = HELPER_Code.compare (_Code, newCode);
try
{
for (OccupationBehaviourDecorator bhd : Occupation_BehaviourDecorators)
{
newCode = bhd.setCode ((Occupation)this, newCode);
oldAndNewIdentical = HELPER_Code.compare (_Code, newCode);
}
BusinessObjectParser.assertFieldCondition (newCode != null, this, FIELD_Code, "mandatory");
if (FIELD_Code_Validators.length > 0)
{
Object newCodeObj = HELPER_Code.toObject (newCode);
if (newCodeObj != null)
{
int loopMax = FIELD_Code_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Occupation.get (FIELD_Code);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_Code_Validators[v].checkAttribute (this, FIELD_Code, metadata, newCodeObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_Code () != FieldWriteability.FALSE, "Field Code is not writeable");
preCodeChange (newCode);
markFieldChange (FIELD_Code);
_Code = newCode;
postFieldChange (FIELD_Code);
postCodeChange ();
}
}
/**
* Get the attribute Name
*/
public String getName ()
{
assertValid();
String valToReturn = _Name;
for (OccupationBehaviourDecorator bhd : Occupation_BehaviourDecorators)
{
valToReturn = bhd.getName ((Occupation)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preNameChange (String newName) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postNameChange () throws FieldException
{
}
public FieldWriteability getWriteability_Name ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute Name. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setName (String newName) throws FieldException
{
boolean oldAndNewIdentical = HELPER_Name.compare (_Name, newName);
try
{
for (OccupationBehaviourDecorator bhd : Occupation_BehaviourDecorators)
{
newName = bhd.setName ((Occupation)this, newName);
oldAndNewIdentical = HELPER_Name.compare (_Name, newName);
}
BusinessObjectParser.assertFieldCondition (newName != null, this, FIELD_Name, "mandatory");
if (FIELD_Name_Validators.length > 0)
{
Object newNameObj = HELPER_Name.toObject (newName);
if (newNameObj != null)
{
int loopMax = FIELD_Name_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Occupation.get (FIELD_Name);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_Name_Validators[v].checkAttribute (this, FIELD_Name, metadata, newNameObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_Name () != FieldWriteability.FALSE, "Field Name is not writeable");
preNameChange (newName);
markFieldChange (FIELD_Name);
_Name = newName;
postFieldChange (FIELD_Name);
postNameChange ();
}
}
/**
* Get the attribute Level
*/
public OccupationLevel getLevel ()
{
assertValid();
OccupationLevel valToReturn = _Level;
for (OccupationBehaviourDecorator bhd : Occupation_BehaviourDecorators)
{
valToReturn = bhd.getLevel ((Occupation)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preLevelChange (OccupationLevel newLevel) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postLevelChange () throws FieldException
{
}
public FieldWriteability getWriteability_Level ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute Level. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setLevel (OccupationLevel newLevel) throws FieldException
{
boolean oldAndNewIdentical = HELPER_Level.compare (_Level, newLevel);
try
{
for (OccupationBehaviourDecorator bhd : Occupation_BehaviourDecorators)
{
newLevel = bhd.setLevel ((Occupation)this, newLevel);
oldAndNewIdentical = HELPER_Level.compare (_Level, newLevel);
}
BusinessObjectParser.assertFieldCondition (newLevel != null, this, FIELD_Level, "mandatory");
if (FIELD_Level_Validators.length > 0)
{
Object newLevelObj = HELPER_Level.toObject (newLevel);
if (newLevelObj != null)
{
int loopMax = FIELD_Level_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Occupation.get (FIELD_Level);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_Level_Validators[v].checkAttribute (this, FIELD_Level, metadata, newLevelObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_Level () != FieldWriteability.FALSE, "Field Level is not writeable");
preLevelChange (newLevel);
markFieldChange (FIELD_Level);
_Level = newLevel;
postFieldChange (FIELD_Level);
postLevelChange ();
}
}
/**
* A list of multi assoc names e.g. list of strings.
*/
public List<String> getSingleAssocs()
{
List result = super.getSingleAssocs ();
result.add("ParentOccupation");
return result;
}
public BaseBusinessClass getSingleAssocReferenceInstance (String assocName)
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{
return _ParentOccupation.getReferencedType ();
}
else
{
return super.getSingleAssocReferenceInstance (assocName);
}
}
public String getSingleAssocBackReference(String assocName)
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{
return Occupation.MULTIPLEREFERENCE_ChildOccupations ;
}
else
{
return super.getSingleAssocBackReference (assocName);
}
}
public BaseBusinessClass getSingleAssoc (String assocName) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{
return getParentOccupation ();
}
else
{
return super.getSingleAssoc (assocName);
}
}
public BaseBusinessClass getSingleAssoc (String assocName, Get getType) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{
return getParentOccupation (getType);
}
else
{
return super.getSingleAssoc (assocName, getType);
}
}
public Long getSingleAssocID (String assocName) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{
return getParentOccupationID ();
}
else
{
return super.getSingleAssocID (assocName);
}
}
public void setSingleAssoc (String assocName, BaseBusinessClass newValue) throws StorageException, FieldException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_ParentOccupation))
{
setParentOccupation ((Occupation)(newValue));
}
else
{
super.setSingleAssoc (assocName, newValue);
}
}
/**
* Get the reference ParentOccupation
*/
public Occupation getParentOccupation () throws StorageException
{
assertValid();
try
{
return (Occupation)(_ParentOccupation.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in Occupation:", this.getObjectID (), ", was trying to get Occupation:", getParentOccupationID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _ParentOccupation.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Occupation getParentOccupation (Get getType) throws StorageException
{
assertValid();
return _ParentOccupation.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getParentOccupationID ()
{
assertValid();
if (_ParentOccupation == null)
{
return null;
}
else
{
return _ParentOccupation.getID ();
}
}
/**
* Called prior to the assoc changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preParentOccupationChange (Occupation newParentOccupation) throws FieldException
{
}
/**
* Called after the assoc changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postParentOccupationChange () throws FieldException
{
}
public FieldWriteability getWriteability_ParentOccupation ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference ParentOccupation. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setParentOccupation (Occupation newParentOccupation) throws StorageException, FieldException
{
if (_ParentOccupation.wouldReferencedChange (newParentOccupation))
{
assertValid();
Debug.assertion (getWriteability_ParentOccupation () != FieldWriteability.FALSE, "Assoc ParentOccupation is not writeable");
preParentOccupationChange (newParentOccupation);
Occupation oldParentOccupation = getParentOccupation ();
if (oldParentOccupation != null)
{
// This is to stop validation from triggering when we are removed
_ParentOccupation.set (null);
oldParentOccupation.removeFromChildOccupations ((Occupation)(this));
}
_ParentOccupation.set (newParentOccupation);
if (newParentOccupation != null)
{
newParentOccupation.addToChildOccupations ((Occupation)(this));
}
postParentOccupationChange ();
}
}
/**
* A list of multi assoc names e.g. list of strings.
*/
public List<String> getMultiAssocs()
{
List result = super.getMultiAssocs ();
result.add("ChildOccupations");
return result;
}
/**
* Get the reference instance for the multi assoc name.
*/
public BaseBusinessClass getMultiAssocReferenceInstance(String attribName)
{
if (MULTIPLEREFERENCE_ChildOccupations.equals(attribName))
{
return Occupation.REFERENCE_Occupation ;
}
return super.getMultiAssocReferenceInstance(attribName);
}
public String getMultiAssocBackReference(String attribName)
{
if (MULTIPLEREFERENCE_ChildOccupations.equals(attribName))
{
return Occupation.SINGLEREFERENCE_ParentOccupation ;
}
return super.getMultiAssocBackReference(attribName);
}
/**
* Get the assoc count for the multi assoc name.
*/
public int getMultiAssocCount(String attribName) throws StorageException
{
if (MULTIPLEREFERENCE_ChildOccupations.equals(attribName))
{
return this.getChildOccupationsCount();
}
return super.getMultiAssocCount(attribName);
}
/**
* Get the assoc at a particular index
*/
public BaseBusinessClass getMultiAssocAt(String attribName, int index) throws StorageException
{
if (MULTIPLEREFERENCE_ChildOccupations.equals(attribName))
{
return this.getChildOccupationsAt(index);
}
return super.getMultiAssocAt(attribName, index);
}
/**
* Add to a multi assoc by attribute name
*/
public void addToMultiAssoc(String attribName, BaseBusinessClass newElement) throws StorageException
{
if (MULTIPLEREFERENCE_ChildOccupations.equals(attribName))
{
addToChildOccupations((Occupation)newElement);
return;
}
super.addToMultiAssoc(attribName, newElement);
}
/**
* Remove from a multi assoc by attribute name
*/
public void removeFromMultiAssoc(String attribName, BaseBusinessClass oldElement) throws StorageException
{
if (MULTIPLEREFERENCE_ChildOccupations.equals(attribName))
{
removeFromChildOccupations((Occupation)oldElement);
return;
}
super.removeFromMultiAssoc(attribName, oldElement);
}
protected void __loadMultiAssoc (String attribName, BaseBusinessClass[] elements)
{
if (MULTIPLEREFERENCE_ChildOccupations.equals(attribName))
{
_ChildOccupations.__loadAssociation (elements);
return;
}
super.__loadMultiAssoc(attribName, elements);
}
protected boolean __isMultiAssocLoaded (String attribName)
{
if (MULTIPLEREFERENCE_ChildOccupations.equals(attribName))
{
return _ChildOccupations.isLoaded ();
}
return super.__isMultiAssocLoaded(attribName);
}
public FieldWriteability getWriteability_ChildOccupations ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
public int getChildOccupationsCount () throws StorageException
{
assertValid();
return _ChildOccupations.getReferencedObjectsCount ();
}
public void addToChildOccupations (Occupation newElement) throws StorageException
{
if (_ChildOccupations.wouldAddChange (newElement))
{
assertValid();
Debug.assertion (getWriteability_ChildOccupations () != FieldWriteability.FALSE, "MultiAssoc ChildOccupations is not writeable (add)");
_ChildOccupations.appendElement (newElement);
try
{
if (newElement.getParentOccupation () != this)
{
newElement.setParentOccupation ((Occupation)(this));
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public void removeFromChildOccupations (Occupation elementToRemove) throws StorageException
{
if (_ChildOccupations.wouldRemoveChange (elementToRemove))
{
assertValid();
Debug.assertion (getWriteability_ChildOccupations () != FieldWriteability.FALSE, "MultiAssoc ChildOccupations is not writeable (remove)");
_ChildOccupations.removeElement (elementToRemove);
try
{
if (elementToRemove.getParentOccupation () != null)
{
elementToRemove.setParentOccupation (null);
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public Occupation getChildOccupationsAt (int index) throws StorageException
{
return (Occupation)(_ChildOccupations.getElementAt (index));
}
public SortedSet<Occupation> getChildOccupationsSet () throws StorageException
{
return _ChildOccupations.getSet ();
}
public void onDelete ()
{
try
{
// Ensure we are removed from any loaded multi-associations that aren't mandatory
if (_ParentOccupation.isLoaded () || getTransaction ().isObjectLoaded (_ParentOccupation.getReferencedType (), getParentOccupationID ()))
{
Occupation referenced = getParentOccupation ();
if (referenced != null)
{
// Stop the callback
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null ChildOccupations from ", getObjectID (), " to ", referenced.getObjectID ());
_ParentOccupation.set (null);
referenced.removeFromChildOccupations ((Occupation)this);
}
}
for(Occupation referenced : CollectionUtils.reverse(getChildOccupationsSet()))
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null ParentOccupation from ", getObjectID (), " to ", referenced.getObjectID ());
referenced.setParentOccupation(null);
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
super.onDelete ();
}
public Occupation newInstance ()
{
return new Occupation ();
}
public Occupation referenceInstance ()
{
return REFERENCE_Occupation;
}
public Occupation getInTransaction (ObjectTransaction t) throws StorageException
{
return getOccupationByID (t, getObjectID());
}
public BaseBusinessClass dummyInstance ()
{
return DUMMY_Occupation;
}
public String getBaseSetName ()
{
return "tl_occupation";
}
/**
* This is where an object returns the Persistent sets that will
* store it into the database.
* The should be entered into allSets
*/
public void getPersistentSets (PersistentSetCollection allSets)
{
ObjectStatus myStatus = getStatus ();
PersistentSetStatus myPSetStatus = myStatus.getPSetStatus();
ObjectID myID = getID();
super.getPersistentSets (allSets);
PersistentSet tl_occupationPSet = allSets.getPersistentSet (myID, "tl_occupation", myPSetStatus);
tl_occupationPSet.setAttrib (FIELD_ObjectID, myID);
tl_occupationPSet.setAttrib (FIELD_Code, HELPER_Code.toObject (_Code)); //
tl_occupationPSet.setAttrib (FIELD_Name, HELPER_Name.toObject (_Name)); //
tl_occupationPSet.setAttrib (FIELD_Level, HELPER_Level.toObject (_Level)); //
_ParentOccupation.getPersistentSets (allSets);
}
/**
* Sets the objects state based on Persistent sets.
*/
public void setFromPersistentSets (ObjectID objectID, PersistentSetCollection allSets)
{
super.setFromPersistentSets (objectID, allSets);
PersistentSet tl_occupationPSet = allSets.getPersistentSet (objectID, "tl_occupation");
_Code = (String)(HELPER_Code.fromObject (_Code, tl_occupationPSet.getAttrib (FIELD_Code))); //
_Name = (String)(HELPER_Name.fromObject (_Name, tl_occupationPSet.getAttrib (FIELD_Name))); //
_Level = (OccupationLevel)(HELPER_Level.fromObject (_Level, tl_occupationPSet.getAttrib (FIELD_Level))); //
_ParentOccupation.setFromPersistentSets (objectID, allSets);
}
public void setAttributesFrom (BaseBusinessClass other, MultiException e)
{
super.setAttributesFrom (other, e);
if (other instanceof Occupation)
{
Occupation otherOccupation = (Occupation)other;
try
{
setCode (otherOccupation.getCode ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setName (otherOccupation.getName ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setLevel (otherOccupation.getLevel ());
}
catch (FieldException ex)
{
e.addException (ex);
}
}
}
/**
* Set the attributes in this to copies of the attributes in source.
*/
public void copyAttributesFrom (BaseBusinessClass source)
{
super.copyAttributesFrom (source);
if (source instanceof BaseOccupation)
{
BaseOccupation sourceOccupation = (BaseOccupation)(source);
_Code = sourceOccupation._Code;
_Name = sourceOccupation._Name;
_Level = sourceOccupation._Level;
}
}
/**
* Set the associations in this to copies of the attributes in source.
*/
public void copySingleAssociationsFrom (BaseBusinessClass source, boolean linkToGhosts)
{
super.copySingleAssociationsFrom (source, linkToGhosts);
if (source instanceof BaseOccupation)
{
BaseOccupation sourceOccupation = (BaseOccupation)(source);
_ParentOccupation.copyFrom (sourceOccupation._ParentOccupation, linkToGhosts);
}
}
/**
* Set the associations in this to copies of the attributes in source.
*/
public void copyAssociationsFrom (BaseBusinessClass source, boolean linkToGhosts)
{
super.copyAssociationsFrom (source, linkToGhosts);
if (source instanceof BaseOccupation)
{
BaseOccupation sourceOccupation = (BaseOccupation)(source);
_ChildOccupations.copyFrom (sourceOccupation._ChildOccupations, linkToGhosts);
}
}
public void validate (ValidationContext context)
{
super.validate (context);
}
/**
* Subclasses must override this to read in their attributes
*/
protected void readExternalData(Map<String, Object> vals) throws IOException, ClassNotFoundException
{
super.readExternalData(vals);
_Code = (String)(HELPER_Code.readExternal (_Code, vals.get(FIELD_Code))); //
_Name = (String)(HELPER_Name.readExternal (_Name, vals.get(FIELD_Name))); //
_Level = (OccupationLevel)(HELPER_Level.readExternal (_Level, vals.get(FIELD_Level))); //
_ParentOccupation.readExternalData(vals.get(SINGLEREFERENCE_ParentOccupation));
_ChildOccupations.readExternalData(vals.get(MULTIPLEREFERENCE_ChildOccupations));
}
/**
* Subclasses must override this to write out their attributes
*/
protected void writeExternalData(Map<String, Object> vals) throws IOException
{
super.writeExternalData(vals);
vals.put (FIELD_Code, HELPER_Code.writeExternal (_Code));
vals.put (FIELD_Name, HELPER_Name.writeExternal (_Name));
vals.put (FIELD_Level, HELPER_Level.writeExternal (_Level));
vals.put (SINGLEREFERENCE_ParentOccupation, _ParentOccupation.writeExternalData());
vals.put (MULTIPLEREFERENCE_ChildOccupations, _ChildOccupations.writeExternalData());
}
public void compare (BaseBusinessClass other, AttributeChangeListener listener) throws StorageException
{
super.compare (other, listener);
if (other instanceof BaseOccupation)
{
BaseOccupation otherOccupation = (BaseOccupation)(other);
if (!HELPER_Code.compare(this._Code, otherOccupation._Code))
{
listener.notifyFieldChange(this, other, FIELD_Code, HELPER_Code.toObject(this._Code), HELPER_Code.toObject(otherOccupation._Code));
}
if (!HELPER_Name.compare(this._Name, otherOccupation._Name))
{
listener.notifyFieldChange(this, other, FIELD_Name, HELPER_Name.toObject(this._Name), HELPER_Name.toObject(otherOccupation._Name));
}
if (!HELPER_Level.compare(this._Level, otherOccupation._Level))
{
listener.notifyFieldChange(this, other, FIELD_Level, HELPER_Level.toObject(this._Level), HELPER_Level.toObject(otherOccupation._Level));
}
// Compare single assocs
_ParentOccupation.compare (otherOccupation._ParentOccupation, listener);
// Compare multiple assocs
_ChildOccupations.compare (otherOccupation._ChildOccupations, listener);
}
}
public void visitTransients (AttributeVisitor visitor) throws StorageException
{
super.visitAttributes (visitor);
}
public void visitAttributes (AttributeVisitor visitor) throws StorageException
{
super.visitAttributes (visitor);
visitor.visitField(this, FIELD_Code, HELPER_Code.toObject(getCode()));
visitor.visitField(this, FIELD_Name, HELPER_Name.toObject(getName()));
visitor.visitField(this, FIELD_Level, HELPER_Level.toObject(getLevel()));
visitor.visitAssociation (_ParentOccupation);
visitor.visitAssociation (_ChildOccupations);
}
public void visitAssociations (AssociationVisitor visitor, AssociatedScope scope) throws StorageException
{
super.visitAssociations (visitor, scope);
if (scope.includes (_ParentOccupation))
{
visitor.visit (_ParentOccupation);
}
if (scope.includes (_ChildOccupations))
{
visitor.visit (_ChildOccupations);
}
}
public static Occupation createOccupation (ObjectTransaction transaction) throws StorageException
{
Occupation result = new Occupation ();
result.initialiseNewObject (transaction);
return result;
}
public static Occupation getOccupationByID (ObjectTransaction transaction, Long objectID) throws StorageException
{
return (Occupation)(transaction.getObjectByID (REFERENCE_Occupation, objectID));
}
public boolean testFilter (String attribName, QueryFilter filter) throws StorageException
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_Code))
{
return filter.matches (getCode ());
}
else if (attribName.equals (FIELD_Name))
{
return filter.matches (getName ());
}
else if (attribName.equals (FIELD_Level))
{
return filter.matches (getLevel ());
}
else if (attribName.equals (SINGLEREFERENCE_ParentOccupation))
{
return filter.matches (getParentOccupation ());
}
else
{
return super.testFilter (attribName, filter);
}
}
public static SearchAll SearchByAll () { return new SearchAll (); }
public static class SearchAll extends SearchObject<Occupation>
{
public SearchAll andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "tl_occupation.object_id", FIELD_ObjectID);
return this;
}
public SearchAll andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_occupation.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchAll andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_occupation.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchAll andCode (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_occupation.code", "Code");
return this;
}
public SearchAll andName (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_occupation.name", "Name");
return this;
}
public SearchAll andLevel (QueryFilter<OccupationLevel> filter)
{
filter.addFilter (context, "tl_occupation.level", "Level");
return this;
}
public SearchAll andParentOccupation (QueryFilter<Occupation> filter)
{
filter.addFilter (context, "tl_occupation.parent_occupation_id", "ParentOccupation");
return this;
}
public Occupation[]
search (ObjectTransaction transaction) throws StorageException
{
BaseBusinessClass[] results = super.search (transaction, REFERENCE_Occupation, SEARCH_All, criteria);
Set<Occupation> typedResults = new LinkedHashSet <Occupation> ();
for (BaseBusinessClass bbcResult : results)
{
Occupation aResult = (Occupation)bbcResult;
typedResults.add (aResult);
}
return ObjstoreUtils.removeDeleted(transaction, typedResults).toArray (new Occupation[0]);
}
}
public static Occupation[]
searchAll (ObjectTransaction transaction) throws StorageException
{
return SearchByAll ()
.search (transaction);
}
public Object getAttribute (String attribName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_Code))
{
return HELPER_Code.toObject (getCode ());
}
else if (attribName.equals (FIELD_Name))
{
return HELPER_Name.toObject (getName ());
}
else if (attribName.equals (FIELD_Level))
{
return HELPER_Level.toObject (getLevel ());
}
else
{
return super.getAttribute (attribName);
}
}
public AttributeHelper getAttributeHelper (String attribName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_Code))
{
return HELPER_Code;
}
else if (attribName.equals (FIELD_Name))
{
return HELPER_Name;
}
else if (attribName.equals (FIELD_Level))
{
return HELPER_Level;
}
else
{
return super.getAttributeHelper (attribName);
}
}
public void setAttribute (String attribName, Object attribValue) throws FieldException
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_Code))
{
setCode ((String)(HELPER_Code.fromObject (_Code, attribValue)));
}
else if (attribName.equals (FIELD_Name))
{
setName ((String)(HELPER_Name.fromObject (_Name, attribValue)));
}
else if (attribName.equals (FIELD_Level))
{
setLevel ((OccupationLevel)(HELPER_Level.fromObject (_Level, attribValue)));
}
else
{
super.setAttribute (attribName, attribValue);
}
}
public boolean isWriteable (String fieldName)
{
return getWriteable (fieldName) == FieldWriteability.TRUE;
}
public FieldWriteability getWriteable (String fieldName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (fieldName.equals (FIELD_Code))
{
return getWriteability_Code ();
}
else if (fieldName.equals (FIELD_Name))
{
return getWriteability_Name ();
}
else if (fieldName.equals (FIELD_Level))
{
return getWriteability_Level ();
}
else if (fieldName.equals (MULTIPLEREFERENCE_ChildOccupations))
{
return getWriteability_ChildOccupations ();
}
else if (fieldName.equals (SINGLEREFERENCE_ParentOccupation))
{
return getWriteability_ParentOccupation ();
}
else
{
return super.getWriteable (fieldName);
}
}
public void putUnwriteable (Set<String> fields)
{
if (getWriteability_Code () != FieldWriteability.TRUE)
{
fields.add (FIELD_Code);
}
if (getWriteability_Name () != FieldWriteability.TRUE)
{
fields.add (FIELD_Name);
}
if (getWriteability_Level () != FieldWriteability.TRUE)
{
fields.add (FIELD_Level);
}
super.putUnwriteable (fields);
}
public List<AbstractAttribute> getAttributes ()
{
List result = super.getAttributes ();
result.add(HELPER_Code.getAttribObject (getClass (), _Code, true, FIELD_Code));
result.add(HELPER_Name.getAttribObject (getClass (), _Name, true, FIELD_Name));
result.add(HELPER_Level.getAttribObject (getClass (), _Level, true, FIELD_Level));
return result;
}
public Map getAttributeMetadata (String attribute)
{
if (ATTRIBUTES_METADATA_Occupation.containsKey (attribute))
{
return (Map)ATTRIBUTES_METADATA_Occupation.get (attribute);
}
else
{
return super.getAttributeMetadata (attribute);
}
}
public Object getAttributeMetadata (String attribute, String metadata)
{
if (ATTRIBUTES_METADATA_Occupation.containsKey (attribute))
{
return ((Map)ATTRIBUTES_METADATA_Occupation.get (attribute)).get(metadata);
}
else
{
return super.getAttributeMetadata (attribute, metadata);
}
}
public void preCommit (boolean willBeStored) throws Exception
{
super.preCommit(willBeStored);
if(willBeStored)
{
}
}
public oneit.servlets.objstore.binary.BinaryContentHandler getBinaryContentHandler(String attribName)
{
return super.getBinaryContentHandler(attribName);
}
public static class OccupationBehaviourDecorator extends BaseBusinessClass.BBCBehaviourDecorator<Occupation>
{
/**
* Get the attribute Code
*/
public String getCode (Occupation obj, String original)
{
return original;
}
/**
* Change the value set for attribute Code.
* May modify the field beforehand
* Occurs before validation.
*/
public String setCode (Occupation obj, String newCode) throws FieldException
{
return newCode;
}
/**
* Get the attribute Name
*/
public String getName (Occupation obj, String original)
{
return original;
}
/**
* Change the value set for attribute Name.
* May modify the field beforehand
* Occurs before validation.
*/
public String setName (Occupation obj, String newName) throws FieldException
{
return newName;
}
/**
* Get the attribute Level
*/
public OccupationLevel getLevel (Occupation obj, OccupationLevel original)
{
return original;
}
/**
* Change the value set for attribute Level.
* May modify the field beforehand
* Occurs before validation.
*/
public OccupationLevel setLevel (Occupation obj, OccupationLevel newLevel) throws FieldException
{
return newLevel;
}
}
public ORMPipeLine pipes()
{
return new OccupationPipeLineFactory<Occupation, Occupation> ((Occupation)this);
}
/**
* Use this instead of pipes() to get rid of type casting.
*/
public OccupationPipeLineFactory<Occupation, Occupation> pipelineOccupation()
{
return (OccupationPipeLineFactory<Occupation, Occupation>) pipes();
}
public static OccupationPipeLineFactory<Occupation, Occupation> pipesOccupation(Collection<Occupation> items)
{
return REFERENCE_Occupation.new OccupationPipeLineFactory<Occupation, Occupation> (items);
}
public static OccupationPipeLineFactory<Occupation, Occupation> pipesOccupation(Occupation[] _items)
{
return pipesOccupation(Arrays.asList (_items));
}
public static OccupationPipeLineFactory<Occupation, Occupation> pipesOccupation()
{
return pipesOccupation((Collection)null);
}
public class OccupationPipeLineFactory<From extends BaseBusinessClass, Me extends Occupation> extends BaseBusinessClass.ORMPipeLine<From, Me>
{
public <Prev> OccupationPipeLineFactory (PipeLine<From, Prev> pipeLine, Pipe<Prev, Me> nextPipe)
{
super (pipeLine, nextPipe);
}
public OccupationPipeLineFactory (From seed)
{
super(seed);
}
public OccupationPipeLineFactory (Collection<From> seed)
{
super(seed);
}
public PipeLine<From, ? extends Object> to(String name)
{
if (name.equals ("ChildOccupations"))
{
return toChildOccupations ();
}
if (name.equals ("Code"))
{
return toCode ();
}
if (name.equals ("Name"))
{
return toName ();
}
if (name.equals ("Level"))
{
return toLevel ();
}
if (name.equals ("ParentOccupation"))
{
return toParentOccupation ();
}
return super.to(name);
}
public PipeLine<From, String> toCode () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Code)); }
public PipeLine<From, String> toName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Name)); }
public PipeLine<From, OccupationLevel> toLevel () { return pipe(new ORMAttributePipe<Me, OccupationLevel>(FIELD_Level)); }
public Occupation.OccupationPipeLineFactory<From, Occupation> toParentOccupation () { return toParentOccupation (Filter.ALL); }
public Occupation.OccupationPipeLineFactory<From, Occupation> toParentOccupation (Filter<Occupation> filter)
{
return Occupation.REFERENCE_Occupation.new OccupationPipeLineFactory<From, Occupation> (this, new ORMSingleAssocPipe<Me, Occupation>(SINGLEREFERENCE_ParentOccupation, filter));
}
public Occupation.OccupationPipeLineFactory<From, Occupation> toChildOccupations () { return toChildOccupations(Filter.ALL); }
public Occupation.OccupationPipeLineFactory<From, Occupation> toChildOccupations (Filter<Occupation> filter)
{
return Occupation.REFERENCE_Occupation.new OccupationPipeLineFactory<From, Occupation> (this, new ORMMultiAssocPipe<Me, Occupation>(MULTIPLEREFERENCE_ChildOccupations, filter));
}
}
public boolean isTransientAttrib(String attribName)
{
return super.isTransientAttrib(attribName);
}
public boolean isTransientSingleReference(String assocName)
{
return super.isTransientSingleReference(assocName);
}
}
class DummyOccupation extends Occupation
{
// Default constructor primarily to support Externalisable
public DummyOccupation()
{
super();
}
public void assertValid ()
{
}
public Occupation getParentOccupation () throws StorageException
{
return (Occupation)(Occupation.DUMMY_Occupation);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getParentOccupationID ()
{
return Occupation.DUMMY_Occupation.getObjectID();
}
public int getChildOccupationsCount () throws StorageException
{
return 0;
}
public Occupation getChildOccupationsAt (int index) throws StorageException
{
throw new RuntimeException ("No elements in a dummy object in association ChildOccupations");
}
public SortedSet getChildOccupationsSet () throws StorageException
{
return new TreeSet();
}
}
package performa.orm;
import java.io.*;
import java.util.*;
import oneit.appservices.config.*;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.utils.*;
import performa.orm.types.*;
public class Occupation extends BaseOccupation
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public Occupation ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
}
<?xml version="1.0"?>
<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>
<BUSINESSCLASS name="Occupation" package="performa.orm">
<IMPORT value="performa.orm.types.*" />
<MULTIPLEREFERENCE name="ChildOccupations" type="Occupation" backreferenceName="ParentOccupation" />
<TABLE name="tl_occupation" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Code" type="String" dbcol="code" length="4" mandatory="true" isUnique="true"/>
<ATTRIB name="Name" type="String" dbcol="name" length="250" mandatory="true"/>
<ATTRIB name="Level" type="OccupationLevel" dbcol="level" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<SINGLEREFERENCE name="ParentOccupation" type="Occupation" dbcol="parent_occupation_id" backreferenceName="ChildOccupations"/>
</TABLE>
<SEARCH type="All" paramFilter="object_id is not null" orderBy="object_id"/>
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
package performa.orm;
import java.io.*;
import java.util.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.rdbms.*;
import oneit.objstore.utils.*;
import oneit.sql.*;
import oneit.utils.resource.*;
import oneit.utils.*;
import oneit.utils.threading.*;
import performa.orm.types.*;
/**
* IMPORTANT!!!! Autogenerated class, DO NOT EDIT!!!!!
* Template: Infrastructure8.2[oneit.objstore.PersistenceMgrTemplate.xsl]
*/
public class OccupationPersistenceMgr extends ObjectPersistenceMgr
{
private static final LoggingArea OccupationPersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "Occupation");
// Private attributes corresponding to business object data
private String dummyCode;
private String dummyName;
private OccupationLevel dummyLevel;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_Code = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_Name = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_Level = new EnumeratedAttributeHelper (OccupationLevel.FACTORY_OccupationLevel);
public OccupationPersistenceMgr ()
{
dummyCode = (String)(HELPER_Code.initialise (dummyCode));
dummyName = (String)(HELPER_Name.initialise (dummyName));
dummyLevel = (OccupationLevel)(HELPER_Level.initialise (dummyLevel));
}
private String SELECT_COLUMNS = "{PREFIX}tl_occupation.object_id as id, {PREFIX}tl_occupation.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_occupation.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_occupation.code, {PREFIX}tl_occupation.name, {PREFIX}tl_occupation.level, {PREFIX}tl_occupation.parent_occupation_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> resultByIDs = fetchByIDs(Collections.singleton (id), allPSets, context, sqlMgr);
if (resultByIDs.isEmpty ())
{
return null;
}
else if (resultByIDs.size () > 1)
{
throw new StorageException ("Multiple results for id:" + id);
}
else
{
return resultByIDs.iterator ().next ();
}
}
public Set<BaseBusinessClass> fetchByIDs(Set<ObjectID> ids, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> results = new HashSet ();
Set<Long> idsToFetch = new HashSet ();
for (ObjectID id : ids)
{
if (context.containsObject(id)) // Check for cached version
{
BaseBusinessClass objectToReturn = context.getObjectToReplace(id, Occupation.REFERENCE_Occupation);
if (objectToReturn instanceof Occupation)
{
LogMgr.log (OccupationPersistence, LogLevel.TRACE, "Cache hit for id:", id);
results.add (objectToReturn);
}
else
{
throw new StorageException ("Cache collision for id:" + id + " with object " + objectToReturn + "while fetching a Occupation");
}
}
PersistentSet tl_occupationPSet = allPSets.getPersistentSet(id, "tl_occupation", PersistentSetStatus.FETCHED);
// Check for persistent sets already prefetched
if (false || !tl_occupationPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Code)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Name)||
!tl_occupationPSet.containsAttrib(Occupation.FIELD_Level)||
!tl_occupationPSet.containsAttrib(Occupation.SINGLEREFERENCE_ParentOccupation))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
}
else
{
LogMgr.log (OccupationPersistence, LogLevel.DEBUG2, "Persistent set preloaded id:", id);
/* Non Polymorphic */
Occupation result = new Occupation ();
result.setFromPersistentSets(id, allPSets);
context.addRetrievedObject(result);
results.add (result);
}
}
if (idsToFetch.size () > 0)
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_occupation " +
"WHERE " + SELECT_JOINS + "{PREFIX}tl_occupation.object_id IN ?";
BaseBusinessClass[] resultsFetched = loadQuery (allPSets, sqlMgr, context, query, new Object[] { idsToFetch }, null, false);
for (BaseBusinessClass objFetched : resultsFetched)
{
results.add (objFetched);
}
}
return results;
}
public BaseBusinessClass[] getReferencedObjects(ObjectID _objectID, String refName, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
if (false)
{
throw new RuntimeException ();
}
else if (refName.equals (Occupation.SINGLEREFERENCE_ParentOccupation))
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_occupation " +
"WHERE " + SELECT_JOINS + "parent_occupation_id = ?";
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, new Object[] { _objectID.longID () }, null, false);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal reference type:" + refName);
}
}
public void update(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
EqualityResult test = EqualityResult.compare (obj, obj.getBackup ());
ObjectID objectID = obj.getID ();
if (!test.areAttributesEqual () || !test.areSingleAssocsEqual () || obj.getForcedSave())
{
PersistentSet tl_occupationPSet = allPSets.getPersistentSet(objectID, "tl_occupation");
if (tl_occupationPSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_occupationPSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_occupation " +
"SET code = ?, name = ?, level = ?, parent_occupation_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_occupation.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))).listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id, object_LAST_UPDATED_DATE FROM {PREFIX}tl_occupation WHERE object_id = ?",
new Object[] { objectID.longID () });
if (r.next ())
{
Date d = new java.util.Date (r.getTimestamp (2).getTime());
String errorMsg = QueryBuilder.buildQueryString ("Concurrent update error:[?] for row:[?] objDate:[?] dbDate:[?]",
new Object[] { "tl_occupation", objectID.longID (), obj.getObjectLastModified (), d },
sqlMgr.getPortabilityServices ());
LogMgr.log (OccupationPersistence, LogLevel.BUSINESS1, errorMsg);
throw new ConcurrentUpdateConflictException (obj, "tl_occupation");
}
else
{
String errorMsg = "Attempt to update nonexistent row in table:tl_occupation for row:" + objectID + " objDate:" + obj.getObjectLastModified ();
LogMgr.log (OccupationPersistence, LogLevel.BUSINESS1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_occupationPSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
else
{
LogMgr.log (OccupationPersistence, LogLevel.DEBUG1, "Skipping update since no attribs or simple assocs changed on ", objectID);
}
}
public void delete(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_occupationPSet = allPSets.getPersistentSet(objectID, "tl_occupation");
LogMgr.log (OccupationPersistence, LogLevel.DEBUG2, "Deleting:", objectID);
if (tl_occupationPSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_occupationPSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsDeleted = executeStatement (sqlMgr,
"DELETE " +
"FROM {PREFIX}tl_occupation " +
"WHERE tl_occupation.object_id = ? AND " + sqlMgr.getPortabilityServices ().getTruncatedTimestampColumn ("object_LAST_UPDATED_DATE") + " = " + sqlMgr.getPortabilityServices ().getTruncatedTimestampParam("?") + " ",
new Object[] { objectID.longID(), obj.getObjectLastModified () });
if (rowsDeleted != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id FROM {PREFIX}tl_occupation WHERE object_id = ?",
new Object[] { objectID.longID() });
if (r.next ())
{
throw new ConcurrentUpdateConflictException (obj, "tl_occupation");
}
else
{
String errorMsg = "Attempt to delete nonexistent row in table:tl_occupation for row:" + objectID;
LogMgr.log (OccupationPersistence, LogLevel.SYSTEMERROR1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_occupationPSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
public ResultSet executeSearchQueryAll (SQLManager sqlMgr) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryAll");
}
public BaseBusinessClass[] loadQuery (PersistentSetCollection allPSets, SQLManager sqlMgr, RDBMSPersistenceContext context, String query, Object[] params, Integer maxRows, boolean truncateExtra) throws SQLException, StorageException
{
LinkedHashMap<ObjectID, Occupation> results = new LinkedHashMap ();
ResultSet r = executeQuery (sqlMgr, query, params);
while (r.next())
{
ThreadUtils.checkInterrupted ();
ObjectID objectID = new ObjectID (Occupation.REFERENCE_Occupation.getObjectIDSpace (), r.getLong ("id"));
Occupation resultElement;
if (maxRows != null && !results.containsKey (objectID) && results.size () >= maxRows)
{
if (truncateExtra)
{
break;
}
else
{
throw new SearchRowsExceededException ("Maximum rows exceeded:" + maxRows);
}
}
if (context.containsObject(objectID))
{
BaseBusinessClass cachedElement = context.getObjectToReplace(objectID, Occupation.REFERENCE_Occupation);
if (cachedElement instanceof Occupation)
{
LogMgr.log (OccupationPersistence, LogLevel.TRACE, "Cache hit for id:", objectID);
resultElement = (Occupation)cachedElement;
}
else
{
throw new StorageException ("Cache collision for id:" + objectID + " with object " + cachedElement + "while fetching a Occupation");
}
}
else
{
PersistentSet tl_occupationPSet = allPSets.getPersistentSet(objectID, "tl_occupation", PersistentSetStatus.FETCHED);
createPersistentSetFromRS(allPSets, r, objectID);
resultElement = new Occupation ();
resultElement.setFromPersistentSets(objectID, allPSets);
context.addRetrievedObject(resultElement);
}
results.put (objectID, resultElement);
}
BaseBusinessClass[] resultsArr = new BaseBusinessClass[results.size ()];
return results.values ().toArray (resultsArr);
}
public BaseBusinessClass[] find(String searchType, PersistentSetCollection allPSets, Hashtable criteria, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
LogMgr.log (OccupationPersistence, LogLevel.DEBUG2, "Search executing:", searchType, " criteria:", criteria);
String customParamFilter = (String)criteria.get (SEARCH_CustomFilter);
String customOrderBy = (String)criteria.get (SEARCH_OrderBy);
String customTables = (String)criteria.get (SEARCH_CustomExtraTables);
Boolean noCommaBeforeCustomExtraTables = (Boolean)criteria.get (SEARCH_CustomExtraTablesNoComma);
if (searchType.equals (SEARCH_CustomSQL))
{
Set<ObjectID> processedIDs = new HashSet();
SearchParamTransform tx = new SearchParamTransform (criteria);
Object[] searchParams;
customParamFilter = StringUtils.replaceParams (customParamFilter, tx);
searchParams = tx.getParamsArray();
if (customOrderBy != null)
{
customOrderBy = " ORDER BY " + customOrderBy;
}
else
{
customOrderBy = "";
}
ResultSet r;
String concatCustomTableWith = CollectionUtils.equals(noCommaBeforeCustomExtraTables, true) ? " " : ", ";
String tables = StringUtils.subBlanks(customTables) == null ? " " : concatCustomTableWith + customTables + " ";
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_occupation " + tables +
"WHERE " + SELECT_JOINS + " " + customParamFilter + customOrderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, null, false);
return results;
}
else if (searchType.equals (Occupation.SEARCH_All))
{
// Local scope for transformed variables
{
}
String orderBy = " ORDER BY object_id";
String tables = " ";
Set<String> joinTableSet = new HashSet<String>();
String filter;
Object[] searchParams; // paramFilter: object_id is not null
String preFilter = "(object_id is not null)"
+ " ";
preFilter += context.getLoadingAttributes ().getCustomSQL() ;
SearchParamTransform tx = new SearchParamTransform (criteria);
filter = StringUtils.replaceParams (preFilter, tx);
searchParams = tx.getParamsArray();
Integer maxRows = context.getLoadingAttributes ().getMaxRows ();
boolean truncateExtra = !context.getLoadingAttributes ().isFailIfMaxExceeded();
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_occupation " + tables + tableSetToSQL(joinTableSet) +
"WHERE " + SELECT_JOINS + " " + filter + orderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, maxRows, truncateExtra);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal search type:" + searchType);
}
}
private void createPersistentSetFromRS(PersistentSetCollection allPSets, ResultSet r, ObjectID objectID) throws SQLException
{
PersistentSet tl_occupationPSet = allPSets.getPersistentSet(objectID, "tl_occupation", PersistentSetStatus.FETCHED);
// Object Modified
tl_occupationPSet.setAttrib(BaseBusinessClass.FIELD_ObjectLastModified, r.getTimestamp ("LAST_UPDATED_DATE"));
// Object Created
tl_occupationPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_occupationPSet.setAttrib(Occupation.FIELD_Code, HELPER_Code.getFromRS(dummyCode, r, "code"));
tl_occupationPSet.setAttrib(Occupation.FIELD_Name, HELPER_Name.getFromRS(dummyName, r, "name"));
tl_occupationPSet.setAttrib(Occupation.FIELD_Level, HELPER_Level.getFromRS(dummyLevel, r, "level"));
tl_occupationPSet.setAttrib(Occupation.SINGLEREFERENCE_ParentOccupation, r.getObject ("parent_occupation_id"));
}
public void create(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_occupationPSet = allPSets.getPersistentSet(objectID, "tl_occupation");
if (tl_occupationPSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_occupationPSet.getStatus () != PersistentSetStatus.DEFERRED)
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_occupation " +
" (code, name, level, parent_occupation_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_occupationPSet.getAttrib (Occupation.FIELD_Code))).listEntry (HELPER_Name.getForSQL(dummyName, tl_occupationPSet.getAttrib (Occupation.FIELD_Name))).listEntry (HELPER_Level.getForSQL(dummyLevel, tl_occupationPSet.getAttrib (Occupation.FIELD_Level))) .listEntry (SQLManager.CheckNull((Long)(tl_occupationPSet.getAttrib (Occupation.SINGLEREFERENCE_ParentOccupation)))) .listEntry (objectID.longID ()).toList().toArray());
tl_occupationPSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
}
package performa.orm.types;
import java.util.*;
import oneit.utils.*;
/**
* This class was generated using constGen.bat.
* DO NOT MODIFY THIS CODE.
* Edit the associated .xml file, and regenerate this file
* constGen (directory) (file minus extension)
* e.g. constGen C:\...\sql FieldType
*/
public class OccupationLevel extends AbstractEnumerated
{
public static final EnumeratedFactory FACTORY_OccupationLevel = new OccupationLevelFactory();
public static final OccupationLevel LEVEL_1 = new OccupationLevel ("LEVEL_1", "LEVEL_1", "Level 1", false);
public static final OccupationLevel LEVEL_2 = new OccupationLevel ("LEVEL_2", "LEVEL_2", "Level 2", false);
public static final OccupationLevel LEVEL_3 = new OccupationLevel ("LEVEL_3", "LEVEL_3", "Level 3", false);
public static final OccupationLevel LEVEL_4 = new OccupationLevel ("LEVEL_4", "LEVEL_4", "Level 4", false);
private static final OccupationLevel[] allOccupationLevels =
new OccupationLevel[] { LEVEL_1,LEVEL_2,LEVEL_3,LEVEL_4};
private static OccupationLevel[] getAllOccupationLevels ()
{
return allOccupationLevels;
}
private OccupationLevel (String name, String value, String description, boolean disabled)
{
super (name, value, description, disabled);
}
public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allOccupationLevels);
static
{
defineAdditionalData ();
}
public boolean isEqual (OccupationLevel other)
{
return this.name.equals (other.name);
}
public Enumeration getAllInstances ()
{
return OccupationLevel.getAll ();
}
private Object readResolve() throws java.io.ObjectStreamException
{
return OccupationLevel.forName (this.name);
}
public EnumeratedFactory getFactory ()
{
return FACTORY_OccupationLevel;
}
public static OccupationLevel forName (String name)
{
if (name == null) { return null; }
OccupationLevel[] all = getAllOccupationLevels();
int enumIndex = AbstractEnumerated.getIndexForName (all, name);
return all[enumIndex];
}
public static OccupationLevel forValue (String value)
{
if (value == null) { return null; }
OccupationLevel[] all = getAllOccupationLevels();
int enumIndex = AbstractEnumerated.getIndexForValue (getAllOccupationLevels (), value);
return all[enumIndex];
}
public static java.util.Enumeration getAll ()
{
return AbstractEnumerated.getAll (getAllOccupationLevels());
}
public static OccupationLevel[] getOccupationLevelArray ()
{
return (OccupationLevel[])getAllOccupationLevels().clone ();
}
public static void defineAdditionalData ()
{
}
static class OccupationLevelFactory implements EnumeratedFactory
{
public AbstractEnumerated getForName (String name)
{
return OccupationLevel.forName (name);
}
public AbstractEnumerated getForValue (String name)
{
return OccupationLevel.forValue (name);
}
public Enumeration getAll ()
{
return OccupationLevel.getAll ();
}
}
public Map getAdditionalAttributes ()
{
Map attribs = new HashMap ();
return attribs;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<CONSTANT name="OccupationLevel" package="performa.orm.types">
<VALUE name="LEVEL_1" description="Level 1" />
<VALUE name="LEVEL_2" description="Level 2" />
<VALUE name="LEVEL_3" description="Level 3" />
<VALUE name="LEVEL_4" description="Level 4" />
</CONSTANT>
</ROOT>
\ No newline at end of file
...@@ -112,31 +112,6 @@ ...@@ -112,31 +112,6 @@
<div class="d-job-title all-jobs-title"> <div class="d-job-title all-jobs-title">
<%= jobStatus == null ? "All" : jobStatus.getDescription() %> Jobs <%= jobStatus == null ? "All" : jobStatus.getDescription() %> Jobs
</div> </div>
<%-- <div class="job-filter">
<ul class="">
<li class="lable-job-shorting">showing</li>
<li class="<%= (jobStatus == null ? "active" : "" )%>">
<oneit:button value="All Jobs" name="navigateBetweenStatus" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", homePage)
.mapEntry("JobStatus", null)
.toMap() %>"/>
</li>
<%
for (JobStatus status : Utils.getJobStatusesForClient())
{
%>
<li class="<%= (jobStatus != null && jobStatus == status ? "active" : "" )%>">
<oneit:button value="<%= status.getDescription() %>" name="navigateBetweenStatus" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", homePage )
.mapEntry("JobStatus", status)
.toMap() %>"/>
</li>
<%
}
%>
</ul>
</div>
--%>
<% <%
if(jobs.length > 1) if(jobs.length > 1)
{ {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<NODE name="Script" factory="Vector"> <NODE name="Script" factory="Vector">
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation" <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"
query="select distinct(tl_company.*) from tl_company, tl_hiring_team where tl_hiring_team.company_id != tl_company.object_id AND tl_company.object_id = 37986758"> query="select distinct(tl_company.*) from tl_company, tl_hiring_team where tl_hiring_team.company_id != tl_company.object_id">
<tableName factory="String">tl_hiring_team</tableName> <tableName factory="String">tl_hiring_team</tableName>
<value name='object_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID"/> <value name='object_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID"/>
<value name='object_last_updated_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/> <value name='object_last_updated_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_occupation</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="code" type="String" nullable="false" length="4"/>
<column name="name" type="String" nullable="false" length="250"/>
<column name="level" type="String" nullable="false" length="200"/>
<column name="parent_occupation_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_occupation" indexName="idx_tl_occupation_parent_occupation_id" isUnique="false">
<column name="parent_occupation_id"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0"?>
<!-- @AutoRun -->
<OBJECTS name="">
<NODE name="Script" factory="Vector">
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation'>
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>1</value>
<value name='name' factory='String'>Managers</value>
<value name='level' factory='String'>LEVEL_1</value>
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation'>
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>2</value>
<value name='name' factory='String'>Professionals</value>
<value name='level' factory='String'>LEVEL_1</value>
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation'>
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>3</value>
<value name='name' factory='String'>Technicians and Associate Professionals</value>
<value name='level' factory='String'>LEVEL_1</value>
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation'>
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>4</value>
<value name='name' factory='String'>Clerical Support Workers</value>
<value name='level' factory='String'>LEVEL_1</value>
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation'>
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>5</value>
<value name='name' factory='String'>Services And Sales Workers</value>
<value name='level' factory='String'>LEVEL_1</value>
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation'>
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>6</value>
<value name='name' factory='String'>Skilled Agricultural, Forestry and Fishery Workers</value>
<value name='level' factory='String'>LEVEL_1</value>
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation'>
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>7</value>
<value name='name' factory='String'>Craft and Related Trades Workers</value>
<value name='level' factory='String'>LEVEL_1</value>
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation'>
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>8</value>
<value name='name' factory='String'>Plant and Machine Operators and Assemblers</value>
<value name='level' factory='String'>LEVEL_1</value>
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation'>
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>9</value>
<value name='name' factory='String'>Elementary Occupations</value>
<value name='level' factory='String'>LEVEL_1</value>
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation'>
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>0</value>
<value name='name' factory='String'>Armed Forces Occupations</value>
<value name='level' factory='String'>LEVEL_1</value>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0"?>
<!-- @AutoRun -->
<OBJECTS name="">
<NODE name="Script" factory="Vector">
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='1'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>11</value>
<value name='name' factory='String'>Chief Executives, Senior Officials and Legislators</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='1'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>12</value>
<value name='name' factory='String'>Administrative and Commercial Managers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='1'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>13</value>
<value name='name' factory='String'>Production and Specialized Services Managers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='1'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>14</value>
<value name='name' factory='String'>Hospitality, Retail and Other Services Managers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='2'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>21</value>
<value name='name' factory='String'>Science and Engineering Professionals</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='2'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>22</value>
<value name='name' factory='String'>Health Professionals</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='2'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>23</value>
<value name='name' factory='String'>Teaching Professionals</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='2'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>24</value>
<value name='name' factory='String'>Business and Administration Professionals</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='2'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>25</value>
<value name='name' factory='String'>Information and Communications Technology Professionals</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='2'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>26</value>
<value name='name' factory='String'>Legal, Social and Cultural Professionals</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='3'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>31</value>
<value name='name' factory='String'>Science and Engineering Associate Professionals</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='3'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>32</value>
<value name='name' factory='String'>Health Associate Professionals</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='3'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>33</value>
<value name='name' factory='String'>Business and Administration Associate Professionals</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='3'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>34</value>
<value name='name' factory='String'>Legal, Social, Cultural and Related Associate Professionals</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='3'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>35</value>
<value name='name' factory='String'>Information and Communications Technicians</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='4'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>41</value>
<value name='name' factory='String'>General and Keyboard Clerks</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='4'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>42</value>
<value name='name' factory='String'>Customer Services Clerks</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='4'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>43</value>
<value name='name' factory='String'>Numerical and Material Recording Clerks</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='4'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>44</value>
<value name='name' factory='String'>Other Clerical Support Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='5'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>51</value>
<value name='name' factory='String'>Personal Services Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='5'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>52</value>
<value name='name' factory='String'>Sales Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='5'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>53</value>
<value name='name' factory='String'>Personal Care Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='5'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>54</value>
<value name='name' factory='String'>Protective Services Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='6'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>61</value>
<value name='name' factory='String'>Market-oriented Skilled Agricultural Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='6'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>62</value>
<value name='name' factory='String'>Market-oriented Skilled Forestry, Fishery and Hunting Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='6'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>63</value>
<value name='name' factory='String'>Subsistence Farmers, Fishers, Hunters and Gatherers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='7'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>71</value>
<value name='name' factory='String'>Building and Related Trades Workers (excluding Electricians)</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='7'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>72</value>
<value name='name' factory='String'>Metal, Machinery and Related Trades Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='7'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>73</value>
<value name='name' factory='String'>Handicraft and Printing Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='7'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>74</value>
<value name='name' factory='String'>Electrical and Electronics Trades Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='7'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>75</value>
<value name='name' factory='String'>Food Processing, Woodworking, Garment and Other Craft and Related Trades Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='8'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>81</value>
<value name='name' factory='String'>Stationary Plant and Machine Operators</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='8'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>82</value>
<value name='name' factory='String'>Assemblers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='8'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>83</value>
<value name='name' factory='String'>Drivers and Mobile Plant Operators</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='9'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>91</value>
<value name='name' factory='String'>Cleaners and Helpers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='9'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>92</value>
<value name='name' factory='String'>Agricultural, Forestry and Fishery Labourers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='9'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>93</value>
<value name='name' factory='String'>Labourers in Mining, Construction, Manufacturing and Transport</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='9'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>94</value>
<value name='name' factory='String'>Food Preparation Assistants</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='9'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>95</value>
<value name='name' factory='String'>Street and Related Sales and Services Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='9'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>96</value>
<value name='name' factory='String'>Refuse Workers and Other Elementary Workers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='0'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>01</value>
<value name='name' factory='String'>Commissioned Armed Forces Officers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='0'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>02</value>
<value name='name' factory='String'>Non-commissioned Armed Forces Officers</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation' query="select object_id from tl_occupation where code='0'">
<tableName factory='String'>tl_occupation</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='code' factory='String'>03</value>
<value name='name' factory='String'>Armed Forces Occupations, Other Ranks</value>
<value name='level' factory='String'>LEVEL_2</value>
<value name='parent_occupation_id' factory='Participant' class='oneit.sql.transfer.InsertOperation$QueryColumn' column='object_id' />
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment