Commit 288caf8d by Nilu

Merge remote-tracking branch 'origin/develop' into feature/Feature-0.0.4.2

parents c943d9a0 19607e6d
......@@ -19,6 +19,8 @@
<column name="post_code" type="String" nullable="true" length="10"/>
<column name="city" type="String" nullable="true" length="100"/>
<column name="has_client_support" type="Boolean" nullable="true"/>
<column name="stripe_reference" type="String" nullable="true" length="100"/>
<column name="stripe_subscription" type="String" nullable="true" length="100"/>
<column name="added_by_user_id" type="Long" length="11" nullable="false"/>
</NODE>
......
......@@ -12,6 +12,7 @@
<column name="forgot_password_mail_send_date" type="Date" nullable="true"/>
<column name="forgot_password_key" type="String" nullable="true" length="10"/>
<column name="role_type" type="String" nullable="true" length="200"/>
<column name="roles" type="String" nullable="true" length="200"/>
<column name="phone" type="String" nullable="true" length="30"/>
<column name="verification_mail_send_date" type="Date" nullable="true"/>
<column name="verification_key" type="String" nullable="true" length="10"/>
......
......@@ -11,6 +11,9 @@
<column name="level_desc" type="String" nullable="true" length="30"/>
<column name="level_notes" type="CLOB" nullable="true"/>
<column name="rpt_hdr" type="CLOB" nullable="true"/>
<column name="applied_to_express" type="Boolean" nullable="true"/>
<column name="css_class" type="String" nullable="true" length="100"/>
<column name="enabled" type="Boolean" nullable="true"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -8,7 +8,7 @@
<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="weighting" type="String" nullable="false" length="200"/>
<column name="weighting" type="String" nullable="true" length="200"/>
<column name="class_code" type="String" nullable="false" length="200"/>
<column name="level_number" type="Long" length="11" nullable="true"/>
</NODE>
......
......@@ -10,6 +10,8 @@
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="description" type="String" nullable="true" length="80"/>
<column name="is_right_quest" type="Boolean" nullable="true"/>
<column name="is_express_question" type="Boolean" nullable="true"/>
<column name="inner_sort_order" type="Long" nullable="true"/>
<column name="section_number" type="Long" length="11" nullable="true"/>
<column name="right_quest_number" type="Long" length="11" nullable="true"/>
<column name="high_low_factor_id" type="Long" length="11" nullable="true"/>
......
......@@ -19,6 +19,8 @@ CREATE TABLE tl_company (
post_code varchar(10) NULL,
city varchar(100) NULL,
has_client_support char(1) NULL,
stripe_reference varchar(100) NULL,
stripe_subscription varchar(100) NULL,
added_by_user_id numeric(12) NOT NULL
);
......
......@@ -11,6 +11,7 @@ CREATE TABLE oneit_sec_user_extension (
forgot_password_mail_send_date datetime NULL,
forgot_password_key varchar(10) NULL,
role_type varchar(200) NULL,
roles varchar(200) NULL,
phone varchar(30) NULL,
verification_mail_send_date datetime NULL,
verification_key varchar(10) NULL,
......
......@@ -10,7 +10,10 @@ CREATE TABLE tl_level (
,
level_desc varchar(30) NULL,
level_notes text NULL,
rpt_hdr text NULL
rpt_hdr text NULL,
applied_to_express char(1) NULL,
css_class varchar(100) NULL,
enabled char(1) NULL
);
......
......@@ -8,7 +8,7 @@ CREATE TABLE tl_level_class_criteria (
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
weighting varchar(200) NOT NULL,
weighting varchar(200) NULL,
class_code varchar(200) NOT NULL,
level_number numeric(12) NULL
);
......
......@@ -10,6 +10,8 @@ CREATE TABLE tl_quest_lin (
,
description varchar(80) NULL,
is_right_quest char(1) NULL,
is_express_question char(1) NULL,
inner_sort_order numeric(12) NULL,
section_number numeric(12) NULL,
right_quest_number numeric(12) NULL,
high_low_factor_id numeric(12) NULL
......
......@@ -20,6 +20,8 @@ CREATE TABLE tl_company (
post_code varchar2(10) NULL,
city varchar2(100) NULL,
has_client_support char(1) NULL,
stripe_reference varchar2(100) NULL,
stripe_subscription varchar2(100) NULL,
added_by_user_id number(12) NOT NULL
);
......
......@@ -12,6 +12,7 @@ CREATE TABLE oneit_sec_user_extension (
forgot_password_mail_send_date date NULL,
forgot_password_key varchar2(10) NULL,
role_type varchar2(200) NULL,
roles varchar2(200) NULL,
phone varchar2(30) NULL,
verification_mail_send_date date NULL,
verification_key varchar2(10) NULL,
......
......@@ -11,7 +11,10 @@ CREATE TABLE tl_level (
,
level_desc varchar2(30) NULL,
level_notes clob NULL,
rpt_hdr clob NULL
rpt_hdr clob NULL,
applied_to_express char(1) NULL,
css_class varchar2(100) NULL,
enabled char(1) NULL
);
......
......@@ -9,7 +9,7 @@ CREATE TABLE tl_level_class_criteria (
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
weighting varchar2(200) NOT NULL,
weighting varchar2(200) NULL,
class_code varchar2(200) NOT NULL,
level_number number(12) NULL
);
......
......@@ -11,6 +11,8 @@ CREATE TABLE tl_quest_lin (
,
description varchar2(80) NULL,
is_right_quest char(1) NULL,
is_express_question char(1) NULL,
inner_sort_order number(12) NULL,
section_number number(12) NULL,
right_quest_number number(12) NULL,
high_low_factor_id number(12) NULL
......
......@@ -20,6 +20,8 @@ CREATE TABLE tl_company (
post_code varchar(10) NULL,
city varchar(100) NULL,
has_client_support char(1) NULL,
stripe_reference varchar(100) NULL,
stripe_subscription varchar(100) NULL,
added_by_user_id numeric(12) NOT NULL
);
......
......@@ -12,6 +12,7 @@ CREATE TABLE oneit_sec_user_extension (
forgot_password_mail_send_date timestamp NULL,
forgot_password_key varchar(10) NULL,
role_type varchar(200) NULL,
roles varchar(200) NULL,
phone varchar(30) NULL,
verification_mail_send_date timestamp NULL,
verification_key varchar(10) NULL,
......
......@@ -11,7 +11,10 @@ CREATE TABLE tl_level (
,
level_desc varchar(30) NULL,
level_notes text NULL,
rpt_hdr text NULL
rpt_hdr text NULL,
applied_to_express char(1) NULL,
css_class varchar(100) NULL,
enabled char(1) NULL
);
......
......@@ -9,7 +9,7 @@ CREATE TABLE tl_level_class_criteria (
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
weighting varchar(200) NOT NULL,
weighting varchar(200) NULL,
class_code varchar(200) NOT NULL,
level_number numeric(12) NULL
);
......
......@@ -11,6 +11,8 @@ CREATE TABLE tl_quest_lin (
,
description varchar(80) NULL,
is_right_quest char(1) NULL,
is_express_question char(1) NULL,
inner_sort_order numeric(12) NULL,
section_number numeric(12) NULL,
right_quest_number numeric(12) NULL,
high_low_factor_id numeric(12) NULL
......
......@@ -24,16 +24,15 @@ public class CompleteApplicationFP extends SaveFP
HttpServletRequest request = submission.getRequest();
ObjectTransaction objTran = ObjectTransaction.getTransaction();
JobApplication jobApplication = (JobApplication) process.getAttribute("JobApplication");
jobApplication = (JobApplication) jobApplication.getInTransaction (objTran);
jobApplication.setApplicationStatus(ApplicationStatus.SUBMITTED);
jobApplication.setSubmittedDate(new Date());
AnalysisEngine.analyseAnswers(jobApplication.getCandidate(), jobApplication.getJob().getLevel(), jobApplication.getCompletedAnswers());
AnalysisEngine.analyseAnswers(jobApplication.getCandidate(), jobApplication.getJob().getLevel(), jobApplication.getCompletedAnswers()); //getCompletedAnswers() returns collection now
//TODO: set application status as UNSUITABLE if not scored
if(false)
if(jobApplication.hasFailedEssentialRequirements())
{
jobApplication.setApplicationStatus(ApplicationStatus.UNSUITABLE);
}
......
......@@ -45,6 +45,11 @@ public class ProcessCultureFP extends SaveFP
if(fromJobMatch)
{
BusinessObjectParser.assertFieldCondition(job.getLevel()!= null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request);
if(job.getLevel() != null)
{
BusinessObjectParser.assertFieldCondition(job.showLevelOption(job.getLevel()), job , Job.SINGLEREFERENCE_Level, "invalid", exceptions, true, request);
}
}
}
}
\ No newline at end of file
......@@ -17,8 +17,7 @@ import oneit.utils.BusinessException;
import oneit.utils.DateDiff;
import oneit.utils.MultiException;
import performa.intercom.utils.IntercomUtils;
import performa.orm.CompanyUser;
import performa.orm.Job;
import performa.orm.*;
import performa.orm.types.JobStatus;
......@@ -90,6 +89,11 @@ public class SaveJobFP extends SaveFP
if(job.getJobStatus() != JobStatus.DRAFT || openJob == Boolean.TRUE)
{
BusinessObjectParser.assertFieldCondition(job.getLevel() != null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request);
if(job.getLevel() != null)
{
BusinessObjectParser.assertFieldCondition(job.showLevelOption(job.getLevel()), job , Job.SINGLEREFERENCE_Level, "invalid", exceptions, true, request);
}
}
super.validate(process, submission, exceptions, params);
......
package performa.form;
import com.stripe.Stripe;
import com.stripe.exception.APIConnectionException;
import com.stripe.exception.APIException;
import com.stripe.exception.AuthenticationException;
import com.stripe.exception.CardException;
import com.stripe.exception.InvalidRequestException;
import com.stripe.model.Customer;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import oneit.appservices.config.ConfigMgr;
import oneit.business.content.Article;
import oneit.components.ParticipantInitialisationContext;
import oneit.email.ConfigurableArticleTemplateEmailer;
......@@ -20,6 +31,7 @@ import oneit.utils.*;
import performa.intercom.utils.IntercomUtils;
import performa.orm.*;
import performa.orm.types.RoleType;
import performa.utils.StripeUtils;
import performa.utils.Utils;
import performa.utils.WebUtils;
......@@ -99,7 +111,19 @@ public class SendCompanyUserInvitesFP extends SaveFP
if(companyUser == company.getAddedByUser())
{
companyUser.setRole(RoleType.ADMIN);
companyUser.setRoleTypes(RoleType.OWNER, RoleType.BILLING);
// Create customer in Stripe and subscribe for plan 0001 and coupon EAP. Only for 0.0.4.1 release
// Need to handle properly when plan and billing screens are added
StripeUtils.createCustomer(companyUser);
LogMgr.log(LOG, LogLevel.PROCESSING1,"Created customer in Stripe, customer reference ", company.getStripeReference());
StripeUtils.subscribeCustomer(company);
LogMgr.log(LOG, LogLevel.PROCESSING1,"Subscribed customer to default plan in Stripe, subscription reference ", company.getStripeSubscription());
//process user invitations
for(CompanyUser cUser : company.getUsersSet())
{
......
......@@ -55,6 +55,8 @@ public abstract class BaseCompany extends BaseBusinessClass
public static final String FIELD_PostCode = "PostCode";
public static final String FIELD_City = "City";
public static final String FIELD_HasClientSupport = "HasClientSupport";
public static final String FIELD_StripeReference = "StripeReference";
public static final String FIELD_StripeSubscription = "StripeSubscription";
public static final String FIELD_UserEmail = "UserEmail";
public static final String FIELD_FirstName = "FirstName";
public static final String FIELD_LastName = "LastName";
......@@ -83,6 +85,8 @@ public abstract class BaseCompany extends BaseBusinessClass
private static final DefaultAttributeHelper<Company> HELPER_PostCode = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Company> HELPER_City = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Company> HELPER_HasClientSupport = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Company> HELPER_StripeReference = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Company> HELPER_StripeSubscription = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Company> HELPER_UserEmail = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Company> HELPER_FirstName = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Company> HELPER_LastName = DefaultAttributeHelper.INSTANCE;
......@@ -103,6 +107,8 @@ public abstract class BaseCompany extends BaseBusinessClass
private String _PostCode;
private String _City;
private Boolean _HasClientSupport;
private String _StripeReference;
private String _StripeSubscription;
private String _UserEmail;
private String _FirstName;
private String _LastName;
......@@ -141,6 +147,8 @@ public abstract class BaseCompany extends BaseBusinessClass
private static final AttributeValidator[] FIELD_PostCode_Validators;
private static final AttributeValidator[] FIELD_City_Validators;
private static final AttributeValidator[] FIELD_HasClientSupport_Validators;
private static final AttributeValidator[] FIELD_StripeReference_Validators;
private static final AttributeValidator[] FIELD_StripeSubscription_Validators;
// Arrays of behaviour decorators
......@@ -176,6 +184,8 @@ public abstract class BaseCompany extends BaseBusinessClass
FIELD_PostCode_Validators = (AttributeValidator[])setupAttribMetaData_PostCode(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_City_Validators = (AttributeValidator[])setupAttribMetaData_City(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_HasClientSupport_Validators = (AttributeValidator[])setupAttribMetaData_HasClientSupport(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_StripeReference_Validators = (AttributeValidator[])setupAttribMetaData_StripeReference(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_StripeSubscription_Validators = (AttributeValidator[])setupAttribMetaData_StripeSubscription(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_Company.initialiseReference ();
......@@ -562,6 +572,44 @@ public abstract class BaseCompany extends BaseBusinessClass
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_StripeReference(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "stripe_reference");
metaInfo.put ("length", "100");
metaInfo.put ("name", "StripeReference");
metaInfo.put ("type", "String");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.StripeReference:", metaInfo);
ATTRIBUTES_METADATA_Company.put (FIELD_StripeReference, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Company.class, "StripeReference", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Company.StripeReference:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_StripeSubscription(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "stripe_subscription");
metaInfo.put ("length", "100");
metaInfo.put ("name", "StripeSubscription");
metaInfo.put ("type", "String");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.StripeSubscription:", metaInfo);
ATTRIBUTES_METADATA_Company.put (FIELD_StripeSubscription, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Company.class, "StripeSubscription", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Company.StripeSubscription:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION
......@@ -600,6 +648,8 @@ public abstract class BaseCompany extends BaseBusinessClass
_PostCode = (String)(HELPER_PostCode.initialise (_PostCode));
_City = (String)(HELPER_City.initialise (_City));
_HasClientSupport = (Boolean)(Boolean.FALSE);
_StripeReference = (String)(HELPER_StripeReference.initialise (_StripeReference));
_StripeSubscription = (String)(HELPER_StripeSubscription.initialise (_StripeSubscription));
_UserEmail = (String)(HELPER_UserEmail.initialise (_UserEmail));
_FirstName = (String)(HELPER_FirstName.initialise (_FirstName));
_LastName = (String)(HELPER_LastName.initialise (_LastName));
......@@ -1716,6 +1766,202 @@ public abstract class BaseCompany extends BaseBusinessClass
}
/**
* Get the attribute StripeReference
*/
public String getStripeReference ()
{
assertValid();
String valToReturn = _StripeReference;
for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
{
valToReturn = bhd.getStripeReference ((Company)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 preStripeReferenceChange (String newStripeReference) 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 postStripeReferenceChange () throws FieldException
{
}
public FieldWriteability getWriteability_StripeReference ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute StripeReference. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setStripeReference (String newStripeReference) throws FieldException
{
boolean oldAndNewIdentical = HELPER_StripeReference.compare (_StripeReference, newStripeReference);
try
{
for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
{
newStripeReference = bhd.setStripeReference ((Company)this, newStripeReference);
oldAndNewIdentical = HELPER_StripeReference.compare (_StripeReference, newStripeReference);
}
if (FIELD_StripeReference_Validators.length > 0)
{
Object newStripeReferenceObj = HELPER_StripeReference.toObject (newStripeReference);
if (newStripeReferenceObj != null)
{
int loopMax = FIELD_StripeReference_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_StripeReference);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_StripeReference_Validators[v].checkAttribute (this, FIELD_StripeReference, metadata, newStripeReferenceObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_StripeReference () != FieldWriteability.FALSE, "Field StripeReference is not writeable");
preStripeReferenceChange (newStripeReference);
markFieldChange (FIELD_StripeReference);
_StripeReference = newStripeReference;
postFieldChange (FIELD_StripeReference);
postStripeReferenceChange ();
}
}
/**
* Get the attribute StripeSubscription
*/
public String getStripeSubscription ()
{
assertValid();
String valToReturn = _StripeSubscription;
for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
{
valToReturn = bhd.getStripeSubscription ((Company)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 preStripeSubscriptionChange (String newStripeSubscription) 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 postStripeSubscriptionChange () throws FieldException
{
}
public FieldWriteability getWriteability_StripeSubscription ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute StripeSubscription. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setStripeSubscription (String newStripeSubscription) throws FieldException
{
boolean oldAndNewIdentical = HELPER_StripeSubscription.compare (_StripeSubscription, newStripeSubscription);
try
{
for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
{
newStripeSubscription = bhd.setStripeSubscription ((Company)this, newStripeSubscription);
oldAndNewIdentical = HELPER_StripeSubscription.compare (_StripeSubscription, newStripeSubscription);
}
if (FIELD_StripeSubscription_Validators.length > 0)
{
Object newStripeSubscriptionObj = HELPER_StripeSubscription.toObject (newStripeSubscription);
if (newStripeSubscriptionObj != null)
{
int loopMax = FIELD_StripeSubscription_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_StripeSubscription);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_StripeSubscription_Validators[v].checkAttribute (this, FIELD_StripeSubscription, metadata, newStripeSubscriptionObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_StripeSubscription () != FieldWriteability.FALSE, "Field StripeSubscription is not writeable");
preStripeSubscriptionChange (newStripeSubscription);
markFieldChange (FIELD_StripeSubscription);
_StripeSubscription = newStripeSubscription;
postFieldChange (FIELD_StripeSubscription);
postStripeSubscriptionChange ();
}
}
/**
* Get the attribute UserEmail
*/
public String getUserEmail ()
......@@ -2931,6 +3177,8 @@ public abstract class BaseCompany extends BaseBusinessClass
tl_companyPSet.setAttrib (FIELD_PostCode, HELPER_PostCode.toObject (_PostCode)); //
tl_companyPSet.setAttrib (FIELD_City, HELPER_City.toObject (_City)); //
tl_companyPSet.setAttrib (FIELD_HasClientSupport, HELPER_HasClientSupport.toObject (_HasClientSupport)); //
tl_companyPSet.setAttrib (FIELD_StripeReference, HELPER_StripeReference.toObject (_StripeReference)); //
tl_companyPSet.setAttrib (FIELD_StripeSubscription, HELPER_StripeSubscription.toObject (_StripeSubscription)); //
_AddedByUser.getPersistentSets (allSets);
}
......@@ -2957,6 +3205,8 @@ public abstract class BaseCompany extends BaseBusinessClass
_PostCode = (String)(HELPER_PostCode.fromObject (_PostCode, tl_companyPSet.getAttrib (FIELD_PostCode))); //
_City = (String)(HELPER_City.fromObject (_City, tl_companyPSet.getAttrib (FIELD_City))); //
_HasClientSupport = (Boolean)(HELPER_HasClientSupport.fromObject (_HasClientSupport, tl_companyPSet.getAttrib (FIELD_HasClientSupport))); //
_StripeReference = (String)(HELPER_StripeReference.fromObject (_StripeReference, tl_companyPSet.getAttrib (FIELD_StripeReference))); //
_StripeSubscription = (String)(HELPER_StripeSubscription.fromObject (_StripeSubscription, tl_companyPSet.getAttrib (FIELD_StripeSubscription))); //
_AddedByUser.setFromPersistentSets (objectID, allSets);
}
......@@ -3072,6 +3322,24 @@ public abstract class BaseCompany extends BaseBusinessClass
e.addException (ex);
}
try
{
setStripeReference (otherCompany.getStripeReference ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setStripeSubscription (otherCompany.getStripeSubscription ());
}
catch (FieldException ex)
{
e.addException (ex);
}
}
}
......@@ -3098,6 +3366,8 @@ public abstract class BaseCompany extends BaseBusinessClass
_PostCode = sourceCompany._PostCode;
_City = sourceCompany._City;
_HasClientSupport = sourceCompany._HasClientSupport;
_StripeReference = sourceCompany._StripeReference;
_StripeSubscription = sourceCompany._StripeSubscription;
_UserEmail = sourceCompany._UserEmail;
_FirstName = sourceCompany._FirstName;
_LastName = sourceCompany._LastName;
......@@ -3172,6 +3442,8 @@ public abstract class BaseCompany extends BaseBusinessClass
_PostCode = (String)(HELPER_PostCode.readExternal (_PostCode, vals.get(FIELD_PostCode))); //
_City = (String)(HELPER_City.readExternal (_City, vals.get(FIELD_City))); //
_HasClientSupport = (Boolean)(HELPER_HasClientSupport.readExternal (_HasClientSupport, vals.get(FIELD_HasClientSupport))); //
_StripeReference = (String)(HELPER_StripeReference.readExternal (_StripeReference, vals.get(FIELD_StripeReference))); //
_StripeSubscription = (String)(HELPER_StripeSubscription.readExternal (_StripeSubscription, vals.get(FIELD_StripeSubscription))); //
_UserEmail = (String)(HELPER_UserEmail.readExternal (_UserEmail, vals.get(FIELD_UserEmail))); //
_FirstName = (String)(HELPER_FirstName.readExternal (_FirstName, vals.get(FIELD_FirstName))); //
_LastName = (String)(HELPER_LastName.readExternal (_LastName, vals.get(FIELD_LastName))); //
......@@ -3203,6 +3475,8 @@ public abstract class BaseCompany extends BaseBusinessClass
vals.put (FIELD_PostCode, HELPER_PostCode.writeExternal (_PostCode));
vals.put (FIELD_City, HELPER_City.writeExternal (_City));
vals.put (FIELD_HasClientSupport, HELPER_HasClientSupport.writeExternal (_HasClientSupport));
vals.put (FIELD_StripeReference, HELPER_StripeReference.writeExternal (_StripeReference));
vals.put (FIELD_StripeSubscription, HELPER_StripeSubscription.writeExternal (_StripeSubscription));
vals.put (FIELD_UserEmail, HELPER_UserEmail.writeExternal (_UserEmail));
vals.put (FIELD_FirstName, HELPER_FirstName.writeExternal (_FirstName));
vals.put (FIELD_LastName, HELPER_LastName.writeExternal (_LastName));
......@@ -3269,6 +3543,14 @@ public abstract class BaseCompany extends BaseBusinessClass
{
listener.notifyFieldChange(this, other, FIELD_HasClientSupport, HELPER_HasClientSupport.toObject(this._HasClientSupport), HELPER_HasClientSupport.toObject(otherCompany._HasClientSupport));
}
if (!HELPER_StripeReference.compare(this._StripeReference, otherCompany._StripeReference))
{
listener.notifyFieldChange(this, other, FIELD_StripeReference, HELPER_StripeReference.toObject(this._StripeReference), HELPER_StripeReference.toObject(otherCompany._StripeReference));
}
if (!HELPER_StripeSubscription.compare(this._StripeSubscription, otherCompany._StripeSubscription))
{
listener.notifyFieldChange(this, other, FIELD_StripeSubscription, HELPER_StripeSubscription.toObject(this._StripeSubscription), HELPER_StripeSubscription.toObject(otherCompany._StripeSubscription));
}
// Compare single assocs
_AddedByUser.compare (otherCompany._AddedByUser, listener);
......@@ -3311,6 +3593,8 @@ public abstract class BaseCompany extends BaseBusinessClass
visitor.visitField(this, FIELD_PostCode, HELPER_PostCode.toObject(getPostCode()));
visitor.visitField(this, FIELD_City, HELPER_City.toObject(getCity()));
visitor.visitField(this, FIELD_HasClientSupport, HELPER_HasClientSupport.toObject(getHasClientSupport()));
visitor.visitField(this, FIELD_StripeReference, HELPER_StripeReference.toObject(getStripeReference()));
visitor.visitField(this, FIELD_StripeSubscription, HELPER_StripeSubscription.toObject(getStripeSubscription()));
visitor.visitAssociation (_AddedByUser);
visitor.visitAssociation (_Users);
visitor.visitAssociation (_Clients);
......@@ -3403,6 +3687,14 @@ public abstract class BaseCompany extends BaseBusinessClass
{
return filter.matches (getHasClientSupport ());
}
else if (attribName.equals (FIELD_StripeReference))
{
return filter.matches (getStripeReference ());
}
else if (attribName.equals (FIELD_StripeSubscription))
{
return filter.matches (getStripeSubscription ());
}
else if (attribName.equals (SINGLEREFERENCE_AddedByUser))
{
return filter.matches (getAddedByUser ());
......@@ -3504,6 +3796,18 @@ public abstract class BaseCompany extends BaseBusinessClass
return this;
}
public SearchAll andStripeReference (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_company.stripe_reference", "StripeReference");
return this;
}
public SearchAll andStripeSubscription (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_company.stripe_subscription", "StripeSubscription");
return this;
}
public SearchAll andAddedByUser (QueryFilter<CompanyUser> filter)
{
filter.addFilter (context, "tl_company.added_by_user_id", "AddedByUser");
......@@ -3589,6 +3893,14 @@ public abstract class BaseCompany extends BaseBusinessClass
{
return HELPER_HasClientSupport.toObject (getHasClientSupport ());
}
else if (attribName.equals (FIELD_StripeReference))
{
return HELPER_StripeReference.toObject (getStripeReference ());
}
else if (attribName.equals (FIELD_StripeSubscription))
{
return HELPER_StripeSubscription.toObject (getStripeSubscription ());
}
else if (attribName.equals (FIELD_UserEmail))
{
return HELPER_UserEmail.toObject (getUserEmail ());
......@@ -3670,6 +3982,14 @@ public abstract class BaseCompany extends BaseBusinessClass
{
return HELPER_HasClientSupport;
}
else if (attribName.equals (FIELD_StripeReference))
{
return HELPER_StripeReference;
}
else if (attribName.equals (FIELD_StripeSubscription))
{
return HELPER_StripeSubscription;
}
else if (attribName.equals (FIELD_UserEmail))
{
return HELPER_UserEmail;
......@@ -3751,6 +4071,14 @@ public abstract class BaseCompany extends BaseBusinessClass
{
setHasClientSupport ((Boolean)(HELPER_HasClientSupport.fromObject (_HasClientSupport, attribValue)));
}
else if (attribName.equals (FIELD_StripeReference))
{
setStripeReference ((String)(HELPER_StripeReference.fromObject (_StripeReference, attribValue)));
}
else if (attribName.equals (FIELD_StripeSubscription))
{
setStripeSubscription ((String)(HELPER_StripeSubscription.fromObject (_StripeSubscription, attribValue)));
}
else if (attribName.equals (FIELD_UserEmail))
{
setUserEmail ((String)(HELPER_UserEmail.fromObject (_UserEmail, attribValue)));
......@@ -3839,6 +4167,14 @@ public abstract class BaseCompany extends BaseBusinessClass
{
return getWriteability_HasClientSupport ();
}
else if (fieldName.equals (FIELD_StripeReference))
{
return getWriteability_StripeReference ();
}
else if (fieldName.equals (FIELD_StripeSubscription))
{
return getWriteability_StripeSubscription ();
}
else if (fieldName.equals (MULTIPLEREFERENCE_Users))
{
return getWriteability_Users ();
......@@ -3940,6 +4276,16 @@ public abstract class BaseCompany extends BaseBusinessClass
fields.add (FIELD_HasClientSupport);
}
if (getWriteability_StripeReference () != FieldWriteability.TRUE)
{
fields.add (FIELD_StripeReference);
}
if (getWriteability_StripeSubscription () != FieldWriteability.TRUE)
{
fields.add (FIELD_StripeSubscription);
}
if (getWriteability_UserEmail () != FieldWriteability.TRUE)
{
fields.add (FIELD_UserEmail);
......@@ -3990,6 +4336,8 @@ public abstract class BaseCompany extends BaseBusinessClass
result.add(HELPER_PostCode.getAttribObject (getClass (), _PostCode, false, FIELD_PostCode));
result.add(HELPER_City.getAttribObject (getClass (), _City, false, FIELD_City));
result.add(HELPER_HasClientSupport.getAttribObject (getClass (), _HasClientSupport, false, FIELD_HasClientSupport));
result.add(HELPER_StripeReference.getAttribObject (getClass (), _StripeReference, false, FIELD_StripeReference));
result.add(HELPER_StripeSubscription.getAttribObject (getClass (), _StripeSubscription, false, FIELD_StripeSubscription));
result.add(HELPER_UserEmail.getAttribObject (getClass (), _UserEmail, false, FIELD_UserEmail));
result.add(HELPER_FirstName.getAttribObject (getClass (), _FirstName, false, FIELD_FirstName));
result.add(HELPER_LastName.getAttribObject (getClass (), _LastName, false, FIELD_LastName));
......@@ -4263,6 +4611,42 @@ public abstract class BaseCompany extends BaseBusinessClass
}
/**
* Get the attribute StripeReference
*/
public String getStripeReference (Company obj, String original)
{
return original;
}
/**
* Change the value set for attribute StripeReference.
* May modify the field beforehand
* Occurs before validation.
*/
public String setStripeReference (Company obj, String newStripeReference) throws FieldException
{
return newStripeReference;
}
/**
* Get the attribute StripeSubscription
*/
public String getStripeSubscription (Company obj, String original)
{
return original;
}
/**
* Change the value set for attribute StripeSubscription.
* May modify the field beforehand
* Occurs before validation.
*/
public String setStripeSubscription (Company obj, String newStripeSubscription) throws FieldException
{
return newStripeSubscription;
}
/**
* Get the attribute UserEmail
*/
public String getUserEmail (Company obj, String original)
......@@ -4498,6 +4882,14 @@ public abstract class BaseCompany extends BaseBusinessClass
{
return toHasClientSupport ();
}
if (name.equals ("StripeReference"))
{
return toStripeReference ();
}
if (name.equals ("StripeSubscription"))
{
return toStripeSubscription ();
}
if (name.equals ("AddedByUser"))
{
return toAddedByUser ();
......@@ -4541,6 +4933,10 @@ public abstract class BaseCompany extends BaseBusinessClass
public PipeLine<From, String> toCity () { return pipe(new ORMAttributePipe<Me, String>(FIELD_City)); }
public PipeLine<From, Boolean> toHasClientSupport () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_HasClientSupport)); }
public PipeLine<From, String> toStripeReference () { return pipe(new ORMAttributePipe<Me, String>(FIELD_StripeReference)); }
public PipeLine<From, String> toStripeSubscription () { return pipe(new ORMAttributePipe<Me, String>(FIELD_StripeSubscription)); }
public CompanyUser.CompanyUserPipeLineFactory<From, CompanyUser> toAddedByUser () { return toAddedByUser (Filter.ALL); }
public CompanyUser.CompanyUserPipeLineFactory<From, CompanyUser> toAddedByUser (Filter<CompanyUser> filter)
......
......@@ -45,6 +45,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
public static final String FIELD_ForgotPasswordMailSendDate = "ForgotPasswordMailSendDate";
public static final String FIELD_ForgotPasswordKey = "ForgotPasswordKey";
public static final String FIELD_Role = "Role";
public static final String FIELD_Roles = "Roles";
public static final String FIELD_Phone = "Phone";
public static final String FIELD_VerificationMailSendDate = "VerificationMailSendDate";
public static final String FIELD_VerificationKey = "VerificationKey";
......@@ -66,6 +67,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
private static final DefaultAttributeHelper<CompanyUser> HELPER_ForgotPasswordMailSendDate = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<CompanyUser> HELPER_ForgotPasswordKey = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper<CompanyUser, RoleType> HELPER_Role = new EnumeratedAttributeHelper<CompanyUser, RoleType> (RoleType.FACTORY_RoleType);
private static final DelimitedEnumsAttributeHelper HELPER_Roles = new DelimitedEnumsAttributeHelper (RoleType.FACTORY_RoleType);
private static final DefaultAttributeHelper<CompanyUser> HELPER_Phone = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<CompanyUser> HELPER_VerificationMailSendDate = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<CompanyUser> HELPER_VerificationKey = DefaultAttributeHelper.INSTANCE;
......@@ -80,6 +82,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
private Date _ForgotPasswordMailSendDate;
private String _ForgotPasswordKey;
private RoleType _Role;
private Set<RoleType> _Roles;
private String _Phone;
private Date _VerificationMailSendDate;
private String _VerificationKey;
......@@ -107,6 +110,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
private static final AttributeValidator[] FIELD_ForgotPasswordMailSendDate_Validators;
private static final AttributeValidator[] FIELD_ForgotPasswordKey_Validators;
private static final AttributeValidator[] FIELD_Role_Validators;
private static final AttributeValidator[] FIELD_Roles_Validators;
private static final AttributeValidator[] FIELD_Phone_Validators;
private static final AttributeValidator[] FIELD_VerificationMailSendDate_Validators;
private static final AttributeValidator[] FIELD_VerificationKey_Validators;
......@@ -133,6 +137,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
FIELD_ForgotPasswordMailSendDate_Validators = (AttributeValidator[])setupAttribMetaData_ForgotPasswordMailSendDate(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ForgotPasswordKey_Validators = (AttributeValidator[])setupAttribMetaData_ForgotPasswordKey(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Role_Validators = (AttributeValidator[])setupAttribMetaData_Role(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Roles_Validators = (AttributeValidator[])setupAttribMetaData_Roles(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Phone_Validators = (AttributeValidator[])setupAttribMetaData_Phone(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_VerificationMailSendDate_Validators = (AttributeValidator[])setupAttribMetaData_VerificationMailSendDate(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_VerificationKey_Validators = (AttributeValidator[])setupAttribMetaData_VerificationKey(validatorMapping).toArray (new AttributeValidator[0]);
......@@ -277,6 +282,27 @@ public abstract class BaseCompanyUser extends SecUserExtension
}
// Meta Info setup
private static List setupAttribMetaData_Roles(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "DelimitedEnumsAttributeHelper");
metaInfo.put ("attribHelperInstance", "new DelimitedEnumsAttributeHelper (RoleType.FACTORY_RoleType)");
metaInfo.put ("dbcol", "roles");
metaInfo.put ("mandatory", "false");
metaInfo.put ("name", "Roles");
metaInfo.put ("type", "Set<RoleType>");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CompanyUser.Roles:", metaInfo);
ATTRIBUTES_METADATA_CompanyUser.put (FIELD_Roles, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(CompanyUser.class, "Roles", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for CompanyUser.Roles:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_Phone(Map validatorMapping)
{
Map metaInfo = new HashMap ();
......@@ -401,6 +427,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
_ForgotPasswordMailSendDate = (Date)(HELPER_ForgotPasswordMailSendDate.initialise (_ForgotPasswordMailSendDate));
_ForgotPasswordKey = (String)(HELPER_ForgotPasswordKey.initialise (_ForgotPasswordKey));
_Role = (RoleType)(HELPER_Role.initialise (_Role));
_Roles = (Set<RoleType>)(HELPER_Roles.initialise (_Roles));
_Phone = (String)(HELPER_Phone.initialise (_Phone));
_VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.initialise (_VerificationMailSendDate));
_VerificationKey = (String)(HELPER_VerificationKey.initialise (_VerificationKey));
......@@ -730,6 +757,104 @@ public abstract class BaseCompanyUser extends SecUserExtension
}
/**
* Get the attribute Roles
*/
public Set<RoleType> getRoles ()
{
assertValid();
Set<RoleType> valToReturn = _Roles;
for (CompanyUserBehaviourDecorator bhd : CompanyUser_BehaviourDecorators)
{
valToReturn = bhd.getRoles ((CompanyUser)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 preRolesChange (Set<RoleType> newRoles) 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 postRolesChange () throws FieldException
{
}
public FieldWriteability getWriteability_Roles ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute Roles. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setRoles (Set<RoleType> newRoles) throws FieldException
{
boolean oldAndNewIdentical = HELPER_Roles.compare (_Roles, newRoles);
try
{
for (CompanyUserBehaviourDecorator bhd : CompanyUser_BehaviourDecorators)
{
newRoles = bhd.setRoles ((CompanyUser)this, newRoles);
oldAndNewIdentical = HELPER_Roles.compare (_Roles, newRoles);
}
if (FIELD_Roles_Validators.length > 0)
{
Object newRolesObj = HELPER_Roles.toObject (newRoles);
if (newRolesObj != null)
{
int loopMax = FIELD_Roles_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_CompanyUser.get (FIELD_Roles);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_Roles_Validators[v].checkAttribute (this, FIELD_Roles, metadata, newRolesObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_Roles () != FieldWriteability.FALSE, "Field Roles is not writeable");
preRolesChange (newRoles);
markFieldChange (FIELD_Roles);
_Roles = newRoles;
postFieldChange (FIELD_Roles);
postRolesChange ();
}
}
/**
* Get the attribute Phone
*/
public String getPhone ()
......@@ -1915,6 +2040,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
oneit_sec_user_extensionPSet.setAttrib (FIELD_ForgotPasswordMailSendDate, HELPER_ForgotPasswordMailSendDate.toObject (_ForgotPasswordMailSendDate)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_ForgotPasswordKey, HELPER_ForgotPasswordKey.toObject (_ForgotPasswordKey)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_Role, HELPER_Role.toObject (_Role)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_Roles, HELPER_Roles.toObject (_Roles)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_Phone, HELPER_Phone.toObject (_Phone)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.toObject (_VerificationMailSendDate)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_VerificationKey, HELPER_VerificationKey.toObject (_VerificationKey)); //
......@@ -1938,6 +2064,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
_ForgotPasswordMailSendDate = (Date)(HELPER_ForgotPasswordMailSendDate.fromObject (_ForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (FIELD_ForgotPasswordMailSendDate))); //
_ForgotPasswordKey = (String)(HELPER_ForgotPasswordKey.fromObject (_ForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (FIELD_ForgotPasswordKey))); //
_Role = (RoleType)(HELPER_Role.fromObject (_Role, oneit_sec_user_extensionPSet.getAttrib (FIELD_Role))); //
_Roles = (Set<RoleType>)(HELPER_Roles.fromObject (_Roles, oneit_sec_user_extensionPSet.getAttrib (FIELD_Roles))); //
_Phone = (String)(HELPER_Phone.fromObject (_Phone, oneit_sec_user_extensionPSet.getAttrib (FIELD_Phone))); //
_VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.fromObject (_VerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (FIELD_VerificationMailSendDate))); //
_VerificationKey = (String)(HELPER_VerificationKey.fromObject (_VerificationKey, oneit_sec_user_extensionPSet.getAttrib (FIELD_VerificationKey))); //
......@@ -1988,6 +2115,15 @@ public abstract class BaseCompanyUser extends SecUserExtension
try
{
setRoles (otherCompanyUser.getRoles ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setPhone (otherCompanyUser.getPhone ());
}
catch (FieldException ex)
......@@ -2049,6 +2185,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
_ForgotPasswordMailSendDate = sourceCompanyUser._ForgotPasswordMailSendDate;
_ForgotPasswordKey = sourceCompanyUser._ForgotPasswordKey;
_Role = sourceCompanyUser._Role;
_Roles = sourceCompanyUser._Roles;
_Phone = sourceCompanyUser._Phone;
_VerificationMailSendDate = sourceCompanyUser._VerificationMailSendDate;
_VerificationKey = sourceCompanyUser._VerificationKey;
......@@ -2113,6 +2250,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
_ForgotPasswordMailSendDate = (Date)(HELPER_ForgotPasswordMailSendDate.readExternal (_ForgotPasswordMailSendDate, vals.get(FIELD_ForgotPasswordMailSendDate))); //
_ForgotPasswordKey = (String)(HELPER_ForgotPasswordKey.readExternal (_ForgotPasswordKey, vals.get(FIELD_ForgotPasswordKey))); //
_Role = (RoleType)(HELPER_Role.readExternal (_Role, vals.get(FIELD_Role))); //
_Roles = (Set<RoleType>)(HELPER_Roles.readExternal (_Roles, vals.get(FIELD_Roles))); //
_Phone = (String)(HELPER_Phone.readExternal (_Phone, vals.get(FIELD_Phone))); //
_VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.readExternal (_VerificationMailSendDate, vals.get(FIELD_VerificationMailSendDate))); //
_VerificationKey = (String)(HELPER_VerificationKey.readExternal (_VerificationKey, vals.get(FIELD_VerificationKey))); //
......@@ -2136,6 +2274,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
vals.put (FIELD_ForgotPasswordMailSendDate, HELPER_ForgotPasswordMailSendDate.writeExternal (_ForgotPasswordMailSendDate));
vals.put (FIELD_ForgotPasswordKey, HELPER_ForgotPasswordKey.writeExternal (_ForgotPasswordKey));
vals.put (FIELD_Role, HELPER_Role.writeExternal (_Role));
vals.put (FIELD_Roles, HELPER_Roles.writeExternal (_Roles));
vals.put (FIELD_Phone, HELPER_Phone.writeExternal (_Phone));
vals.put (FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.writeExternal (_VerificationMailSendDate));
vals.put (FIELD_VerificationKey, HELPER_VerificationKey.writeExternal (_VerificationKey));
......@@ -2170,6 +2309,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{
listener.notifyFieldChange(this, other, FIELD_Role, HELPER_Role.toObject(this._Role), HELPER_Role.toObject(otherCompanyUser._Role));
}
if (!HELPER_Roles.compare(this._Roles, otherCompanyUser._Roles))
{
listener.notifyFieldChange(this, other, FIELD_Roles, HELPER_Roles.toObject(this._Roles), HELPER_Roles.toObject(otherCompanyUser._Roles));
}
if (!HELPER_Phone.compare(this._Phone, otherCompanyUser._Phone))
{
listener.notifyFieldChange(this, other, FIELD_Phone, HELPER_Phone.toObject(this._Phone), HELPER_Phone.toObject(otherCompanyUser._Phone));
......@@ -2219,6 +2362,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
visitor.visitField(this, FIELD_ForgotPasswordMailSendDate, HELPER_ForgotPasswordMailSendDate.toObject(getForgotPasswordMailSendDate()));
visitor.visitField(this, FIELD_ForgotPasswordKey, HELPER_ForgotPasswordKey.toObject(getForgotPasswordKey()));
visitor.visitField(this, FIELD_Role, HELPER_Role.toObject(getRole()));
visitor.visitField(this, FIELD_Roles, HELPER_Roles.toObject(getRoles()));
visitor.visitField(this, FIELD_Phone, HELPER_Phone.toObject(getPhone()));
visitor.visitField(this, FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.toObject(getVerificationMailSendDate()));
visitor.visitField(this, FIELD_VerificationKey, HELPER_VerificationKey.toObject(getVerificationKey()));
......@@ -2274,6 +2418,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{
return filter.matches (getRole ());
}
else if (attribName.equals (FIELD_Roles))
{
return filter.matches (getRoles ());
}
else if (attribName.equals (FIELD_Phone))
{
return filter.matches (getPhone ());
......@@ -2347,6 +2495,12 @@ public abstract class BaseCompanyUser extends SecUserExtension
return this;
}
public SearchAll andRoles (QueryFilter<Set<RoleType>> filter)
{
filter.addFilter (context, "oneit_sec_user_extension.roles", "Roles");
return this;
}
public SearchAll andPhone (QueryFilter<String> filter)
{
filter.addFilter (context, "oneit_sec_user_extension.phone", "Phone");
......@@ -2464,6 +2618,12 @@ public abstract class BaseCompanyUser extends SecUserExtension
return this;
}
public SearchAllCompanyUsers andRoles (QueryFilter<Set<RoleType>> filter)
{
filter.addFilter (context, "oneit_sec_user_extension.roles", "Roles");
return this;
}
public SearchAllCompanyUsers andPhone (QueryFilter<String> filter)
{
filter.addFilter (context, "oneit_sec_user_extension.phone", "Phone");
......@@ -2588,6 +2748,12 @@ public abstract class BaseCompanyUser extends SecUserExtension
return this;
}
public SearchIdPin andRoles (QueryFilter<Set<RoleType>> filter)
{
filter.addFilter (context, "oneit_sec_user_extension.roles", "Roles");
return this;
}
public SearchIdPin andPhone (QueryFilter<String> filter)
{
filter.addFilter (context, "oneit_sec_user_extension.phone", "Phone");
......@@ -2677,6 +2843,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{
return HELPER_Role.toObject (getRole ());
}
else if (attribName.equals (FIELD_Roles))
{
return HELPER_Roles.toObject (getRoles ());
}
else if (attribName.equals (FIELD_Phone))
{
return HELPER_Phone.toObject (getPhone ());
......@@ -2734,6 +2904,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{
return HELPER_Role;
}
else if (attribName.equals (FIELD_Roles))
{
return HELPER_Roles;
}
else if (attribName.equals (FIELD_Phone))
{
return HELPER_Phone;
......@@ -2791,6 +2965,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{
setRole ((RoleType)(HELPER_Role.fromObject (_Role, attribValue)));
}
else if (attribName.equals (FIELD_Roles))
{
setRoles ((Set<RoleType>)(HELPER_Roles.fromObject (_Roles, attribValue)));
}
else if (attribName.equals (FIELD_Phone))
{
setPhone ((String)(HELPER_Phone.fromObject (_Phone, attribValue)));
......@@ -2855,6 +3033,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{
return getWriteability_Role ();
}
else if (fieldName.equals (FIELD_Roles))
{
return getWriteability_Roles ();
}
else if (fieldName.equals (FIELD_Phone))
{
return getWriteability_Phone ();
......@@ -2916,6 +3098,11 @@ public abstract class BaseCompanyUser extends SecUserExtension
fields.add (FIELD_Role);
}
if (getWriteability_Roles () != FieldWriteability.TRUE)
{
fields.add (FIELD_Roles);
}
if (getWriteability_Phone () != FieldWriteability.TRUE)
{
fields.add (FIELD_Phone);
......@@ -2968,6 +3155,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
result.add(HELPER_ForgotPasswordMailSendDate.getAttribObject (getClass (), _ForgotPasswordMailSendDate, false, FIELD_ForgotPasswordMailSendDate));
result.add(HELPER_ForgotPasswordKey.getAttribObject (getClass (), _ForgotPasswordKey, false, FIELD_ForgotPasswordKey));
result.add(HELPER_Role.getAttribObject (getClass (), _Role, false, FIELD_Role));
result.add(HELPER_Roles.getAttribObject (getClass (), _Roles, false, FIELD_Roles));
result.add(HELPER_Phone.getAttribObject (getClass (), _Phone, false, FIELD_Phone));
result.add(HELPER_VerificationMailSendDate.getAttribObject (getClass (), _VerificationMailSendDate, false, FIELD_VerificationMailSendDate));
result.add(HELPER_VerificationKey.getAttribObject (getClass (), _VerificationKey, false, FIELD_VerificationKey));
......@@ -3081,6 +3269,24 @@ public abstract class BaseCompanyUser extends SecUserExtension
}
/**
* Get the attribute Roles
*/
public Set<RoleType> getRoles (CompanyUser obj, Set<RoleType> original)
{
return original;
}
/**
* Change the value set for attribute Roles.
* May modify the field beforehand
* Occurs before validation.
*/
public Set<RoleType> setRoles (CompanyUser obj, Set<RoleType> newRoles) throws FieldException
{
return newRoles;
}
/**
* Get the attribute Phone
*/
public String getPhone (CompanyUser obj, String original)
......@@ -3300,6 +3506,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{
return toRole ();
}
if (name.equals ("Roles"))
{
return toRoles ();
}
if (name.equals ("Phone"))
{
return toPhone ();
......@@ -3342,6 +3552,8 @@ public abstract class BaseCompanyUser extends SecUserExtension
public PipeLine<From, RoleType> toRole () { return pipe(new ORMAttributePipe<Me, RoleType>(FIELD_Role)); }
public PipeLine<From, Set<RoleType>> toRoles () { return pipe(new ORMAttributePipe<Me, Set<RoleType>>(FIELD_Roles)); }
public PipeLine<From, String> toPhone () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Phone)); }
public PipeLine<From, Date> toVerificationMailSendDate () { return pipe(new ORMAttributePipe<Me, Date>(FIELD_VerificationMailSendDate)); }
......
......@@ -41,6 +41,9 @@ public abstract class BaseLevel extends BaseBusinessClass
public static final String FIELD_LevelDescription = "LevelDescription";
public static final String FIELD_LevelNotes = "LevelNotes";
public static final String FIELD_ReportHeader = "ReportHeader";
public static final String FIELD_AppliedToExpress = "AppliedToExpress";
public static final String FIELD_CSSClass = "CSSClass";
public static final String FIELD_Enabled = "Enabled";
public static final String MULTIPLEREFERENCE_Factors = "Factors";
public static final String BACKREF_Factors = "";
public static final String MULTIPLEREFERENCE_Results = "Results";
......@@ -67,12 +70,18 @@ public abstract class BaseLevel extends BaseBusinessClass
private static final DefaultAttributeHelper<Level> HELPER_LevelDescription = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Level> HELPER_LevelNotes = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Level> HELPER_ReportHeader = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Level> HELPER_AppliedToExpress = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Level> HELPER_CSSClass = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Level> HELPER_Enabled = DefaultAttributeHelper.INSTANCE;
// Private attributes corresponding to business object data
private String _LevelDescription;
private String _LevelNotes;
private String _ReportHeader;
private Boolean _AppliedToExpress;
private String _CSSClass;
private Boolean _Enabled;
// Private attributes corresponding to single references
......@@ -96,6 +105,9 @@ public abstract class BaseLevel extends BaseBusinessClass
private static final AttributeValidator[] FIELD_LevelDescription_Validators;
private static final AttributeValidator[] FIELD_LevelNotes_Validators;
private static final AttributeValidator[] FIELD_ReportHeader_Validators;
private static final AttributeValidator[] FIELD_AppliedToExpress_Validators;
private static final AttributeValidator[] FIELD_CSSClass_Validators;
private static final AttributeValidator[] FIELD_Enabled_Validators;
// Arrays of behaviour decorators
......@@ -128,6 +140,9 @@ public abstract class BaseLevel extends BaseBusinessClass
FIELD_LevelDescription_Validators = (AttributeValidator[])setupAttribMetaData_LevelDescription(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_LevelNotes_Validators = (AttributeValidator[])setupAttribMetaData_LevelNotes(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ReportHeader_Validators = (AttributeValidator[])setupAttribMetaData_ReportHeader(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_AppliedToExpress_Validators = (AttributeValidator[])setupAttribMetaData_AppliedToExpress(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CSSClass_Validators = (AttributeValidator[])setupAttribMetaData_CSSClass(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Enabled_Validators = (AttributeValidator[])setupAttribMetaData_Enabled(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_Level.initialiseReference ();
......@@ -309,6 +324,63 @@ public abstract class BaseLevel extends BaseBusinessClass
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_AppliedToExpress(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "applied_to_express");
metaInfo.put ("defaultValue", "Boolean.FALSE");
metaInfo.put ("name", "AppliedToExpress");
metaInfo.put ("type", "Boolean");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Level.AppliedToExpress:", metaInfo);
ATTRIBUTES_METADATA_Level.put (FIELD_AppliedToExpress, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Level.class, "AppliedToExpress", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Level.AppliedToExpress:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_CSSClass(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "css_class");
metaInfo.put ("length", "100");
metaInfo.put ("name", "CSSClass");
metaInfo.put ("type", "String");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Level.CSSClass:", metaInfo);
ATTRIBUTES_METADATA_Level.put (FIELD_CSSClass, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Level.class, "CSSClass", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Level.CSSClass:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_Enabled(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "enabled");
metaInfo.put ("defaultValue", "Boolean.FALSE");
metaInfo.put ("name", "Enabled");
metaInfo.put ("type", "Boolean");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Level.Enabled:", metaInfo);
ATTRIBUTES_METADATA_Level.put (FIELD_Enabled, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Level.class, "Enabled", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Level.Enabled:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION
......@@ -339,6 +411,9 @@ public abstract class BaseLevel extends BaseBusinessClass
_LevelDescription = (String)(HELPER_LevelDescription.initialise (_LevelDescription));
_LevelNotes = (String)(HELPER_LevelNotes.initialise (_LevelNotes));
_ReportHeader = (String)(HELPER_ReportHeader.initialise (_ReportHeader));
_AppliedToExpress = (Boolean)(Boolean.FALSE);
_CSSClass = (String)(HELPER_CSSClass.initialise (_CSSClass));
_Enabled = (Boolean)(Boolean.FALSE);
}
......@@ -673,6 +748,300 @@ public abstract class BaseLevel extends BaseBusinessClass
}
}
/**
* Get the attribute AppliedToExpress
*/
public Boolean getAppliedToExpress ()
{
assertValid();
Boolean valToReturn = _AppliedToExpress;
for (LevelBehaviourDecorator bhd : Level_BehaviourDecorators)
{
valToReturn = bhd.getAppliedToExpress ((Level)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 preAppliedToExpressChange (Boolean newAppliedToExpress) 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 postAppliedToExpressChange () throws FieldException
{
}
public FieldWriteability getWriteability_AppliedToExpress ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute AppliedToExpress. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setAppliedToExpress (Boolean newAppliedToExpress) throws FieldException
{
boolean oldAndNewIdentical = HELPER_AppliedToExpress.compare (_AppliedToExpress, newAppliedToExpress);
try
{
for (LevelBehaviourDecorator bhd : Level_BehaviourDecorators)
{
newAppliedToExpress = bhd.setAppliedToExpress ((Level)this, newAppliedToExpress);
oldAndNewIdentical = HELPER_AppliedToExpress.compare (_AppliedToExpress, newAppliedToExpress);
}
if (FIELD_AppliedToExpress_Validators.length > 0)
{
Object newAppliedToExpressObj = HELPER_AppliedToExpress.toObject (newAppliedToExpress);
if (newAppliedToExpressObj != null)
{
int loopMax = FIELD_AppliedToExpress_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Level.get (FIELD_AppliedToExpress);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_AppliedToExpress_Validators[v].checkAttribute (this, FIELD_AppliedToExpress, metadata, newAppliedToExpressObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_AppliedToExpress () != FieldWriteability.FALSE, "Field AppliedToExpress is not writeable");
preAppliedToExpressChange (newAppliedToExpress);
markFieldChange (FIELD_AppliedToExpress);
_AppliedToExpress = newAppliedToExpress;
postFieldChange (FIELD_AppliedToExpress);
postAppliedToExpressChange ();
}
}
/**
* Get the attribute CSSClass
*/
public String getCSSClass ()
{
assertValid();
String valToReturn = _CSSClass;
for (LevelBehaviourDecorator bhd : Level_BehaviourDecorators)
{
valToReturn = bhd.getCSSClass ((Level)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 preCSSClassChange (String newCSSClass) 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 postCSSClassChange () throws FieldException
{
}
public FieldWriteability getWriteability_CSSClass ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute CSSClass. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setCSSClass (String newCSSClass) throws FieldException
{
boolean oldAndNewIdentical = HELPER_CSSClass.compare (_CSSClass, newCSSClass);
try
{
for (LevelBehaviourDecorator bhd : Level_BehaviourDecorators)
{
newCSSClass = bhd.setCSSClass ((Level)this, newCSSClass);
oldAndNewIdentical = HELPER_CSSClass.compare (_CSSClass, newCSSClass);
}
if (FIELD_CSSClass_Validators.length > 0)
{
Object newCSSClassObj = HELPER_CSSClass.toObject (newCSSClass);
if (newCSSClassObj != null)
{
int loopMax = FIELD_CSSClass_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Level.get (FIELD_CSSClass);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_CSSClass_Validators[v].checkAttribute (this, FIELD_CSSClass, metadata, newCSSClassObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_CSSClass () != FieldWriteability.FALSE, "Field CSSClass is not writeable");
preCSSClassChange (newCSSClass);
markFieldChange (FIELD_CSSClass);
_CSSClass = newCSSClass;
postFieldChange (FIELD_CSSClass);
postCSSClassChange ();
}
}
/**
* Get the attribute Enabled
*/
public Boolean getEnabled ()
{
assertValid();
Boolean valToReturn = _Enabled;
for (LevelBehaviourDecorator bhd : Level_BehaviourDecorators)
{
valToReturn = bhd.getEnabled ((Level)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 preEnabledChange (Boolean newEnabled) 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 postEnabledChange () throws FieldException
{
}
public FieldWriteability getWriteability_Enabled ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute Enabled. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setEnabled (Boolean newEnabled) throws FieldException
{
boolean oldAndNewIdentical = HELPER_Enabled.compare (_Enabled, newEnabled);
try
{
for (LevelBehaviourDecorator bhd : Level_BehaviourDecorators)
{
newEnabled = bhd.setEnabled ((Level)this, newEnabled);
oldAndNewIdentical = HELPER_Enabled.compare (_Enabled, newEnabled);
}
if (FIELD_Enabled_Validators.length > 0)
{
Object newEnabledObj = HELPER_Enabled.toObject (newEnabled);
if (newEnabledObj != null)
{
int loopMax = FIELD_Enabled_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Level.get (FIELD_Enabled);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_Enabled_Validators[v].checkAttribute (this, FIELD_Enabled, metadata, newEnabledObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_Enabled () != FieldWriteability.FALSE, "Field Enabled is not writeable");
preEnabledChange (newEnabled);
markFieldChange (FIELD_Enabled);
_Enabled = newEnabled;
postFieldChange (FIELD_Enabled);
postEnabledChange ();
}
}
/**
......@@ -1910,6 +2279,9 @@ public abstract class BaseLevel extends BaseBusinessClass
tl_levelPSet.setAttrib (FIELD_LevelDescription, HELPER_LevelDescription.toObject (_LevelDescription)); //
tl_levelPSet.setAttrib (FIELD_LevelNotes, HELPER_LevelNotes.toObject (_LevelNotes)); //
tl_levelPSet.setAttrib (FIELD_ReportHeader, HELPER_ReportHeader.toObject (_ReportHeader)); //
tl_levelPSet.setAttrib (FIELD_AppliedToExpress, HELPER_AppliedToExpress.toObject (_AppliedToExpress)); //
tl_levelPSet.setAttrib (FIELD_CSSClass, HELPER_CSSClass.toObject (_CSSClass)); //
tl_levelPSet.setAttrib (FIELD_Enabled, HELPER_Enabled.toObject (_Enabled)); //
}
......@@ -1927,6 +2299,9 @@ public abstract class BaseLevel extends BaseBusinessClass
_LevelDescription = (String)(HELPER_LevelDescription.fromObject (_LevelDescription, tl_levelPSet.getAttrib (FIELD_LevelDescription))); //
_LevelNotes = (String)(HELPER_LevelNotes.fromObject (_LevelNotes, tl_levelPSet.getAttrib (FIELD_LevelNotes))); //
_ReportHeader = (String)(HELPER_ReportHeader.fromObject (_ReportHeader, tl_levelPSet.getAttrib (FIELD_ReportHeader))); //
_AppliedToExpress = (Boolean)(HELPER_AppliedToExpress.fromObject (_AppliedToExpress, tl_levelPSet.getAttrib (FIELD_AppliedToExpress))); //
_CSSClass = (String)(HELPER_CSSClass.fromObject (_CSSClass, tl_levelPSet.getAttrib (FIELD_CSSClass))); //
_Enabled = (Boolean)(HELPER_Enabled.fromObject (_Enabled, tl_levelPSet.getAttrib (FIELD_Enabled))); //
}
......@@ -1969,6 +2344,33 @@ public abstract class BaseLevel extends BaseBusinessClass
e.addException (ex);
}
try
{
setAppliedToExpress (otherLevel.getAppliedToExpress ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setCSSClass (otherLevel.getCSSClass ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setEnabled (otherLevel.getEnabled ());
}
catch (FieldException ex)
{
e.addException (ex);
}
}
}
......@@ -1987,6 +2389,9 @@ public abstract class BaseLevel extends BaseBusinessClass
_LevelDescription = sourceLevel._LevelDescription;
_LevelNotes = sourceLevel._LevelNotes;
_ReportHeader = sourceLevel._ReportHeader;
_AppliedToExpress = sourceLevel._AppliedToExpress;
_CSSClass = sourceLevel._CSSClass;
_Enabled = sourceLevel._Enabled;
}
}
......@@ -2050,6 +2455,9 @@ public abstract class BaseLevel extends BaseBusinessClass
_LevelDescription = (String)(HELPER_LevelDescription.readExternal (_LevelDescription, vals.get(FIELD_LevelDescription))); //
_LevelNotes = (String)(HELPER_LevelNotes.readExternal (_LevelNotes, vals.get(FIELD_LevelNotes))); //
_ReportHeader = (String)(HELPER_ReportHeader.readExternal (_ReportHeader, vals.get(FIELD_ReportHeader))); //
_AppliedToExpress = (Boolean)(HELPER_AppliedToExpress.readExternal (_AppliedToExpress, vals.get(FIELD_AppliedToExpress))); //
_CSSClass = (String)(HELPER_CSSClass.readExternal (_CSSClass, vals.get(FIELD_CSSClass))); //
_Enabled = (Boolean)(HELPER_Enabled.readExternal (_Enabled, vals.get(FIELD_Enabled))); //
_Factors.readExternalData(vals.get(MULTIPLEREFERENCE_Factors));
_Results.readExternalData(vals.get(MULTIPLEREFERENCE_Results));
_Narratives.readExternalData(vals.get(MULTIPLEREFERENCE_Narratives));
......@@ -2072,6 +2480,9 @@ public abstract class BaseLevel extends BaseBusinessClass
vals.put (FIELD_LevelDescription, HELPER_LevelDescription.writeExternal (_LevelDescription));
vals.put (FIELD_LevelNotes, HELPER_LevelNotes.writeExternal (_LevelNotes));
vals.put (FIELD_ReportHeader, HELPER_ReportHeader.writeExternal (_ReportHeader));
vals.put (FIELD_AppliedToExpress, HELPER_AppliedToExpress.writeExternal (_AppliedToExpress));
vals.put (FIELD_CSSClass, HELPER_CSSClass.writeExternal (_CSSClass));
vals.put (FIELD_Enabled, HELPER_Enabled.writeExternal (_Enabled));
vals.put (MULTIPLEREFERENCE_Factors, _Factors.writeExternalData());
vals.put (MULTIPLEREFERENCE_Results, _Results.writeExternalData());
vals.put (MULTIPLEREFERENCE_Narratives, _Narratives.writeExternalData());
......@@ -2105,6 +2516,18 @@ public abstract class BaseLevel extends BaseBusinessClass
{
listener.notifyFieldChange(this, other, FIELD_ReportHeader, HELPER_ReportHeader.toObject(this._ReportHeader), HELPER_ReportHeader.toObject(otherLevel._ReportHeader));
}
if (!HELPER_AppliedToExpress.compare(this._AppliedToExpress, otherLevel._AppliedToExpress))
{
listener.notifyFieldChange(this, other, FIELD_AppliedToExpress, HELPER_AppliedToExpress.toObject(this._AppliedToExpress), HELPER_AppliedToExpress.toObject(otherLevel._AppliedToExpress));
}
if (!HELPER_CSSClass.compare(this._CSSClass, otherLevel._CSSClass))
{
listener.notifyFieldChange(this, other, FIELD_CSSClass, HELPER_CSSClass.toObject(this._CSSClass), HELPER_CSSClass.toObject(otherLevel._CSSClass));
}
if (!HELPER_Enabled.compare(this._Enabled, otherLevel._Enabled))
{
listener.notifyFieldChange(this, other, FIELD_Enabled, HELPER_Enabled.toObject(this._Enabled), HELPER_Enabled.toObject(otherLevel._Enabled));
}
// Compare single assocs
......@@ -2138,6 +2561,9 @@ public abstract class BaseLevel extends BaseBusinessClass
visitor.visitField(this, FIELD_LevelDescription, HELPER_LevelDescription.toObject(getLevelDescription()));
visitor.visitField(this, FIELD_LevelNotes, HELPER_LevelNotes.toObject(getLevelNotes()));
visitor.visitField(this, FIELD_ReportHeader, HELPER_ReportHeader.toObject(getReportHeader()));
visitor.visitField(this, FIELD_AppliedToExpress, HELPER_AppliedToExpress.toObject(getAppliedToExpress()));
visitor.visitField(this, FIELD_CSSClass, HELPER_CSSClass.toObject(getCSSClass()));
visitor.visitField(this, FIELD_Enabled, HELPER_Enabled.toObject(getEnabled()));
visitor.visitAssociation (_Factors);
visitor.visitAssociation (_Results);
visitor.visitAssociation (_Narratives);
......@@ -2223,6 +2649,18 @@ public abstract class BaseLevel extends BaseBusinessClass
{
return filter.matches (getReportHeader ());
}
else if (attribName.equals (FIELD_AppliedToExpress))
{
return filter.matches (getAppliedToExpress ());
}
else if (attribName.equals (FIELD_CSSClass))
{
return filter.matches (getCSSClass ());
}
else if (attribName.equals (FIELD_Enabled))
{
return filter.matches (getEnabled ());
}
else
{
return super.testFilter (attribName, filter);
......@@ -2272,6 +2710,24 @@ public abstract class BaseLevel extends BaseBusinessClass
return this;
}
public SearchAll andAppliedToExpress (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_level.applied_to_express", "AppliedToExpress");
return this;
}
public SearchAll andCSSClass (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_level.css_class", "CSSClass");
return this;
}
public SearchAll andEnabled (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_level.enabled", "Enabled");
return this;
}
public Level[]
search (ObjectTransaction transaction) throws StorageException
{
......@@ -2347,6 +2803,24 @@ public abstract class BaseLevel extends BaseBusinessClass
return this;
}
public SearchName andAppliedToExpress (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_level.applied_to_express", "AppliedToExpress");
return this;
}
public SearchName andCSSClass (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_level.css_class", "CSSClass");
return this;
}
public SearchName andEnabled (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_level.enabled", "Enabled");
return this;
}
public Level search (ObjectTransaction transaction) throws StorageException
{
......@@ -2393,6 +2867,18 @@ public abstract class BaseLevel extends BaseBusinessClass
{
return HELPER_ReportHeader.toObject (getReportHeader ());
}
else if (attribName.equals (FIELD_AppliedToExpress))
{
return HELPER_AppliedToExpress.toObject (getAppliedToExpress ());
}
else if (attribName.equals (FIELD_CSSClass))
{
return HELPER_CSSClass.toObject (getCSSClass ());
}
else if (attribName.equals (FIELD_Enabled))
{
return HELPER_Enabled.toObject (getEnabled ());
}
else
{
return super.getAttribute (attribName);
......@@ -2418,6 +2904,18 @@ public abstract class BaseLevel extends BaseBusinessClass
{
return HELPER_ReportHeader;
}
else if (attribName.equals (FIELD_AppliedToExpress))
{
return HELPER_AppliedToExpress;
}
else if (attribName.equals (FIELD_CSSClass))
{
return HELPER_CSSClass;
}
else if (attribName.equals (FIELD_Enabled))
{
return HELPER_Enabled;
}
else
{
return super.getAttributeHelper (attribName);
......@@ -2443,6 +2941,18 @@ public abstract class BaseLevel extends BaseBusinessClass
{
setReportHeader ((String)(HELPER_ReportHeader.fromObject (_ReportHeader, attribValue)));
}
else if (attribName.equals (FIELD_AppliedToExpress))
{
setAppliedToExpress ((Boolean)(HELPER_AppliedToExpress.fromObject (_AppliedToExpress, attribValue)));
}
else if (attribName.equals (FIELD_CSSClass))
{
setCSSClass ((String)(HELPER_CSSClass.fromObject (_CSSClass, attribValue)));
}
else if (attribName.equals (FIELD_Enabled))
{
setEnabled ((Boolean)(HELPER_Enabled.fromObject (_Enabled, attribValue)));
}
else
{
super.setAttribute (attribName, attribValue);
......@@ -2475,6 +2985,18 @@ public abstract class BaseLevel extends BaseBusinessClass
{
return getWriteability_ReportHeader ();
}
else if (fieldName.equals (FIELD_AppliedToExpress))
{
return getWriteability_AppliedToExpress ();
}
else if (fieldName.equals (FIELD_CSSClass))
{
return getWriteability_CSSClass ();
}
else if (fieldName.equals (FIELD_Enabled))
{
return getWriteability_Enabled ();
}
else if (fieldName.equals (MULTIPLEREFERENCE_Factors))
{
return getWriteability_Factors ();
......@@ -2532,6 +3054,21 @@ public abstract class BaseLevel extends BaseBusinessClass
fields.add (FIELD_ReportHeader);
}
if (getWriteability_AppliedToExpress () != FieldWriteability.TRUE)
{
fields.add (FIELD_AppliedToExpress);
}
if (getWriteability_CSSClass () != FieldWriteability.TRUE)
{
fields.add (FIELD_CSSClass);
}
if (getWriteability_Enabled () != FieldWriteability.TRUE)
{
fields.add (FIELD_Enabled);
}
super.putUnwriteable (fields);
}
......@@ -2544,6 +3081,9 @@ public abstract class BaseLevel extends BaseBusinessClass
result.add(HELPER_LevelDescription.getAttribObject (getClass (), _LevelDescription, false, FIELD_LevelDescription));
result.add(HELPER_LevelNotes.getAttribObject (getClass (), _LevelNotes, false, FIELD_LevelNotes));
result.add(HELPER_ReportHeader.getAttribObject (getClass (), _ReportHeader, false, FIELD_ReportHeader));
result.add(HELPER_AppliedToExpress.getAttribObject (getClass (), _AppliedToExpress, false, FIELD_AppliedToExpress));
result.add(HELPER_CSSClass.getAttribObject (getClass (), _CSSClass, false, FIELD_CSSClass));
result.add(HELPER_Enabled.getAttribObject (getClass (), _Enabled, false, FIELD_Enabled));
return result;
}
......@@ -2648,6 +3188,60 @@ public abstract class BaseLevel extends BaseBusinessClass
return newReportHeader;
}
/**
* Get the attribute AppliedToExpress
*/
public Boolean getAppliedToExpress (Level obj, Boolean original)
{
return original;
}
/**
* Change the value set for attribute AppliedToExpress.
* May modify the field beforehand
* Occurs before validation.
*/
public Boolean setAppliedToExpress (Level obj, Boolean newAppliedToExpress) throws FieldException
{
return newAppliedToExpress;
}
/**
* Get the attribute CSSClass
*/
public String getCSSClass (Level obj, String original)
{
return original;
}
/**
* Change the value set for attribute CSSClass.
* May modify the field beforehand
* Occurs before validation.
*/
public String setCSSClass (Level obj, String newCSSClass) throws FieldException
{
return newCSSClass;
}
/**
* Get the attribute Enabled
*/
public Boolean getEnabled (Level obj, Boolean original)
{
return original;
}
/**
* Change the value set for attribute Enabled.
* May modify the field beforehand
* Occurs before validation.
*/
public Boolean setEnabled (Level obj, Boolean newEnabled) throws FieldException
{
return newEnabled;
}
}
......@@ -2744,6 +3338,18 @@ public abstract class BaseLevel extends BaseBusinessClass
{
return toReportHeader ();
}
if (name.equals ("AppliedToExpress"))
{
return toAppliedToExpress ();
}
if (name.equals ("CSSClass"))
{
return toCSSClass ();
}
if (name.equals ("Enabled"))
{
return toEnabled ();
}
return super.to(name);
......@@ -2755,6 +3361,12 @@ public abstract class BaseLevel extends BaseBusinessClass
public PipeLine<From, String> toLevelNotes () { return pipe(new ORMAttributePipe<Me, String>(FIELD_LevelNotes)); }
public PipeLine<From, String> toReportHeader () { return pipe(new ORMAttributePipe<Me, String>(FIELD_ReportHeader)); }
public PipeLine<From, Boolean> toAppliedToExpress () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_AppliedToExpress)); }
public PipeLine<From, String> toCSSClass () { return pipe(new ORMAttributePipe<Me, String>(FIELD_CSSClass)); }
public PipeLine<From, Boolean> toEnabled () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_Enabled)); }
public FactorLevelLink.FactorLevelLinkPipeLineFactory<From, FactorLevelLink> toFactors () { return toFactors(Filter.ALL); }
public FactorLevelLink.FactorLevelLinkPipeLineFactory<From, FactorLevelLink> toFactors (Filter<FactorLevelLink> filter)
......
......@@ -125,7 +125,7 @@ public abstract class BaseLevelClassCriteria extends BaseBusinessClass
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "weighting");
metaInfo.put ("mandatory", "true");
metaInfo.put ("mandatory", "false");
metaInfo.put ("name", "Importance");
metaInfo.put ("type", "Importance");
......@@ -271,7 +271,6 @@ public abstract class BaseLevelClassCriteria extends BaseBusinessClass
oldAndNewIdentical = HELPER_Importance.compare (_Importance, newImportance);
}
BusinessObjectParser.assertFieldCondition (newImportance != null, this, FIELD_Importance, "mandatory");
if (FIELD_Importance_Validators.length > 0)
......@@ -1241,7 +1240,7 @@ public abstract class BaseLevelClassCriteria extends BaseBusinessClass
List result = super.getAttributes ();
result.add(HELPER_Importance.getAttribObject (getClass (), _Importance, true, FIELD_Importance));
result.add(HELPER_Importance.getAttribObject (getClass (), _Importance, false, FIELD_Importance));
result.add(HELPER_FactorClass.getAttribObject (getClass (), _FactorClass, true, FIELD_FactorClass));
return result;
......
......@@ -40,6 +40,8 @@ public abstract class BaseQuestion extends BaseBusinessClass
public static final String FIELD_Description = "Description";
public static final String FIELD_IsRightQuestion = "IsRightQuestion";
public static final String FIELD_IsExpressQuestion = "IsExpressQuestion";
public static final String FIELD_InnerSortOrder = "InnerSortOrder";
public static final String SINGLEREFERENCE_Section = "Section";
public static final String BACKREF_Section = "";
public static final String SINGLEREFERENCE_RightQuestion = "RightQuestion";
......@@ -58,11 +60,15 @@ public abstract class BaseQuestion extends BaseBusinessClass
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper<Question> HELPER_Description = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Question> HELPER_IsRightQuestion = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Question> HELPER_IsExpressQuestion = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Question> HELPER_InnerSortOrder = DefaultAttributeHelper.INSTANCE;
// Private attributes corresponding to business object data
private String _Description;
private Boolean _IsRightQuestion;
private Boolean _IsExpressQuestion;
private Integer _InnerSortOrder;
// Private attributes corresponding to single references
......@@ -82,6 +88,8 @@ public abstract class BaseQuestion extends BaseBusinessClass
// Arrays of validators for each attribute
private static final AttributeValidator[] FIELD_Description_Validators;
private static final AttributeValidator[] FIELD_IsRightQuestion_Validators;
private static final AttributeValidator[] FIELD_IsExpressQuestion_Validators;
private static final AttributeValidator[] FIELD_InnerSortOrder_Validators;
// Arrays of behaviour decorators
......@@ -107,6 +115,8 @@ public abstract class BaseQuestion extends BaseBusinessClass
setupAssocMetaData_HighLowFactor();
FIELD_Description_Validators = (AttributeValidator[])setupAttribMetaData_Description(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_IsRightQuestion_Validators = (AttributeValidator[])setupAttribMetaData_IsRightQuestion(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_IsExpressQuestion_Validators = (AttributeValidator[])setupAttribMetaData_IsExpressQuestion(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_InnerSortOrder_Validators = (AttributeValidator[])setupAttribMetaData_InnerSortOrder(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_Question.initialiseReference ();
......@@ -232,6 +242,44 @@ public abstract class BaseQuestion extends BaseBusinessClass
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_IsExpressQuestion(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "is_express_question");
metaInfo.put ("defaultValue", "Boolean.FALSE");
metaInfo.put ("name", "IsExpressQuestion");
metaInfo.put ("type", "Boolean");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.IsExpressQuestion:", metaInfo);
ATTRIBUTES_METADATA_Question.put (FIELD_IsExpressQuestion, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Question.class, "IsExpressQuestion", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.IsExpressQuestion:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_InnerSortOrder(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "inner_sort_order");
metaInfo.put ("defaultValue", "1");
metaInfo.put ("name", "InnerSortOrder");
metaInfo.put ("type", "Integer");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.InnerSortOrder:", metaInfo);
ATTRIBUTES_METADATA_Question.put (FIELD_InnerSortOrder, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Question.class, "InnerSortOrder", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.InnerSortOrder:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION
......@@ -261,6 +309,8 @@ public abstract class BaseQuestion extends BaseBusinessClass
_Description = (String)(HELPER_Description.initialise (_Description));
_IsRightQuestion = (Boolean)(Boolean.FALSE);
_IsExpressQuestion = (Boolean)(Boolean.FALSE);
_InnerSortOrder = (Integer)(1);
}
......@@ -491,6 +541,202 @@ public abstract class BaseQuestion extends BaseBusinessClass
}
}
/**
* Get the attribute IsExpressQuestion
*/
public Boolean getIsExpressQuestion ()
{
assertValid();
Boolean valToReturn = _IsExpressQuestion;
for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
{
valToReturn = bhd.getIsExpressQuestion ((Question)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 preIsExpressQuestionChange (Boolean newIsExpressQuestion) 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 postIsExpressQuestionChange () throws FieldException
{
}
public FieldWriteability getWriteability_IsExpressQuestion ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute IsExpressQuestion. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setIsExpressQuestion (Boolean newIsExpressQuestion) throws FieldException
{
boolean oldAndNewIdentical = HELPER_IsExpressQuestion.compare (_IsExpressQuestion, newIsExpressQuestion);
try
{
for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
{
newIsExpressQuestion = bhd.setIsExpressQuestion ((Question)this, newIsExpressQuestion);
oldAndNewIdentical = HELPER_IsExpressQuestion.compare (_IsExpressQuestion, newIsExpressQuestion);
}
if (FIELD_IsExpressQuestion_Validators.length > 0)
{
Object newIsExpressQuestionObj = HELPER_IsExpressQuestion.toObject (newIsExpressQuestion);
if (newIsExpressQuestionObj != null)
{
int loopMax = FIELD_IsExpressQuestion_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_IsExpressQuestion);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_IsExpressQuestion_Validators[v].checkAttribute (this, FIELD_IsExpressQuestion, metadata, newIsExpressQuestionObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_IsExpressQuestion () != FieldWriteability.FALSE, "Field IsExpressQuestion is not writeable");
preIsExpressQuestionChange (newIsExpressQuestion);
markFieldChange (FIELD_IsExpressQuestion);
_IsExpressQuestion = newIsExpressQuestion;
postFieldChange (FIELD_IsExpressQuestion);
postIsExpressQuestionChange ();
}
}
/**
* Get the attribute InnerSortOrder
*/
public Integer getInnerSortOrder ()
{
assertValid();
Integer valToReturn = _InnerSortOrder;
for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
{
valToReturn = bhd.getInnerSortOrder ((Question)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 preInnerSortOrderChange (Integer newInnerSortOrder) 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 postInnerSortOrderChange () throws FieldException
{
}
public FieldWriteability getWriteability_InnerSortOrder ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute InnerSortOrder. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setInnerSortOrder (Integer newInnerSortOrder) throws FieldException
{
boolean oldAndNewIdentical = HELPER_InnerSortOrder.compare (_InnerSortOrder, newInnerSortOrder);
try
{
for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
{
newInnerSortOrder = bhd.setInnerSortOrder ((Question)this, newInnerSortOrder);
oldAndNewIdentical = HELPER_InnerSortOrder.compare (_InnerSortOrder, newInnerSortOrder);
}
if (FIELD_InnerSortOrder_Validators.length > 0)
{
Object newInnerSortOrderObj = HELPER_InnerSortOrder.toObject (newInnerSortOrder);
if (newInnerSortOrderObj != null)
{
int loopMax = FIELD_InnerSortOrder_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_InnerSortOrder);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_InnerSortOrder_Validators[v].checkAttribute (this, FIELD_InnerSortOrder, metadata, newInnerSortOrderObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_InnerSortOrder () != FieldWriteability.FALSE, "Field InnerSortOrder is not writeable");
preInnerSortOrderChange (newInnerSortOrder);
markFieldChange (FIELD_InnerSortOrder);
_InnerSortOrder = newInnerSortOrder;
postFieldChange (FIELD_InnerSortOrder);
postInnerSortOrderChange ();
}
}
/**
......@@ -1418,6 +1664,8 @@ public abstract class BaseQuestion extends BaseBusinessClass
tl_quest_linPSet.setAttrib (FIELD_ObjectID, myID);
tl_quest_linPSet.setAttrib (FIELD_Description, HELPER_Description.toObject (_Description)); //
tl_quest_linPSet.setAttrib (FIELD_IsRightQuestion, HELPER_IsRightQuestion.toObject (_IsRightQuestion)); //
tl_quest_linPSet.setAttrib (FIELD_IsExpressQuestion, HELPER_IsExpressQuestion.toObject (_IsExpressQuestion)); //
tl_quest_linPSet.setAttrib (FIELD_InnerSortOrder, HELPER_InnerSortOrder.toObject (_InnerSortOrder)); //
_Section.getPersistentSets (allSets);
_RightQuestion.getPersistentSets (allSets);
_HighLowFactor.getPersistentSets (allSets);
......@@ -1437,6 +1685,8 @@ public abstract class BaseQuestion extends BaseBusinessClass
_Description = (String)(HELPER_Description.fromObject (_Description, tl_quest_linPSet.getAttrib (FIELD_Description))); //
_IsRightQuestion = (Boolean)(HELPER_IsRightQuestion.fromObject (_IsRightQuestion, tl_quest_linPSet.getAttrib (FIELD_IsRightQuestion))); //
_IsExpressQuestion = (Boolean)(HELPER_IsExpressQuestion.fromObject (_IsExpressQuestion, tl_quest_linPSet.getAttrib (FIELD_IsExpressQuestion))); //
_InnerSortOrder = (Integer)(HELPER_InnerSortOrder.fromObject (_InnerSortOrder, tl_quest_linPSet.getAttrib (FIELD_InnerSortOrder))); //
_Section.setFromPersistentSets (objectID, allSets);
_RightQuestion.setFromPersistentSets (objectID, allSets);
_HighLowFactor.setFromPersistentSets (objectID, allSets);
......@@ -1473,6 +1723,24 @@ public abstract class BaseQuestion extends BaseBusinessClass
e.addException (ex);
}
try
{
setIsExpressQuestion (otherQuestion.getIsExpressQuestion ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setInnerSortOrder (otherQuestion.getInnerSortOrder ());
}
catch (FieldException ex)
{
e.addException (ex);
}
}
}
......@@ -1490,6 +1758,8 @@ public abstract class BaseQuestion extends BaseBusinessClass
_Description = sourceQuestion._Description;
_IsRightQuestion = sourceQuestion._IsRightQuestion;
_IsExpressQuestion = sourceQuestion._IsExpressQuestion;
_InnerSortOrder = sourceQuestion._InnerSortOrder;
}
}
......@@ -1549,6 +1819,8 @@ public abstract class BaseQuestion extends BaseBusinessClass
_Description = (String)(HELPER_Description.readExternal (_Description, vals.get(FIELD_Description))); //
_IsRightQuestion = (Boolean)(HELPER_IsRightQuestion.readExternal (_IsRightQuestion, vals.get(FIELD_IsRightQuestion))); //
_IsExpressQuestion = (Boolean)(HELPER_IsExpressQuestion.readExternal (_IsExpressQuestion, vals.get(FIELD_IsExpressQuestion))); //
_InnerSortOrder = (Integer)(HELPER_InnerSortOrder.readExternal (_InnerSortOrder, vals.get(FIELD_InnerSortOrder))); //
_Section.readExternalData(vals.get(SINGLEREFERENCE_Section));
_RightQuestion.readExternalData(vals.get(SINGLEREFERENCE_RightQuestion));
_HighLowFactor.readExternalData(vals.get(SINGLEREFERENCE_HighLowFactor));
......@@ -1567,6 +1839,8 @@ public abstract class BaseQuestion extends BaseBusinessClass
vals.put (FIELD_Description, HELPER_Description.writeExternal (_Description));
vals.put (FIELD_IsRightQuestion, HELPER_IsRightQuestion.writeExternal (_IsRightQuestion));
vals.put (FIELD_IsExpressQuestion, HELPER_IsExpressQuestion.writeExternal (_IsExpressQuestion));
vals.put (FIELD_InnerSortOrder, HELPER_InnerSortOrder.writeExternal (_InnerSortOrder));
vals.put (SINGLEREFERENCE_Section, _Section.writeExternalData());
vals.put (SINGLEREFERENCE_RightQuestion, _RightQuestion.writeExternalData());
vals.put (SINGLEREFERENCE_HighLowFactor, _HighLowFactor.writeExternalData());
......@@ -1593,6 +1867,14 @@ public abstract class BaseQuestion extends BaseBusinessClass
{
listener.notifyFieldChange(this, other, FIELD_IsRightQuestion, HELPER_IsRightQuestion.toObject(this._IsRightQuestion), HELPER_IsRightQuestion.toObject(otherQuestion._IsRightQuestion));
}
if (!HELPER_IsExpressQuestion.compare(this._IsExpressQuestion, otherQuestion._IsExpressQuestion))
{
listener.notifyFieldChange(this, other, FIELD_IsExpressQuestion, HELPER_IsExpressQuestion.toObject(this._IsExpressQuestion), HELPER_IsExpressQuestion.toObject(otherQuestion._IsExpressQuestion));
}
if (!HELPER_InnerSortOrder.compare(this._InnerSortOrder, otherQuestion._InnerSortOrder))
{
listener.notifyFieldChange(this, other, FIELD_InnerSortOrder, HELPER_InnerSortOrder.toObject(this._InnerSortOrder), HELPER_InnerSortOrder.toObject(otherQuestion._InnerSortOrder));
}
// Compare single assocs
_Section.compare (otherQuestion._Section, listener);
......@@ -1622,6 +1904,8 @@ public abstract class BaseQuestion extends BaseBusinessClass
visitor.visitField(this, FIELD_Description, HELPER_Description.toObject(getDescription()));
visitor.visitField(this, FIELD_IsRightQuestion, HELPER_IsRightQuestion.toObject(getIsRightQuestion()));
visitor.visitField(this, FIELD_IsExpressQuestion, HELPER_IsExpressQuestion.toObject(getIsExpressQuestion()));
visitor.visitField(this, FIELD_InnerSortOrder, HELPER_InnerSortOrder.toObject(getInnerSortOrder()));
visitor.visitAssociation (_Section);
visitor.visitAssociation (_RightQuestion);
visitor.visitAssociation (_HighLowFactor);
......@@ -1688,6 +1972,14 @@ public abstract class BaseQuestion extends BaseBusinessClass
{
return filter.matches (getIsRightQuestion ());
}
else if (attribName.equals (FIELD_IsExpressQuestion))
{
return filter.matches (getIsExpressQuestion ());
}
else if (attribName.equals (FIELD_InnerSortOrder))
{
return filter.matches (getInnerSortOrder ());
}
else if (attribName.equals (SINGLEREFERENCE_Section))
{
return filter.matches (getSection ());
......@@ -1743,6 +2035,18 @@ public abstract class BaseQuestion extends BaseBusinessClass
return this;
}
public SearchAll andIsExpressQuestion (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_quest_lin.is_express_question", "IsExpressQuestion");
return this;
}
public SearchAll andInnerSortOrder (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_quest_lin.inner_sort_order", "InnerSortOrder");
return this;
}
public SearchAll andSection (QueryFilter<Section> filter)
{
filter.addFilter (context, "tl_quest_lin.section_number", "Section");
......@@ -1804,6 +2108,14 @@ public abstract class BaseQuestion extends BaseBusinessClass
{
return HELPER_IsRightQuestion.toObject (getIsRightQuestion ());
}
else if (attribName.equals (FIELD_IsExpressQuestion))
{
return HELPER_IsExpressQuestion.toObject (getIsExpressQuestion ());
}
else if (attribName.equals (FIELD_InnerSortOrder))
{
return HELPER_InnerSortOrder.toObject (getInnerSortOrder ());
}
else
{
return super.getAttribute (attribName);
......@@ -1825,6 +2137,14 @@ public abstract class BaseQuestion extends BaseBusinessClass
{
return HELPER_IsRightQuestion;
}
else if (attribName.equals (FIELD_IsExpressQuestion))
{
return HELPER_IsExpressQuestion;
}
else if (attribName.equals (FIELD_InnerSortOrder))
{
return HELPER_InnerSortOrder;
}
else
{
return super.getAttributeHelper (attribName);
......@@ -1846,6 +2166,14 @@ public abstract class BaseQuestion extends BaseBusinessClass
{
setIsRightQuestion ((Boolean)(HELPER_IsRightQuestion.fromObject (_IsRightQuestion, attribValue)));
}
else if (attribName.equals (FIELD_IsExpressQuestion))
{
setIsExpressQuestion ((Boolean)(HELPER_IsExpressQuestion.fromObject (_IsExpressQuestion, attribValue)));
}
else if (attribName.equals (FIELD_InnerSortOrder))
{
setInnerSortOrder ((Integer)(HELPER_InnerSortOrder.fromObject (_InnerSortOrder, attribValue)));
}
else
{
super.setAttribute (attribName, attribValue);
......@@ -1874,6 +2202,14 @@ public abstract class BaseQuestion extends BaseBusinessClass
{
return getWriteability_IsRightQuestion ();
}
else if (fieldName.equals (FIELD_IsExpressQuestion))
{
return getWriteability_IsExpressQuestion ();
}
else if (fieldName.equals (FIELD_InnerSortOrder))
{
return getWriteability_InnerSortOrder ();
}
else if (fieldName.equals (MULTIPLEREFERENCE_Factors))
{
return getWriteability_Factors ();
......@@ -1914,6 +2250,16 @@ public abstract class BaseQuestion extends BaseBusinessClass
fields.add (FIELD_IsRightQuestion);
}
if (getWriteability_IsExpressQuestion () != FieldWriteability.TRUE)
{
fields.add (FIELD_IsExpressQuestion);
}
if (getWriteability_InnerSortOrder () != FieldWriteability.TRUE)
{
fields.add (FIELD_InnerSortOrder);
}
super.putUnwriteable (fields);
}
......@@ -1925,6 +2271,8 @@ public abstract class BaseQuestion extends BaseBusinessClass
result.add(HELPER_Description.getAttribObject (getClass (), _Description, false, FIELD_Description));
result.add(HELPER_IsRightQuestion.getAttribObject (getClass (), _IsRightQuestion, false, FIELD_IsRightQuestion));
result.add(HELPER_IsExpressQuestion.getAttribObject (getClass (), _IsExpressQuestion, false, FIELD_IsExpressQuestion));
result.add(HELPER_InnerSortOrder.getAttribObject (getClass (), _InnerSortOrder, false, FIELD_InnerSortOrder));
return result;
}
......@@ -2011,6 +2359,42 @@ public abstract class BaseQuestion extends BaseBusinessClass
return newIsRightQuestion;
}
/**
* Get the attribute IsExpressQuestion
*/
public Boolean getIsExpressQuestion (Question obj, Boolean original)
{
return original;
}
/**
* Change the value set for attribute IsExpressQuestion.
* May modify the field beforehand
* Occurs before validation.
*/
public Boolean setIsExpressQuestion (Question obj, Boolean newIsExpressQuestion) throws FieldException
{
return newIsExpressQuestion;
}
/**
* Get the attribute InnerSortOrder
*/
public Integer getInnerSortOrder (Question obj, Integer original)
{
return original;
}
/**
* Change the value set for attribute InnerSortOrder.
* May modify the field beforehand
* Occurs before validation.
*/
public Integer setInnerSortOrder (Question obj, Integer newInnerSortOrder) throws FieldException
{
return newInnerSortOrder;
}
}
......@@ -2079,6 +2463,14 @@ public abstract class BaseQuestion extends BaseBusinessClass
{
return toIsRightQuestion ();
}
if (name.equals ("IsExpressQuestion"))
{
return toIsExpressQuestion ();
}
if (name.equals ("InnerSortOrder"))
{
return toInnerSortOrder ();
}
if (name.equals ("Section"))
{
return toSection ();
......@@ -2100,6 +2492,10 @@ public abstract class BaseQuestion extends BaseBusinessClass
public PipeLine<From, String> toDescription () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Description)); }
public PipeLine<From, Boolean> toIsRightQuestion () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsRightQuestion)); }
public PipeLine<From, Boolean> toIsExpressQuestion () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsExpressQuestion)); }
public PipeLine<From, Integer> toInnerSortOrder () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_InnerSortOrder)); }
public Section.SectionPipeLineFactory<From, Section> toSection () { return toSection (Filter.ALL); }
public Section.SectionPipeLineFactory<From, Section> toSection (Filter<Section> filter)
......
package performa.orm;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.Comparator;
......@@ -18,7 +17,8 @@ import oneit.utils.CollectionUtils;
import oneit.utils.DateDiff;
import oneit.utils.ObjectTransform;
import oneit.utils.StringUtils;
import oneit.utils.filter.Filter;
import oneit.utils.filter.*;
import performa.utils.ExpressAnswerFilter;
public class Candidate extends BaseCandidate
......@@ -109,6 +109,10 @@ public class Candidate extends BaseCandidate
return false;
}
public Collection<Answer> getCompletedAnswers(Job job)
{
return CollectionFilter.filter(getProfileAssessmentAnswersSet(), new ExpressAnswerFilter(job.isExpressJob()));
}
public boolean assessmentCompleted(Job job) //role
{
......@@ -116,12 +120,10 @@ public class Candidate extends BaseCandidate
if(allAnswersCount > 0)
{
Filter filter = Answer.SearchByAll().andAnswerNo(new IsNotNullFilter<>());
Collection selectedAnswers = pipelineCandidate().toProfileAssessmentAnswers(filter).vals();
Collection selectedAnswers = getCompletedAnswers(job);
return (selectedAnswers.size() >= allAnswersCount);
}
return false;
}
......
......@@ -20,18 +20,20 @@
<TABLE name="tl_company" tablePrefix="object">
<ATTRIB name="CompanyName" type="String" dbcol="company_name" mandatory="true" length="100" />
<ATTRIB name="CompanyLogo" type="BinaryContent" dbcol="company_logo" mandatory="false" binaryHandler="loggedin" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE" />
<ATTRIB name="HiringTeamType" type="HiringTeamType" dbcol="hiring_team_type" mandatory="false" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="Industry" type="Industry" dbcol="industry" mandatory="false" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="TimeZone" type="TimeZone" dbcol="time_zone" mandatory="false" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="IsVerified" type="Boolean" dbcol="is_verified" defaultValue="Boolean.FALSE"/>
<ATTRIB name="State" type="State" dbcol="state" mandatory="false" defaultValue="State.WA" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="Country" type="Countries" dbcol="country" mandatory="false" defaultValue="Countries.AU" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="PostCode" type="String" dbcol="post_code" mandatory="false" length="10"/>
<ATTRIB name="City" type="String" dbcol="city" mandatory="false" length="100"/>
<ATTRIB name="HasClientSupport" type="Boolean" dbcol="has_client_support" mandatory="false" defaultValue="Boolean.FALSE"/>
<ATTRIB name="CompanyName" type="String" dbcol="company_name" mandatory="true" length="100" />
<ATTRIB name="CompanyLogo" type="BinaryContent" dbcol="company_logo" mandatory="false" binaryHandler="loggedin" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE" />
<ATTRIB name="HiringTeamType" type="HiringTeamType" dbcol="hiring_team_type" mandatory="false" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="Industry" type="Industry" dbcol="industry" mandatory="false" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="TimeZone" type="TimeZone" dbcol="time_zone" mandatory="false" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="IsVerified" type="Boolean" dbcol="is_verified" defaultValue="Boolean.FALSE"/>
<ATTRIB name="State" type="State" dbcol="state" mandatory="false" defaultValue="State.WA" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="Country" type="Countries" dbcol="country" mandatory="false" defaultValue="Countries.AU" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="PostCode" type="String" dbcol="post_code" mandatory="false" length="10"/>
<ATTRIB name="City" type="String" dbcol="city" mandatory="false" length="100"/>
<ATTRIB name="HasClientSupport" type="Boolean" dbcol="has_client_support" mandatory="false" defaultValue="Boolean.FALSE"/>
<ATTRIB name="StripeReference" type="String" dbcol="stripe_reference" length="100"/>
<ATTRIB name="StripeSubscription" type="String" dbcol="stripe_subscription" length="100"/>
<SINGLEREFERENCE name="AddedByUser" type="CompanyUser" dbcol="added_by_user_id" mandatory="true"/>
</TABLE>
......
......@@ -40,6 +40,8 @@ public class CompanyPersistenceMgr extends ObjectPersistenceMgr
private String dummyPostCode;
private String dummyCity;
private Boolean dummyHasClientSupport;
private String dummyStripeReference;
private String dummyStripeSubscription;
// Static constants corresponding to attribute helpers
......@@ -54,6 +56,8 @@ public class CompanyPersistenceMgr extends ObjectPersistenceMgr
private static final DefaultAttributeHelper HELPER_PostCode = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_City = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_HasClientSupport = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_StripeReference = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_StripeSubscription = DefaultAttributeHelper.INSTANCE;
......@@ -71,10 +75,12 @@ public class CompanyPersistenceMgr extends ObjectPersistenceMgr
dummyPostCode = (String)(HELPER_PostCode.initialise (dummyPostCode));
dummyCity = (String)(HELPER_City.initialise (dummyCity));
dummyHasClientSupport = (Boolean)(HELPER_HasClientSupport.initialise (dummyHasClientSupport));
dummyStripeReference = (String)(HELPER_StripeReference.initialise (dummyStripeReference));
dummyStripeSubscription = (String)(HELPER_StripeSubscription.initialise (dummyStripeSubscription));
}
private String SELECT_COLUMNS = "{PREFIX}tl_company.object_id as id, {PREFIX}tl_company.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_company.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_company.company_name, {PREFIX}tl_company.company_logo, {PREFIX}tl_company.hiring_team_type, {PREFIX}tl_company.industry, {PREFIX}tl_company.time_zone, {PREFIX}tl_company.is_verified, {PREFIX}tl_company.state, {PREFIX}tl_company.country, {PREFIX}tl_company.post_code, {PREFIX}tl_company.city, {PREFIX}tl_company.has_client_support, {PREFIX}tl_company.added_by_user_id, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}tl_company.object_id as id, {PREFIX}tl_company.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_company.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_company.company_name, {PREFIX}tl_company.company_logo, {PREFIX}tl_company.hiring_team_type, {PREFIX}tl_company.industry, {PREFIX}tl_company.time_zone, {PREFIX}tl_company.is_verified, {PREFIX}tl_company.state, {PREFIX}tl_company.country, {PREFIX}tl_company.post_code, {PREFIX}tl_company.city, {PREFIX}tl_company.has_client_support, {PREFIX}tl_company.stripe_reference, {PREFIX}tl_company.stripe_subscription, {PREFIX}tl_company.added_by_user_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -136,6 +142,8 @@ public class CompanyPersistenceMgr extends ObjectPersistenceMgr
!tl_companyPSet.containsAttrib(Company.FIELD_PostCode)||
!tl_companyPSet.containsAttrib(Company.FIELD_City)||
!tl_companyPSet.containsAttrib(Company.FIELD_HasClientSupport)||
!tl_companyPSet.containsAttrib(Company.FIELD_StripeReference)||
!tl_companyPSet.containsAttrib(Company.FIELD_StripeSubscription)||
!tl_companyPSet.containsAttrib(Company.SINGLEREFERENCE_AddedByUser))
{
// We will need to retrieve it
......@@ -206,10 +214,10 @@ public class CompanyPersistenceMgr extends ObjectPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_company " +
"SET company_name = ?, company_logo = ?, hiring_team_type = ?, industry = ?, time_zone = ?, is_verified = ?, state = ?, country = ?, post_code = ?, city = ?, has_client_support = ?, added_by_user_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET company_name = ?, company_logo = ?, hiring_team_type = ?, industry = ?, time_zone = ?, is_verified = ?, state = ?, country = ?, post_code = ?, city = ?, has_client_support = ?, stripe_reference = ?, stripe_subscription = ?, added_by_user_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_company.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_CompanyName.getForSQL(dummyCompanyName, tl_companyPSet.getAttrib (Company.FIELD_CompanyName))).listEntry (HELPER_CompanyLogo.getForSQL(dummyCompanyLogo, tl_companyPSet.getAttrib (Company.FIELD_CompanyLogo))).listEntry (HELPER_HiringTeamType.getForSQL(dummyHiringTeamType, tl_companyPSet.getAttrib (Company.FIELD_HiringTeamType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_companyPSet.getAttrib (Company.FIELD_Industry))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_companyPSet.getAttrib (Company.FIELD_TimeZone))).listEntry (HELPER_IsVerified.getForSQL(dummyIsVerified, tl_companyPSet.getAttrib (Company.FIELD_IsVerified))).listEntry (HELPER_State.getForSQL(dummyState, tl_companyPSet.getAttrib (Company.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_companyPSet.getAttrib (Company.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_companyPSet.getAttrib (Company.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_companyPSet.getAttrib (Company.FIELD_City))).listEntry (HELPER_HasClientSupport.getForSQL(dummyHasClientSupport, tl_companyPSet.getAttrib (Company.FIELD_HasClientSupport))).listEntry (SQLManager.CheckNull((Long)(tl_companyPSet.getAttrib (Company.SINGLEREFERENCE_AddedByUser)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_CompanyName.getForSQL(dummyCompanyName, tl_companyPSet.getAttrib (Company.FIELD_CompanyName))).listEntry (HELPER_CompanyLogo.getForSQL(dummyCompanyLogo, tl_companyPSet.getAttrib (Company.FIELD_CompanyLogo))).listEntry (HELPER_HiringTeamType.getForSQL(dummyHiringTeamType, tl_companyPSet.getAttrib (Company.FIELD_HiringTeamType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_companyPSet.getAttrib (Company.FIELD_Industry))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_companyPSet.getAttrib (Company.FIELD_TimeZone))).listEntry (HELPER_IsVerified.getForSQL(dummyIsVerified, tl_companyPSet.getAttrib (Company.FIELD_IsVerified))).listEntry (HELPER_State.getForSQL(dummyState, tl_companyPSet.getAttrib (Company.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_companyPSet.getAttrib (Company.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_companyPSet.getAttrib (Company.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_companyPSet.getAttrib (Company.FIELD_City))).listEntry (HELPER_HasClientSupport.getForSQL(dummyHasClientSupport, tl_companyPSet.getAttrib (Company.FIELD_HasClientSupport))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, tl_companyPSet.getAttrib (Company.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, tl_companyPSet.getAttrib (Company.FIELD_StripeSubscription))).listEntry (SQLManager.CheckNull((Long)(tl_companyPSet.getAttrib (Company.SINGLEREFERENCE_AddedByUser)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -476,6 +484,8 @@ public class CompanyPersistenceMgr extends ObjectPersistenceMgr
tl_companyPSet.setAttrib(Company.FIELD_PostCode, HELPER_PostCode.getFromRS(dummyPostCode, r, "post_code"));
tl_companyPSet.setAttrib(Company.FIELD_City, HELPER_City.getFromRS(dummyCity, r, "city"));
tl_companyPSet.setAttrib(Company.FIELD_HasClientSupport, HELPER_HasClientSupport.getFromRS(dummyHasClientSupport, r, "has_client_support"));
tl_companyPSet.setAttrib(Company.FIELD_StripeReference, HELPER_StripeReference.getFromRS(dummyStripeReference, r, "stripe_reference"));
tl_companyPSet.setAttrib(Company.FIELD_StripeSubscription, HELPER_StripeSubscription.getFromRS(dummyStripeSubscription, r, "stripe_subscription"));
tl_companyPSet.setAttrib(Company.SINGLEREFERENCE_AddedByUser, r.getObject ("added_by_user_id"));
......@@ -494,10 +504,10 @@ public class CompanyPersistenceMgr extends ObjectPersistenceMgr
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_company " +
" (company_name, company_logo, hiring_team_type, industry, time_zone, is_verified, state, country, post_code, city, has_client_support, added_by_user_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
" (company_name, company_logo, hiring_team_type, industry, time_zone, is_verified, state, country, post_code, city, has_client_support, stripe_reference, stripe_subscription, added_by_user_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_CompanyName.getForSQL(dummyCompanyName, tl_companyPSet.getAttrib (Company.FIELD_CompanyName))).listEntry (HELPER_CompanyLogo.getForSQL(dummyCompanyLogo, tl_companyPSet.getAttrib (Company.FIELD_CompanyLogo))).listEntry (HELPER_HiringTeamType.getForSQL(dummyHiringTeamType, tl_companyPSet.getAttrib (Company.FIELD_HiringTeamType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_companyPSet.getAttrib (Company.FIELD_Industry))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_companyPSet.getAttrib (Company.FIELD_TimeZone))).listEntry (HELPER_IsVerified.getForSQL(dummyIsVerified, tl_companyPSet.getAttrib (Company.FIELD_IsVerified))).listEntry (HELPER_State.getForSQL(dummyState, tl_companyPSet.getAttrib (Company.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_companyPSet.getAttrib (Company.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_companyPSet.getAttrib (Company.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_companyPSet.getAttrib (Company.FIELD_City))).listEntry (HELPER_HasClientSupport.getForSQL(dummyHasClientSupport, tl_companyPSet.getAttrib (Company.FIELD_HasClientSupport))) .listEntry (SQLManager.CheckNull((Long)(tl_companyPSet.getAttrib (Company.SINGLEREFERENCE_AddedByUser)))) .listEntry (objectID.longID ()).toList().toArray());
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_CompanyName.getForSQL(dummyCompanyName, tl_companyPSet.getAttrib (Company.FIELD_CompanyName))).listEntry (HELPER_CompanyLogo.getForSQL(dummyCompanyLogo, tl_companyPSet.getAttrib (Company.FIELD_CompanyLogo))).listEntry (HELPER_HiringTeamType.getForSQL(dummyHiringTeamType, tl_companyPSet.getAttrib (Company.FIELD_HiringTeamType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_companyPSet.getAttrib (Company.FIELD_Industry))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_companyPSet.getAttrib (Company.FIELD_TimeZone))).listEntry (HELPER_IsVerified.getForSQL(dummyIsVerified, tl_companyPSet.getAttrib (Company.FIELD_IsVerified))).listEntry (HELPER_State.getForSQL(dummyState, tl_companyPSet.getAttrib (Company.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_companyPSet.getAttrib (Company.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_companyPSet.getAttrib (Company.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_companyPSet.getAttrib (Company.FIELD_City))).listEntry (HELPER_HasClientSupport.getForSQL(dummyHasClientSupport, tl_companyPSet.getAttrib (Company.FIELD_HasClientSupport))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, tl_companyPSet.getAttrib (Company.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, tl_companyPSet.getAttrib (Company.FIELD_StripeSubscription))) .listEntry (SQLManager.CheckNull((Long)(tl_companyPSet.getAttrib (Company.SINGLEREFERENCE_AddedByUser)))) .listEntry (objectID.longID ()).toList().toArray());
tl_companyPSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
package performa.orm;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
......@@ -66,6 +69,9 @@ public class CompanyUser extends BaseCompanyUser
}
secUser.addRole(Utils.getRole(Utils.ROLE_COMPANY_ADMIN, getTransaction()));
setRoleTypes(RoleType.ADMIN);
removeRoleTypes(RoleType.STANDARD);
}
else if(getRole()==RoleType.STANDARD)
{
......@@ -75,12 +81,38 @@ public class CompanyUser extends BaseCompanyUser
}
secUser.addRole(Utils.getRole(Utils.ROLE_COMPANY_USER, getTransaction()));
setRoleTypes(RoleType.STANDARD);
removeRoleTypes(RoleType.ADMIN);
}
super.postRoleChange();
}
public void setRoleTypes(RoleType... roleType) throws FieldException
{
Set<RoleType> roles = getRoles() != null ? getRoles() : new HashSet();
roles.addAll(Arrays.asList(roleType));
setRoles(roles);
}
public void removeRoleTypes(RoleType... roleType) throws FieldException
{
Set<RoleType> roles = getRoles();
if(roles != null)
{
roles.removeAll(Arrays.asList(roleType));
setRoles(roles);
}
}
@Override
public FieldWriteability getWriteability_Role()
{
......
......@@ -13,14 +13,15 @@
<TABLE name="oneit_sec_user_extension" tablePrefix="object" polymorphic="TRUE">
<ATTRIB name="ForgotPasswordMailSendDate" type="Date" dbcol="forgot_password_mail_send_date" />
<ATTRIB name="ForgotPasswordKey" type="String" dbcol="forgot_password_key" length="10"/>
<ATTRIB name="Role" type="RoleType" dbcol="role_type" mandatory="false" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="Phone" type="String" dbcol="phone" mandatory="false" length="30" />
<ATTRIB name="VerificationMailSendDate" type="Date" dbcol="verification_mail_send_date" />
<ATTRIB name="VerificationKey" type="String" dbcol="verification_key" length="10"/>
<ATTRIB name="IsAccountVerified" type="Boolean" dbcol="is_account_verified" defaultValue="Boolean.FALSE"/>
<ATTRIB name="IsEmailChanged" type="Boolean" dbcol="is_email_changed" defaultValue="Boolean.FALSE"/>
<ATTRIB name="ForgotPasswordMailSendDate" type="Date" dbcol="forgot_password_mail_send_date" />
<ATTRIB name="ForgotPasswordKey" type="String" dbcol="forgot_password_key" length="10"/>
<ATTRIB name="Role" type="RoleType" dbcol="role_type" mandatory="false" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="Roles" type="Set&lt;RoleType&gt;" dbcol="roles" mandatory="false" attribHelper="DelimitedEnumsAttributeHelper" attribHelperInstance="new DelimitedEnumsAttributeHelper (RoleType.FACTORY_RoleType)"/>
<ATTRIB name="Phone" type="String" dbcol="phone" mandatory="false" length="30" />
<ATTRIB name="VerificationMailSendDate" type="Date" dbcol="verification_mail_send_date" />
<ATTRIB name="VerificationKey" type="String" dbcol="verification_key" length="10"/>
<ATTRIB name="IsAccountVerified" type="Boolean" dbcol="is_account_verified" defaultValue="Boolean.FALSE"/>
<ATTRIB name="IsEmailChanged" type="Boolean" dbcol="is_email_changed" defaultValue="Boolean.FALSE"/>
<SINGLEREFERENCE name="User" type="SecUser" dbcol="user_id" backreferenceName="Extensions" inSuper='TRUE'/>
<SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" backreferenceName="Users"/>
......
......@@ -31,6 +31,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
private Date dummyForgotPasswordMailSendDate;
private String dummyForgotPasswordKey;
private RoleType dummyRole;
private Set<RoleType> dummyRoles;
private String dummyPhone;
private Date dummyVerificationMailSendDate;
private String dummyVerificationKey;
......@@ -42,6 +43,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
private static final DefaultAttributeHelper HELPER_ForgotPasswordMailSendDate = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_ForgotPasswordKey = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_Role = new EnumeratedAttributeHelper (RoleType.FACTORY_RoleType);
private static final DelimitedEnumsAttributeHelper HELPER_Roles = new DelimitedEnumsAttributeHelper (RoleType.FACTORY_RoleType);
private static final DefaultAttributeHelper HELPER_Phone = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_VerificationMailSendDate = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_VerificationKey = DefaultAttributeHelper.INSTANCE;
......@@ -56,6 +58,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
dummyForgotPasswordMailSendDate = (Date)(HELPER_ForgotPasswordMailSendDate.initialise (dummyForgotPasswordMailSendDate));
dummyForgotPasswordKey = (String)(HELPER_ForgotPasswordKey.initialise (dummyForgotPasswordKey));
dummyRole = (RoleType)(HELPER_Role.initialise (dummyRole));
dummyRoles = (Set<RoleType>)(HELPER_Roles.initialise (dummyRoles));
dummyPhone = (String)(HELPER_Phone.initialise (dummyPhone));
dummyVerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.initialise (dummyVerificationMailSendDate));
dummyVerificationKey = (String)(HELPER_VerificationKey.initialise (dummyVerificationKey));
......@@ -64,7 +67,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
}
private String SELECT_COLUMNS = "{PREFIX}oneit_sec_user_extension.object_id as id, {PREFIX}oneit_sec_user_extension.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}oneit_sec_user_extension.object_CREATED_DATE as CREATED_DATE, {PREFIX}oneit_sec_user_extension.object_TYPE as OBJECT_TYPE, {PREFIX}oneit_sec_user_extension.forgot_password_mail_send_date, {PREFIX}oneit_sec_user_extension.forgot_password_key, {PREFIX}oneit_sec_user_extension.role_type, {PREFIX}oneit_sec_user_extension.phone, {PREFIX}oneit_sec_user_extension.verification_mail_send_date, {PREFIX}oneit_sec_user_extension.verification_key, {PREFIX}oneit_sec_user_extension.is_account_verified, {PREFIX}oneit_sec_user_extension.is_email_changed, {PREFIX}oneit_sec_user_extension.user_id, {PREFIX}oneit_sec_user_extension.company_id, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}oneit_sec_user_extension.object_id as id, {PREFIX}oneit_sec_user_extension.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}oneit_sec_user_extension.object_CREATED_DATE as CREATED_DATE, {PREFIX}oneit_sec_user_extension.object_TYPE as OBJECT_TYPE, {PREFIX}oneit_sec_user_extension.forgot_password_mail_send_date, {PREFIX}oneit_sec_user_extension.forgot_password_key, {PREFIX}oneit_sec_user_extension.role_type, {PREFIX}oneit_sec_user_extension.roles, {PREFIX}oneit_sec_user_extension.phone, {PREFIX}oneit_sec_user_extension.verification_mail_send_date, {PREFIX}oneit_sec_user_extension.verification_key, {PREFIX}oneit_sec_user_extension.is_account_verified, {PREFIX}oneit_sec_user_extension.is_email_changed, {PREFIX}oneit_sec_user_extension.user_id, {PREFIX}oneit_sec_user_extension.company_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -119,6 +122,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_ForgotPasswordMailSendDate)||
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_ForgotPasswordKey)||
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_Role)||
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_Roles)||
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_Phone)||
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_VerificationMailSendDate)||
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_VerificationKey)||
......@@ -224,10 +228,10 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}oneit_sec_user_extension " +
"SET forgot_password_mail_send_date = ?, forgot_password_key = ?, role_type = ?, phone = ?, verification_mail_send_date = ?, verification_key = ?, is_account_verified = ?, is_email_changed = ?, user_id = ? , company_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET forgot_password_mail_send_date = ?, forgot_password_key = ?, role_type = ?, roles = ?, phone = ?, verification_mail_send_date = ?, verification_key = ?, is_account_verified = ?, is_email_changed = ?, user_id = ? , company_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE oneit_sec_user_extension.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_ForgotPasswordMailSendDate.getForSQL(dummyForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordMailSendDate))).listEntry (HELPER_ForgotPasswordKey.getForSQL(dummyForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordKey))).listEntry (HELPER_Role.getForSQL(dummyRole, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Role))).listEntry (HELPER_Phone.getForSQL(dummyPhone, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Phone))).listEntry (HELPER_VerificationMailSendDate.getForSQL(dummyVerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationMailSendDate))).listEntry (HELPER_VerificationKey.getForSQL(dummyVerificationKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationKey))).listEntry (HELPER_IsAccountVerified.getForSQL(dummyIsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsAccountVerified))).listEntry (HELPER_IsEmailChanged.getForSQL(dummyIsEmailChanged, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsEmailChanged))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_User)))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_Company)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_ForgotPasswordMailSendDate.getForSQL(dummyForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordMailSendDate))).listEntry (HELPER_ForgotPasswordKey.getForSQL(dummyForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordKey))).listEntry (HELPER_Role.getForSQL(dummyRole, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Role))).listEntry (HELPER_Roles.getForSQL(dummyRoles, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Roles))).listEntry (HELPER_Phone.getForSQL(dummyPhone, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Phone))).listEntry (HELPER_VerificationMailSendDate.getForSQL(dummyVerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationMailSendDate))).listEntry (HELPER_VerificationKey.getForSQL(dummyVerificationKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationKey))).listEntry (HELPER_IsAccountVerified.getForSQL(dummyIsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsAccountVerified))).listEntry (HELPER_IsEmailChanged.getForSQL(dummyIsEmailChanged, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsEmailChanged))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_User)))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_Company)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -647,6 +651,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_ForgotPasswordMailSendDate, HELPER_ForgotPasswordMailSendDate.getFromRS(dummyForgotPasswordMailSendDate, r, "forgot_password_mail_send_date"));
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_ForgotPasswordKey, HELPER_ForgotPasswordKey.getFromRS(dummyForgotPasswordKey, r, "forgot_password_key"));
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_Role, HELPER_Role.getFromRS(dummyRole, r, "role_type"));
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_Roles, HELPER_Roles.getFromRS(dummyRoles, r, "roles"));
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_Phone, HELPER_Phone.getFromRS(dummyPhone, r, "phone"));
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.getFromRS(dummyVerificationMailSendDate, r, "verification_mail_send_date"));
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_VerificationKey, HELPER_VerificationKey.getFromRS(dummyVerificationKey, r, "verification_key"));
......@@ -671,10 +676,10 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}oneit_sec_user_extension " +
" (forgot_password_mail_send_date, forgot_password_key, role_type, phone, verification_mail_send_date, verification_key, is_account_verified, is_email_changed, user_id, company_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE, object_TYPE) " +
" (forgot_password_mail_send_date, forgot_password_key, role_type, roles, phone, verification_mail_send_date, verification_key, is_account_verified, is_email_changed, user_id, company_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE, object_TYPE) " +
"VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", ?)",
CollectionUtils.listEntry (HELPER_ForgotPasswordMailSendDate.getForSQL(dummyForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordMailSendDate))).listEntry (HELPER_ForgotPasswordKey.getForSQL(dummyForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordKey))).listEntry (HELPER_Role.getForSQL(dummyRole, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Role))).listEntry (HELPER_Phone.getForSQL(dummyPhone, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Phone))).listEntry (HELPER_VerificationMailSendDate.getForSQL(dummyVerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationMailSendDate))).listEntry (HELPER_VerificationKey.getForSQL(dummyVerificationKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationKey))).listEntry (HELPER_IsAccountVerified.getForSQL(dummyIsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsAccountVerified))).listEntry (HELPER_IsEmailChanged.getForSQL(dummyIsEmailChanged, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsEmailChanged))) .listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_User)))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_Company)))) .listEntry (objectID.longID ()).listEntry (context.getTag (obj)).toList().toArray());
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", ?)",
CollectionUtils.listEntry (HELPER_ForgotPasswordMailSendDate.getForSQL(dummyForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordMailSendDate))).listEntry (HELPER_ForgotPasswordKey.getForSQL(dummyForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordKey))).listEntry (HELPER_Role.getForSQL(dummyRole, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Role))).listEntry (HELPER_Roles.getForSQL(dummyRoles, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Roles))).listEntry (HELPER_Phone.getForSQL(dummyPhone, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Phone))).listEntry (HELPER_VerificationMailSendDate.getForSQL(dummyVerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationMailSendDate))).listEntry (HELPER_VerificationKey.getForSQL(dummyVerificationKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationKey))).listEntry (HELPER_IsAccountVerified.getForSQL(dummyIsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsAccountVerified))).listEntry (HELPER_IsEmailChanged.getForSQL(dummyIsEmailChanged, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsEmailChanged))) .listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_User)))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_Company)))) .listEntry (objectID.longID ()).listEntry (context.getTag (obj)).toList().toArray());
oneit_sec_user_extensionPSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
......@@ -162,9 +162,14 @@ public class Job extends BaseJob
return getAssessmentCriteraByType(criteria).size();
}
public boolean isExpressJob()
{
return getAssessmentType() == AssessmentType.EXPRESS;
}
public List<Question> getAllQuestions()
{
return Arrays.asList(Question.searchAll(getTransaction()));
return Arrays.asList(Question.SearchByAll().andIsExpressQuestion(new EqualsFilter(isExpressJob())).search(getTransaction()));
}
public List<Question> getAllLeftQuestions()
......@@ -178,8 +183,8 @@ public class Job extends BaseJob
Filter filter = Question.SearchByAll().andIsRightQuestion(new EqualsFilter<>(Boolean.FALSE));
return ObjstoreUtils.sort(CollectionFilter.filter(totalQuestions , filter),
new ObjectTransform[] {Question.pipesQuestion().toSection().toObjectID(), Question.pipesQuestion().toObjectID()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR, CollectionUtils.DEFAULT_COMPARATOR});
new ObjectTransform[] {Question.pipesQuestion().toSection().toObjectID(),Question.pipesQuestion().toInnerSortOrder(),Question.pipesQuestion().toObjectID()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR,CollectionUtils.DEFAULT_COMPARATOR,CollectionUtils.DEFAULT_COMPARATOR});
}
......@@ -195,17 +200,6 @@ public class Job extends BaseJob
}
public Level[] getAllLevels()
{
List<Level> levels = new ArrayList<>();
Utils.getLevelsForComprehensive(getTransaction()).stream().forEach((tuple) -> {
levels.add((Level)tuple.get0());
});
return levels.toArray(new Level[0]);
}
public int getNoOfCandidatesApplied()
{
return getNoOfCandidatesFor(ApplicationStatus.SUBMITTED, ApplicationStatus.SHORTLISTED, ApplicationStatus.UNSUITABLE);
......@@ -549,4 +543,27 @@ public class Job extends BaseJob
{
return LoopbackHTTP.getRemoteAccessURL("/j/" + (getShortenedURL() != null ? getShortenedURL().getCode() : ""));
}
public String getLevelClass(Level level)
{
if(!showLevelOption(level))
{
return "hide";
}
if(CollectionUtils.equals(level, getLevel()))
{
return "active";
}
return "";
}
public boolean showLevelOption(Level level)
{
if(isExpressJob())
{
return isTrue(level.getAppliedToExpress());
}
return !isTrue(level.getAppliedToExpress());
}
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ import oneit.utils.math.NullArith;
import oneit.utils.math.Rounding;
import oneit.utils.parsers.FieldException;
import performa.orm.types.*;
import performa.utils.AnalysisEngine;
import performa.utils.*;
public class JobApplication extends BaseJobApplication
......@@ -128,49 +128,6 @@ public class JobApplication extends BaseJobApplication
}
public boolean initAssessmentAnswers(List<Question> questions) throws StorageException, FieldException
{
boolean redirect = false;
List<Question> allQuestions = new ArrayList<>();
Candidate candidate = getCandidate();
for(Question question : questions)
{
allQuestions.add(question);
if(question.getRightQuestion() != null)
{
allQuestions.add(question.getRightQuestion());
}
}
for(Question question : allQuestions)
{
boolean available = false;
for(Answer answer : candidate.getProfileAssessmentAnswersSet())
{
if(question.equals(answer.getQuestion()))
{
available = true;
break;
}
}
if(!available)
{
Answer answer = Answer.createAnswer(getTransaction());
candidate.addToProfileAssessmentAnswers(answer);
answer.setQuestion(question);
redirect = true;
}
}
return redirect;
}
public Answer getAnswerForQuestion(Question question) throws FieldException
{
Filter filter = Answer.SearchByAll().andQuestion(new EqualsFilter<>(question));
......@@ -230,7 +187,7 @@ public class JobApplication extends BaseJobApplication
public int getActualQuestionNumber()
{
Filter<Answer> filter = Answer.SearchByAll().andAnswerNo(new NotEqualsFilter<>(0));
Filter<Answer> filter = new ExpressAnswerFilter(getJob().isExpressJob());
return getCandidate().pipelineCandidate().toProfileAssessmentAnswers(filter).uniqueVals().size() + 1;
}
......@@ -238,7 +195,7 @@ public class JobApplication extends BaseJobApplication
public int getQuestionNumber()
{
Filter<Answer> filter = Answer.SearchByAll().andAnswerNo(new NotEqualsFilter<>(0));
Filter<Answer> filter = new ExpressAnswerFilter(getJob().isExpressJob());
return getCandidate().pipelineCandidate().toProfileAssessmentAnswers(filter).uniqueVals().size()
- getCandidate().pipelineCandidate().toProfileAssessmentAnswers(filter).toQuestion().toRightQuestion().uniqueVals().size();
......@@ -330,7 +287,7 @@ public class JobApplication extends BaseJobApplication
for(FactorClass factorClass : getSortedFactorClasses())
{
if(roleScoreMap.get(factorClass) != null && roleScoreMap.get(factorClass).get0() > 0d)
if(getJob().isExpressJob() || (roleScoreMap.get(factorClass) != null && roleScoreMap.get(factorClass).get0() > 0d))
{
factorScoreDetails.put(factorClass, AnalysisEngine.getFactorScoreDetails(getCandidate(), getJob().getLevel(), factorClass));
}
......@@ -370,23 +327,27 @@ public class JobApplication extends BaseJobApplication
public String getRequirementFitColor()
{
long score = getRequirementFitScore();
Filter filter = AssessmentCriteria.SearchByAll().andImportance(new EqualsFilter<>(Importance.ESSENTIAL));
Collection<AssessmentCriteria> essentialRequirements = CollectionFilter.filter(getJob().getAssessmentCriteriasSet(), filter);
return hasFailedEssentialRequirements() ? "red-b" : (score >= 80 ? "green" : (score >= 60 ? "yellow" : "red-b"));
}
public Boolean hasFailedEssentialRequirements()
{
Filter filter = AssessmentCriteria.SearchByAll().andImportance(new EqualsFilter<>(Importance.ESSENTIAL));
Collection<AssessmentCriteria> essentialRequirements = CollectionFilter.filter(getJob().getAssessmentCriteriasSet(), filter);
if(essentialRequirements.size() > 0)
{
Filter negativeFilter = AssessmentCriteriaAnswer.SearchByAll().andAnswer(new EqualsFilter<>(Boolean.FALSE));
if(CollectionFilter.filter(getRequirementAnswersByImportance().getValuesForKey(Importance.ESSENTIAL), negativeFilter).size() > 0)
{
return "red-b";
}
return CollectionFilter.filter(getRequirementAnswersByImportance().getValuesForKey(Importance.ESSENTIAL), negativeFilter).size() > 0;
}
return score >= 80 ? "green" : (score >= 60 ? "yellow" : "red-b");
return Boolean.FALSE;
}
public Double getRoleFitPercentage()
{
return getRoleFit() != null && getRoleFit().get(null) != null ? ((Tuple.T3<Double, ColorCode, Double>)getRoleFit().get(null)).get2() : 0d;
......@@ -442,9 +403,9 @@ public class JobApplication extends BaseJobApplication
}
public Set<Answer> getCompletedAnswers()
public Collection<Answer> getCompletedAnswers()
{
return getCandidate().getProfileAssessmentAnswersSet();
return getCandidate().getCompletedAnswers(getJob());
}
......@@ -500,11 +461,12 @@ public class JobApplication extends BaseJobApplication
//to get remaining time for role test
public Integer getRoleTestRemainingTime()
{
int remainingTime = 20;
int totalTime = getJob() != null && getJob().getAssessmentType() != null ? getJob().getAssessmentType().getTotalTime() : 20; //Default to 20 as per current code
int remainingTime = totalTime;
if(assessmentCompleted())
{
remainingTime -= 20;
remainingTime -= totalTime;
}
else //partially completed test for role
{
......@@ -512,14 +474,14 @@ public class JobApplication extends BaseJobApplication
if(allAnswersCount > 0)
{
Filter filter = Answer.SearchByAll().andAnswerNo(new IsNotNullFilter<>());
Filter filter = new ExpressAnswerFilter(getJob().isExpressJob());
Collection selectedAnswers = getCandidate().pipelineCandidate().toProfileAssessmentAnswers(filter).vals();
if(selectedAnswers!=null && selectedAnswers.size()>0)
{
Double answerrate = NullArith.divide(selectedAnswers.size(), allAnswersCount);
remainingTime -= Rounding.roundDouble( NullArith.multiply(answerrate, 20), 0);
remainingTime -= Rounding.roundDouble(NullArith.multiply(answerrate, totalTime), 0);
}
}
}
......
package performa.orm;
import java.util.*;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.objstore.ObjectTransaction;
import oneit.objstore.rdbms.filters.*;
import oneit.objstore.utils.ObjstoreUtils;
import oneit.utils.*;
import oneit.utils.filter.*;
import performa.orm.types.AssessmentType;
import performa.orm.types.FactorClass;
......@@ -68,4 +70,15 @@ public class Level extends BaseLevel
new ObjectTransform[]{FactorScoreResult.pipesFactorScoreResult().toFromScore()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR});
}
public static Level[] getAllLevels(ObjectTransaction objTran)
{
return Level.SearchByAll().andEnabled(new EqualsFilter(Boolean.TRUE)).search(objTran);
}
public static Level[] getAllLevelsforAssessmentType(ObjectTransaction objTran, AssessmentType assessmentType)
{
return Level.SearchByAll().andEnabled(new EqualsFilter(Boolean.TRUE)).andAppliedToExpress(new EqualsFilter<>(assessmentType == AssessmentType.EXPRESS)).search(objTran);
}
}
\ No newline at end of file
......@@ -18,6 +18,9 @@
<ATTRIB name="LevelDescription" type="String" dbcol="level_desc" length="30"/>
<ATTRIB name="LevelNotes" type="String" dbcol="level_notes"/>
<ATTRIB name="ReportHeader" type="String" dbcol="rpt_hdr"/>
<ATTRIB name="AppliedToExpress" type="Boolean" dbcol="applied_to_express" defaultValue="Boolean.FALSE"/>
<ATTRIB name="CSSClass" type="String" dbcol="css_class" length="100"/>
<ATTRIB name="Enabled" type="Boolean" dbcol="enabled" defaultValue="Boolean.FALSE"/>
</TABLE>
......
......@@ -7,7 +7,7 @@
<TABLE name="tl_level_class_criteria" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Importance" type="Importance" dbcol="weighting" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<ATTRIB name="Importance" type="Importance" dbcol="weighting" attribHelper="EnumeratedAttributeHelper" mandatory="false"/> <!--Mandatory removed for newly added express data-->
<ATTRIB name="FactorClass" type="FactorClass" dbcol="class_code" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_number" backreferenceName="LevelClassCriterias"/>
......
......@@ -29,12 +29,18 @@ public class LevelPersistenceMgr extends ObjectPersistenceMgr
private String dummyLevelDescription;
private String dummyLevelNotes;
private String dummyReportHeader;
private Boolean dummyAppliedToExpress;
private String dummyCSSClass;
private Boolean dummyEnabled;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_LevelDescription = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_LevelNotes = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_ReportHeader = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_AppliedToExpress = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_CSSClass = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_Enabled = DefaultAttributeHelper.INSTANCE;
......@@ -44,10 +50,13 @@ public class LevelPersistenceMgr extends ObjectPersistenceMgr
dummyLevelDescription = (String)(HELPER_LevelDescription.initialise (dummyLevelDescription));
dummyLevelNotes = (String)(HELPER_LevelNotes.initialise (dummyLevelNotes));
dummyReportHeader = (String)(HELPER_ReportHeader.initialise (dummyReportHeader));
dummyAppliedToExpress = (Boolean)(HELPER_AppliedToExpress.initialise (dummyAppliedToExpress));
dummyCSSClass = (String)(HELPER_CSSClass.initialise (dummyCSSClass));
dummyEnabled = (Boolean)(HELPER_Enabled.initialise (dummyEnabled));
}
private String SELECT_COLUMNS = "{PREFIX}tl_level.object_id as id, {PREFIX}tl_level.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_level.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_level.level_desc, {PREFIX}tl_level.level_notes, {PREFIX}tl_level.rpt_hdr, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}tl_level.object_id as id, {PREFIX}tl_level.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_level.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_level.level_desc, {PREFIX}tl_level.level_notes, {PREFIX}tl_level.rpt_hdr, {PREFIX}tl_level.applied_to_express, {PREFIX}tl_level.css_class, {PREFIX}tl_level.enabled, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -100,7 +109,10 @@ public class LevelPersistenceMgr extends ObjectPersistenceMgr
if (false || !tl_levelPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_levelPSet.containsAttrib(Level.FIELD_LevelDescription)||
!tl_levelPSet.containsAttrib(Level.FIELD_LevelNotes)||
!tl_levelPSet.containsAttrib(Level.FIELD_ReportHeader))
!tl_levelPSet.containsAttrib(Level.FIELD_ReportHeader)||
!tl_levelPSet.containsAttrib(Level.FIELD_AppliedToExpress)||
!tl_levelPSet.containsAttrib(Level.FIELD_CSSClass)||
!tl_levelPSet.containsAttrib(Level.FIELD_Enabled))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
......@@ -170,10 +182,10 @@ public class LevelPersistenceMgr extends ObjectPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_level " +
"SET level_desc = ?, level_notes = ?, rpt_hdr = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET level_desc = ?, level_notes = ?, rpt_hdr = ?, applied_to_express = ?, css_class = ?, enabled = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_level.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_LevelDescription.getForSQL(dummyLevelDescription, tl_levelPSet.getAttrib (Level.FIELD_LevelDescription))).listEntry (HELPER_LevelNotes.getForSQL(dummyLevelNotes, tl_levelPSet.getAttrib (Level.FIELD_LevelNotes))).listEntry (HELPER_ReportHeader.getForSQL(dummyReportHeader, tl_levelPSet.getAttrib (Level.FIELD_ReportHeader))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_LevelDescription.getForSQL(dummyLevelDescription, tl_levelPSet.getAttrib (Level.FIELD_LevelDescription))).listEntry (HELPER_LevelNotes.getForSQL(dummyLevelNotes, tl_levelPSet.getAttrib (Level.FIELD_LevelNotes))).listEntry (HELPER_ReportHeader.getForSQL(dummyReportHeader, tl_levelPSet.getAttrib (Level.FIELD_ReportHeader))).listEntry (HELPER_AppliedToExpress.getForSQL(dummyAppliedToExpress, tl_levelPSet.getAttrib (Level.FIELD_AppliedToExpress))).listEntry (HELPER_CSSClass.getForSQL(dummyCSSClass, tl_levelPSet.getAttrib (Level.FIELD_CSSClass))).listEntry (HELPER_Enabled.getForSQL(dummyEnabled, tl_levelPSet.getAttrib (Level.FIELD_Enabled))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -481,6 +493,9 @@ public class LevelPersistenceMgr extends ObjectPersistenceMgr
tl_levelPSet.setAttrib(Level.FIELD_LevelDescription, HELPER_LevelDescription.getFromRS(dummyLevelDescription, r, "level_desc"));
tl_levelPSet.setAttrib(Level.FIELD_LevelNotes, HELPER_LevelNotes.getFromRS(dummyLevelNotes, r, "level_notes"));
tl_levelPSet.setAttrib(Level.FIELD_ReportHeader, HELPER_ReportHeader.getFromRS(dummyReportHeader, r, "rpt_hdr"));
tl_levelPSet.setAttrib(Level.FIELD_AppliedToExpress, HELPER_AppliedToExpress.getFromRS(dummyAppliedToExpress, r, "applied_to_express"));
tl_levelPSet.setAttrib(Level.FIELD_CSSClass, HELPER_CSSClass.getFromRS(dummyCSSClass, r, "css_class"));
tl_levelPSet.setAttrib(Level.FIELD_Enabled, HELPER_Enabled.getFromRS(dummyEnabled, r, "enabled"));
}
......@@ -498,10 +513,10 @@ public class LevelPersistenceMgr extends ObjectPersistenceMgr
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_level " +
" (level_desc, level_notes, rpt_hdr, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
" (level_desc, level_notes, rpt_hdr, applied_to_express, css_class, enabled, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_LevelDescription.getForSQL(dummyLevelDescription, tl_levelPSet.getAttrib (Level.FIELD_LevelDescription))).listEntry (HELPER_LevelNotes.getForSQL(dummyLevelNotes, tl_levelPSet.getAttrib (Level.FIELD_LevelNotes))).listEntry (HELPER_ReportHeader.getForSQL(dummyReportHeader, tl_levelPSet.getAttrib (Level.FIELD_ReportHeader))) .listEntry (objectID.longID ()).toList().toArray());
" (?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_LevelDescription.getForSQL(dummyLevelDescription, tl_levelPSet.getAttrib (Level.FIELD_LevelDescription))).listEntry (HELPER_LevelNotes.getForSQL(dummyLevelNotes, tl_levelPSet.getAttrib (Level.FIELD_LevelNotes))).listEntry (HELPER_ReportHeader.getForSQL(dummyReportHeader, tl_levelPSet.getAttrib (Level.FIELD_ReportHeader))).listEntry (HELPER_AppliedToExpress.getForSQL(dummyAppliedToExpress, tl_levelPSet.getAttrib (Level.FIELD_AppliedToExpress))).listEntry (HELPER_CSSClass.getForSQL(dummyCSSClass, tl_levelPSet.getAttrib (Level.FIELD_CSSClass))).listEntry (HELPER_Enabled.getForSQL(dummyEnabled, tl_levelPSet.getAttrib (Level.FIELD_Enabled))) .listEntry (objectID.longID ()).toList().toArray());
tl_levelPSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
......@@ -21,7 +21,11 @@ public class Question extends BaseQuestion
public QuestionType getQuestionType()
{
if(getSection() != null)
if(isTrue(getIsExpressQuestion()))
{
return QuestionType.SCALAR; //Express doesnt support Ipsative
}
else if(getSection() != null)
{
return getSection().getQuestionType();
}
......
......@@ -9,8 +9,10 @@
<TABLE name="tl_quest_lin" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Description" type="String" dbcol="description" length="80"/>
<ATTRIB name="IsRightQuestion" type="Boolean" dbcol="is_right_quest" defaultValue="Boolean.FALSE"/>
<ATTRIB name="Description" type="String" dbcol="description" length="80"/>
<ATTRIB name="IsRightQuestion" type="Boolean" dbcol="is_right_quest" defaultValue="Boolean.FALSE"/>
<ATTRIB name="IsExpressQuestion" type="Boolean" dbcol="is_express_question" defaultValue="Boolean.FALSE"/>
<ATTRIB name="InnerSortOrder" type="Integer" dbcol="inner_sort_order" defaultValue="1"/> <!-- Added mainly for express question PERSONAL VALUES section, question #1073 -->
<SINGLEREFERENCE name="Section" type="Section" dbcol="section_number" backreferenceName="Questions"/>
<SINGLEREFERENCE name="RightQuestion" type="Question" dbcol="right_quest_number" backreferenceName="LeftQuestions"/>
......
......@@ -28,11 +28,15 @@ public class QuestionPersistenceMgr extends ObjectPersistenceMgr
// Private attributes corresponding to business object data
private String dummyDescription;
private Boolean dummyIsRightQuestion;
private Boolean dummyIsExpressQuestion;
private Integer dummyInnerSortOrder;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_Description = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_IsRightQuestion = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_IsExpressQuestion = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_InnerSortOrder = DefaultAttributeHelper.INSTANCE;
......@@ -41,10 +45,12 @@ public class QuestionPersistenceMgr extends ObjectPersistenceMgr
{
dummyDescription = (String)(HELPER_Description.initialise (dummyDescription));
dummyIsRightQuestion = (Boolean)(HELPER_IsRightQuestion.initialise (dummyIsRightQuestion));
dummyIsExpressQuestion = (Boolean)(HELPER_IsExpressQuestion.initialise (dummyIsExpressQuestion));
dummyInnerSortOrder = (Integer)(HELPER_InnerSortOrder.initialise (dummyInnerSortOrder));
}
private String SELECT_COLUMNS = "{PREFIX}tl_quest_lin.object_id as id, {PREFIX}tl_quest_lin.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_quest_lin.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_quest_lin.description, {PREFIX}tl_quest_lin.is_right_quest, {PREFIX}tl_quest_lin.section_number, {PREFIX}tl_quest_lin.right_quest_number, {PREFIX}tl_quest_lin.high_low_factor_id, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}tl_quest_lin.object_id as id, {PREFIX}tl_quest_lin.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_quest_lin.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_quest_lin.description, {PREFIX}tl_quest_lin.is_right_quest, {PREFIX}tl_quest_lin.is_express_question, {PREFIX}tl_quest_lin.inner_sort_order, {PREFIX}tl_quest_lin.section_number, {PREFIX}tl_quest_lin.right_quest_number, {PREFIX}tl_quest_lin.high_low_factor_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -97,6 +103,8 @@ public class QuestionPersistenceMgr extends ObjectPersistenceMgr
if (false || !tl_quest_linPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_quest_linPSet.containsAttrib(Question.FIELD_Description)||
!tl_quest_linPSet.containsAttrib(Question.FIELD_IsRightQuestion)||
!tl_quest_linPSet.containsAttrib(Question.FIELD_IsExpressQuestion)||
!tl_quest_linPSet.containsAttrib(Question.FIELD_InnerSortOrder)||
!tl_quest_linPSet.containsAttrib(Question.SINGLEREFERENCE_Section)||
!tl_quest_linPSet.containsAttrib(Question.SINGLEREFERENCE_RightQuestion)||
!tl_quest_linPSet.containsAttrib(Question.SINGLEREFERENCE_HighLowFactor))
......@@ -199,10 +207,10 @@ public class QuestionPersistenceMgr extends ObjectPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_quest_lin " +
"SET description = ?, is_right_quest = ?, section_number = ? , right_quest_number = ? , high_low_factor_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET description = ?, is_right_quest = ?, is_express_question = ?, inner_sort_order = ?, section_number = ? , right_quest_number = ? , high_low_factor_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_quest_lin.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Description.getForSQL(dummyDescription, tl_quest_linPSet.getAttrib (Question.FIELD_Description))).listEntry (HELPER_IsRightQuestion.getForSQL(dummyIsRightQuestion, tl_quest_linPSet.getAttrib (Question.FIELD_IsRightQuestion))).listEntry (SQLManager.CheckNull((Long)(tl_quest_linPSet.getAttrib (Question.SINGLEREFERENCE_Section)))).listEntry (SQLManager.CheckNull((Long)(tl_quest_linPSet.getAttrib (Question.SINGLEREFERENCE_RightQuestion)))).listEntry (SQLManager.CheckNull((Long)(tl_quest_linPSet.getAttrib (Question.SINGLEREFERENCE_HighLowFactor)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_Description.getForSQL(dummyDescription, tl_quest_linPSet.getAttrib (Question.FIELD_Description))).listEntry (HELPER_IsRightQuestion.getForSQL(dummyIsRightQuestion, tl_quest_linPSet.getAttrib (Question.FIELD_IsRightQuestion))).listEntry (HELPER_IsExpressQuestion.getForSQL(dummyIsExpressQuestion, tl_quest_linPSet.getAttrib (Question.FIELD_IsExpressQuestion))).listEntry (HELPER_InnerSortOrder.getForSQL(dummyInnerSortOrder, tl_quest_linPSet.getAttrib (Question.FIELD_InnerSortOrder))).listEntry (SQLManager.CheckNull((Long)(tl_quest_linPSet.getAttrib (Question.SINGLEREFERENCE_Section)))).listEntry (SQLManager.CheckNull((Long)(tl_quest_linPSet.getAttrib (Question.SINGLEREFERENCE_RightQuestion)))).listEntry (SQLManager.CheckNull((Long)(tl_quest_linPSet.getAttrib (Question.SINGLEREFERENCE_HighLowFactor)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -460,6 +468,8 @@ public class QuestionPersistenceMgr extends ObjectPersistenceMgr
tl_quest_linPSet.setAttrib(Question.FIELD_Description, HELPER_Description.getFromRS(dummyDescription, r, "description"));
tl_quest_linPSet.setAttrib(Question.FIELD_IsRightQuestion, HELPER_IsRightQuestion.getFromRS(dummyIsRightQuestion, r, "is_right_quest"));
tl_quest_linPSet.setAttrib(Question.FIELD_IsExpressQuestion, HELPER_IsExpressQuestion.getFromRS(dummyIsExpressQuestion, r, "is_express_question"));
tl_quest_linPSet.setAttrib(Question.FIELD_InnerSortOrder, HELPER_InnerSortOrder.getFromRS(dummyInnerSortOrder, r, "inner_sort_order"));
tl_quest_linPSet.setAttrib(Question.SINGLEREFERENCE_Section, r.getObject ("section_number"));
tl_quest_linPSet.setAttrib(Question.SINGLEREFERENCE_RightQuestion, r.getObject ("right_quest_number"));
......@@ -480,10 +490,10 @@ public class QuestionPersistenceMgr extends ObjectPersistenceMgr
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_quest_lin " +
" (description, is_right_quest, section_number, right_quest_number, high_low_factor_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
" (description, is_right_quest, is_express_question, inner_sort_order, section_number, right_quest_number, high_low_factor_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Description.getForSQL(dummyDescription, tl_quest_linPSet.getAttrib (Question.FIELD_Description))).listEntry (HELPER_IsRightQuestion.getForSQL(dummyIsRightQuestion, tl_quest_linPSet.getAttrib (Question.FIELD_IsRightQuestion))) .listEntry (SQLManager.CheckNull((Long)(tl_quest_linPSet.getAttrib (Question.SINGLEREFERENCE_Section)))).listEntry (SQLManager.CheckNull((Long)(tl_quest_linPSet.getAttrib (Question.SINGLEREFERENCE_RightQuestion)))).listEntry (SQLManager.CheckNull((Long)(tl_quest_linPSet.getAttrib (Question.SINGLEREFERENCE_HighLowFactor)))) .listEntry (objectID.longID ()).toList().toArray());
" (?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Description.getForSQL(dummyDescription, tl_quest_linPSet.getAttrib (Question.FIELD_Description))).listEntry (HELPER_IsRightQuestion.getForSQL(dummyIsRightQuestion, tl_quest_linPSet.getAttrib (Question.FIELD_IsRightQuestion))).listEntry (HELPER_IsExpressQuestion.getForSQL(dummyIsExpressQuestion, tl_quest_linPSet.getAttrib (Question.FIELD_IsExpressQuestion))).listEntry (HELPER_InnerSortOrder.getForSQL(dummyInnerSortOrder, tl_quest_linPSet.getAttrib (Question.FIELD_InnerSortOrder))) .listEntry (SQLManager.CheckNull((Long)(tl_quest_linPSet.getAttrib (Question.SINGLEREFERENCE_Section)))).listEntry (SQLManager.CheckNull((Long)(tl_quest_linPSet.getAttrib (Question.SINGLEREFERENCE_RightQuestion)))).listEntry (SQLManager.CheckNull((Long)(tl_quest_linPSet.getAttrib (Question.SINGLEREFERENCE_HighLowFactor)))) .listEntry (objectID.longID ()).toList().toArray());
tl_quest_linPSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
......@@ -22,7 +22,7 @@ public class AssessmentType extends AbstractEnumerated
public static final AssessmentType COMPREHENSIVE = new AssessmentType ("COMPREHENSIVE", "COMPREHENSIVE", "Talentology Comprehensive", false);
public static final AssessmentType EXPRESS = new AssessmentType ("EXPRESS", "EXPRESS", "Talentology Express", true);
public static final AssessmentType EXPRESS = new AssessmentType ("EXPRESS", "EXPRESS", "Talentology Express", false);
private static final AssessmentType[] allAssessmentTypes =
new AssessmentType[] { COMPREHENSIVE,EXPRESS};
......@@ -33,9 +33,7 @@ public class AssessmentType extends AbstractEnumerated
return allAssessmentTypes;
}
private transient String HeaderDesc;
private transient String AdditionalDesc;
private transient Integer TotalTime;
private transient String QuestionDetails;
......@@ -46,14 +44,9 @@ public class AssessmentType extends AbstractEnumerated
super (name, value, description, disabled);
}
public String getHeaderDesc()
{
return HeaderDesc;
}
public String getAdditionalDesc()
public Integer getTotalTime()
{
return AdditionalDesc;
return TotalTime;
}
public String getQuestionDetails()
......@@ -133,13 +126,11 @@ public class AssessmentType extends AbstractEnumerated
public static void defineAdditionalData ()
{
COMPREHENSIVE.HeaderDesc = "";
COMPREHENSIVE.AdditionalDesc = "";
COMPREHENSIVE.TotalTime = 20;
COMPREHENSIVE.QuestionDetails = " (250 Questions - 20 Minutes)";
COMPREHENSIVE.TestDescr = "Comprehensive Assessment";
EXPRESS.HeaderDesc = "";
EXPRESS.AdditionalDesc = "";
EXPRESS.QuestionDetails = " (30 Questions - 5 Minutes)";
EXPRESS.TotalTime = 5;
EXPRESS.QuestionDetails = " (48 Questions - 5 Minutes)";
EXPRESS.TestDescr = "Express Assessment";
}
......@@ -168,8 +159,7 @@ public class AssessmentType extends AbstractEnumerated
{
Map attribs = new HashMap ();
attribs.put ("HeaderDesc", ArrayFormatter.toObject(getHeaderDesc()));
attribs.put ("AdditionalDesc", ArrayFormatter.toObject(getAdditionalDesc()));
attribs.put ("TotalTime", ArrayFormatter.toObject(getTotalTime()));
attribs.put ("QuestionDetails", ArrayFormatter.toObject(getQuestionDetails()));
attribs.put ("TestDescr", ArrayFormatter.toObject(getTestDescr()));
......
......@@ -3,18 +3,15 @@
<ROOT>
<CONSTANT package="performa.orm.types" name="AssessmentType">
<DATA name="HeaderDesc" type="String" />
<DATA name="AdditionalDesc" type="String" />
<DATA name="TotalTime" type="Integer" />
<DATA name="QuestionDetails" type="String" />
<DATA name="TestDescr" type="String" />
<VALUE name="COMPREHENSIVE" description="Talentology Comprehensive" HeaderDesc='""'
AdditionalDesc='""'
<VALUE name="COMPREHENSIVE" description="Talentology Comprehensive" TotalTime="20"
QuestionDetails='" (250 Questions - 20 Minutes)"'
TestDescr='"Comprehensive Assessment"'/>
<VALUE name="EXPRESS" description="Talentology Express" HeaderDesc='""' disabled="true"
AdditionalDesc='""'
QuestionDetails='" (30 Questions - 5 Minutes)"'
<VALUE name="EXPRESS" description="Talentology Express" TotalTime="5"
QuestionDetails='" (48 Questions - 5 Minutes)"'
TestDescr='"Express Assessment"'/>
</CONSTANT>
</ROOT>
\ No newline at end of file
......@@ -52,7 +52,7 @@ public class FactorClass extends AbstractEnumerated
public static final FactorClass ACTINTER = new FactorClass ("ACTINTER", "ACTINTER", "Act Interdependently", false);
public static final FactorClass INNOVSPIR = new FactorClass ("INNOVSPIR", "INNOVSPIR", "iNnovative Spirit", false);
public static final FactorClass INNOVSPIR = new FactorClass ("INNOVSPIR", "INNOVSPIR", "Innovative Spirit", false);
public static final FactorClass EMPATHRESP = new FactorClass ("EMPATHRESP", "EMPATHRESP", "Empathy & Respect", false);
......@@ -77,9 +77,17 @@ public class FactorClass extends AbstractEnumerated
public static final FactorClass SHOWADAP = new FactorClass ("SHOWADAP", "SHOWADAP", "Show Adaptability", false);
public static final FactorClass ENGINSP = new FactorClass ("ENGINSP", "ENGINSP", "Engage And Inspire", false);
public static final FactorClass INFLUENCING = new FactorClass ("INFLUENCING", "INFLUENCING", "Influencing", false);
public static final FactorClass CONSGRP = new FactorClass ("CONSGRP", "CONSGRP", "Conscientious Group", false);
public static final FactorClass EMOTSTAB = new FactorClass ("EMOTSTAB", "EMOTSTAB", "Emotional Stability", false);
public static final FactorClass SOCIALGRP = new FactorClass ("SOCIALGRP", "SOCIALGRP", "Social Group", false);
private static final FactorClass[] allFactorClasss =
new FactorClass[] { CARDRV,CONFL,COPING,INTPER,LEADINFL,NEGOT,OPER,PEOPLE,POWERINFL,PROBLEM,STRATEGIC,VALUES,WORKSTYLE,CONSISTENCY,HIGHQUAL,ACTINTER,INNOVSPIR,EMPATHRESP,LEADER,OTHERS,ANSSCALE,LEVINNOV,LEADCOUR,SOUNDDEC,DRVINNIT,FOSTCOMM,PROMCOLL,SHOWADAP,ENGINSP};
new FactorClass[] { CARDRV,CONFL,COPING,INTPER,LEADINFL,NEGOT,OPER,PEOPLE,POWERINFL,PROBLEM,STRATEGIC,VALUES,WORKSTYLE,CONSISTENCY,HIGHQUAL,ACTINTER,INNOVSPIR,EMPATHRESP,LEADER,OTHERS,ANSSCALE,LEVINNOV,LEADCOUR,SOUNDDEC,DRVINNIT,FOSTCOMM,PROMCOLL,SHOWADAP,ENGINSP,INFLUENCING,CONSGRP,EMOTSTAB,SOCIALGRP};
private static FactorClass[] getAllFactorClasss ()
......@@ -195,6 +203,10 @@ public class FactorClass extends AbstractEnumerated
PROMCOLL.SortOrder = 250;
SHOWADAP.SortOrder = 260;
ENGINSP.SortOrder = 270;
INFLUENCING.SortOrder = 280;
CONSGRP.SortOrder = 290;
EMOTSTAB.SortOrder = 300;
SOCIALGRP.SortOrder = 310;
}
......
......@@ -21,7 +21,7 @@
<VALUE name="CONSISTENCY" description="Consistency" SortOrder="100"/>
<VALUE name="HIGHQUAL" description="Highest Quality" SortOrder="110"/>
<VALUE name="ACTINTER" description="Act Interdependently" SortOrder="120"/>
<VALUE name="INNOVSPIR" description="iNnovative Spirit" SortOrder="130"/>
<VALUE name="INNOVSPIR" description="Innovative Spirit" SortOrder="130"/>
<VALUE name="EMPATHRESP" description="Empathy &amp; Respect" SortOrder="140"/>
<VALUE name="LEADER" description="Leadership" SortOrder="150"/>
<VALUE name="OTHERS" description="Other Factors" SortOrder="160"/>
......@@ -34,6 +34,10 @@
<VALUE name="PROMCOLL" description="Promote Collaboration and Team" SortOrder="250"/>
<VALUE name="SHOWADAP" description="Show Adaptability" SortOrder="260"/>
<VALUE name="ENGINSP" description="Engage And Inspire" SortOrder="270"/>
<VALUE name="INFLUENCING" description="Influencing" SortOrder="280"/>
<VALUE name="CONSGRP" description="Conscientious Group" SortOrder="290"/>
<VALUE name="EMOTSTAB" description="Emotional Stability" SortOrder="300"/>
<VALUE name="SOCIALGRP" description="Social Group" SortOrder="310"/>
</CONSTANT>
</ROOT>
\ No newline at end of file
......@@ -24,9 +24,13 @@ public class RoleType extends AbstractEnumerated
public static final RoleType ADMIN = new RoleType ("ADMIN", "ADMIN", "Admin", false);
public static final RoleType STANDARD = new RoleType ("STANDARD", "STANDARD", "Standard", false);
public static final RoleType OWNER = new RoleType ("OWNER", "OWNER", "Owner", false);
public static final RoleType BILLING = new RoleType ("BILLING", "BILLING", "Billing", false);
private static final RoleType[] allRoleTypes =
new RoleType[] { ADMIN,STANDARD};
new RoleType[] { ADMIN,STANDARD,OWNER,BILLING};
private static RoleType[] getAllRoleTypes ()
......
......@@ -6,6 +6,8 @@
<VALUE name="ADMIN" value="ADMIN" description="Admin"/>
<VALUE name="STANDARD" value="STANDARD" description="Standard"/>
<VALUE name="OWNER" value="OWNER" description="Owner"/>
<VALUE name="BILLING" value="BILLING" description="Billing"/>
</CONSTANT>
......
......@@ -20,7 +20,7 @@ public class AnalysisEngine
{
private static final Long MAX_VALID_FACTOR_NUMBER = 49L; //Don't consider unusally high/low answer factors i.e 50/51
public static void analyseAnswers(Candidate candidate, Level level, Set<Answer> answers) throws StorageException, FieldException
public static void analyseAnswers(Candidate candidate, Level level, Collection<Answer> answers) throws StorageException, FieldException
{
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "Inside AnalysisEngine --> analyseAnswers for candidate ", candidate, " Level ", level);
......@@ -213,8 +213,12 @@ public class AnalysisEngine
candidateClassScore.setClassScore(classScore);
candidateClassScore.setWghtdClassScore(wghtdclassScore);
candidateClassScore.setMaxWghtdClassScore(maxWghtdClassScore);
candidateClassScore.setColorCode(NullArith.lessThan(classScore, classNormalisation.getLeftMeanScore()) ? ColorCode.RED : (NullArith.lessThan(classScore, classNormalisation.getMeanScore()) ? ColorCode.AMBER : ColorCode.GREEN));
candidateClassScore.setWghtdColorCode(NullArith.lessThan(wghtdclassScore, classNormalisation.getWghtLeftMeanScore()) ? ColorCode.RED : (NullArith.lessThan(wghtdclassScore, classNormalisation.getWghtMeanScore()) ? ColorCode.AMBER : ColorCode.GREEN));
if(classNormalisation != null)
{
candidateClassScore.setColorCode(NullArith.lessThan(classScore, classNormalisation.getLeftMeanScore()) ? ColorCode.RED : (NullArith.lessThan(classScore, classNormalisation.getMeanScore()) ? ColorCode.AMBER : ColorCode.GREEN));
candidateClassScore.setWghtdColorCode(NullArith.lessThan(wghtdclassScore, classNormalisation.getWghtLeftMeanScore()) ? ColorCode.RED : (NullArith.lessThan(wghtdclassScore, classNormalisation.getWghtMeanScore()) ? ColorCode.AMBER : ColorCode.GREEN));
}
testAnalysis.addToCandidateClassScores(candidateClassScore);
}
}
......
package performa.utils;
import oneit.utils.filter.Filter;
import performa.orm.Answer;
/**
*
* @author Harsh
*/
public class ExpressAnswerFilter implements Filter<Answer>
{
private final boolean isExpressJob;
public ExpressAnswerFilter(boolean isExpressJob)
{
this.isExpressJob = isExpressJob;
}
@Override
public boolean accept(Answer answer)
{
if(answer != null && answer.getQuestion() != null)
{
return answer.getAnswerNo() != null && answer.getAnswerNo() != 0 && (answer.getQuestion().getIsExpressQuestion() == isExpressJob);
}
return false;
}
}
\ No newline at end of file
package performa.utils;
import com.stripe.Stripe;
import com.stripe.exception.APIConnectionException;
import com.stripe.exception.APIException;
import com.stripe.exception.AuthenticationException;
import com.stripe.exception.CardException;
import com.stripe.exception.InvalidRequestException;
import com.stripe.model.Customer;
import com.stripe.model.Plan;
import com.stripe.model.Subscription;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import oneit.appservices.config.ConfigMgr;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.logging.LoggingArea;
import oneit.objstore.StorageException;
import oneit.security.SecUser;
import oneit.utils.DateDiff;
import oneit.utils.parsers.FieldException;
import performa.orm.Company;
import performa.orm.CompanyUser;
public class StripeUtils
{
public static final String STRIPE_KEY = ConfigMgr.getKeyfileString("stripe.key","");
public static final String STRIPE_PUB_KEY = ConfigMgr.getKeyfileString("stripe.pubkey","");
public static final String STRIPE_PLAN_ID = ConfigMgr.getKeyfileString("stripe.plan.id","0001");
public static final String STRIPE_COUPON_ID = ConfigMgr.getKeyfileString("stripe.coupon.id","EAP");
static
{
Stripe.apiKey = STRIPE_KEY;
}
public static void createCustomer(CompanyUser companyUser) throws FieldException
{
try
{
Company company = companyUser.getCompany();
SecUser secUser = companyUser.getUser();
Map<String, Object> customerParams = new HashMap<>();
customerParams.put("description", company);
customerParams.put("email", secUser.getEmail());
Customer customer = Customer.create(customerParams);
company.setStripeReference(customer.getId());
}
catch (StorageException | AuthenticationException | InvalidRequestException | APIConnectionException | CardException | APIException ex)
{
LogMgr.log(LoggingArea.ALL, LogLevel.PROCESSING1, ex, "Error while creating a customer in stripe");
}
}
public static void subscribeCustomer(Company company) throws FieldException
{
try
{
Plan plan = Plan.retrieve(STRIPE_PLAN_ID);
Date today = new Date();
Date trialExpiry = DateDiff.add(today, Calendar.DATE, plan.getTrialPeriodDays());
Map<String, Object> item = new HashMap<>();
item.put("plan", STRIPE_PLAN_ID);
Map<String, Object> items = new HashMap<>();
items.put("0", item);
Map<String, Object> params = new HashMap<>();
params.put("items", items);
params.put("coupon", STRIPE_COUPON_ID);
params.put("customer", company.getStripeReference());
params.put("trial_end", trialExpiry.getTime() / 1000L);
Subscription subscription = Subscription.create(params);
company.setStripeSubscription(subscription.getId());
}
catch (StorageException | AuthenticationException | InvalidRequestException | APIConnectionException | CardException | APIException ex)
{
LogMgr.log(LoggingArea.ALL, LogLevel.PROCESSING1, ex, "Error while creating subscrition in stripe");
}
}
}
......@@ -40,13 +40,9 @@ public class Utils
public static final String PRIV_ACCESS_APPLICANT_PORTAL = "TL_AccessApplicantPortal";
public static final String PRIV_ACCESS_COMPANY_ADMIN = "TL_AccessCompanyAdmin";
public static final String PRIV_ACCESS_COMPANY = "TL_AccessCompany";
public static final String LEVEL_GENERAL_PURPOSE = "General Purpose";
public static final String LEVEL_SALES = "Sales";
public static final String LEVEL_MANAGEMENT = "Management";
public static final String LEVEL_EXECUTIVE = "Executive";
public static final String HEAP_ANALYSIS_ID = ConfigMgr.getKeyfileString("heap.analysis.id", "3411110378");
public static final String INTERCOM_APP_ID = ConfigMgr.getKeyfileString("intercom.appId", "");
public static final String INTERCOM_TOKEN = ConfigMgr.getKeyfileString("intercom.token", "");
public static final String INTERCOM_APP_ID = ConfigMgr.getKeyfileString("intercom.appId", "");
public static final String INTERCOM_TOKEN = ConfigMgr.getKeyfileString("intercom.token", "");
public static Role getRole(String role, ObjectTransaction transaction)
{
......@@ -90,20 +86,6 @@ public class Utils
return importances.toArray(new Importance[0]);
}
// TODO: Levels hardcoded for this phase, needs to be changed later!
public static List<Tuple.T3> getLevelsForComprehensive(ObjectTransaction objTran)
{
List<Tuple.T3> levels = new ArrayList();
levels.add(new Tuple.T3(Level.searchName(objTran, LEVEL_GENERAL_PURPOSE), "General Purpose", "gn-pu"));
levels.add(new Tuple.T3(Level.searchName(objTran, LEVEL_SALES), "Sales", "sales-pic"));
levels.add(new Tuple.T3(Level.searchName(objTran, LEVEL_MANAGEMENT), "Management", "manag-pic"));
levels.add(new Tuple.T3(Level.searchName(objTran, LEVEL_EXECUTIVE), "Executive", "exe-pic"));
return levels;
}
//to sort jobs list
public static List<Job> getJobsSorted(Job[] jobs, JobSortOption jobSortOption, JobStatus jobStatus)
{
......
......@@ -2557,6 +2557,46 @@ a.forgot-pass {
color: #4a4a4a;
padding: 0 60px;
}
.reponsive-alert {
display: block;
width: 100%;
height: 100%;
padding: 2.5%;
box-sizing: border-box;
}
.responsive-alert-top {
height: 100%;
}
.reponsive-alert .responsive-alert-body {
height: 100%;
padding: 15% 0;
}
.grin-with-sweat{
font-size: 100px;
}
.responsive-alert-body{
border-radius: 2px;
background-color: #ffffff;
box-shadow: 0 0 30px 5px rgba(0, 0, 0, 0.2);
border: 1px solid #e8e8eb;
margin: 0 auto;
text-align: center;
padding: 0;
}
.responsive-alert-body h2{
font-size: 22px;
font-weight: 600;
color: #4a4a4a;
margin: 0 0 22px;
}
.responsive-alert-body p {
font-size: 16px;
font-weight: 300;
line-height: 1.56;
text-align: center;
color: #4a4a4a;
padding: 0 60px;
}
.create-y-f-job{
width: 100%;
border-top: 1px solid #ededef;
......@@ -2981,11 +3021,16 @@ span.export-candidate,span.appli-status-short{
width: 25%;
font-family: "Usual-Bold";
}
.pro-bar {
padding: 28px 38px 22px 62px;
.score-bar {
text-align: left;
cursor: pointer;
}
.pro-bar {
padding: 28px 38px 22px 62px;
}
.express-bar {
padding: 10px 38px 35px 62px;
}
.pro-bar:hover{
box-shadow: 3px 3px 15px #666;
border-color:#C76C0C;
......@@ -3044,7 +3089,7 @@ span.appli-progress-bar {
.hasarrow img{
margin-top: -1px;
}
.main-pro-bar{
.main-score-bar{
border-bottom: solid 1px #e3e3e3;
display: inline-block;
width: 100%;
......@@ -3216,10 +3261,12 @@ input.add-note-btn:hover{
padding-top: 0px;
}
.expand-hide-tag{
display: none;
}
.core-values{
background-color: #f2f3f4;
float: left;
width: 100%;
display: none;
}
.tab-row{
float: left;
......@@ -4440,6 +4487,7 @@ img.alert-icon {float: left;}
.job-filter li{margin: 0 8px;}
.job-filter > ul {padding-right: 10%;}
.pro-bar {padding: 25px 15px 22px;}
.express-bar {padding: 10px 10px 30px;}
.app-right-b {padding: 20px 0 5px 15px;}
.applicant-contact-info{padding: 20px 15px 5px;}
.applicant-note {padding: 20px 15px;}
......@@ -4459,7 +4507,6 @@ img.alert-icon {float: left;}
.contact-value a{font-size: 11px;}
.applicant-tab ul li a{font-size: 9px;line-height: 40px;}
.applicant-sidebar li {line-height: 38px;}
.pro-bar{padding: 20px 10px 15px;}
.chief-officer{font-size: 19px;}
.off-name{font-size: 12px;}
.appli-progress-bar .progress {height: 16px;}
......@@ -4940,7 +4987,7 @@ img.alert-icon {float: left;}
.lable-job-shorting{font-size: 9px;}
.applicant-header {padding: 18px 0;}
.appli-label {font-size: 13px;text-align: center;width: 100%;margin-bottom: 5px;}
.pro-bar {padding: 10px 10px 8px;text-align: center;}
.score-bar {padding: 10px 10px 8px;text-align: center;}
.rateing-title{font-size: 13px;padding: 23px 30px;width: 75%;position: relative;}
.rateing-title span {font-size: 12px;position: absolute;right: -23%;top: 6px;}
.int-timeline li,.int-timeline li a,.int-timeline{width: 100%;border-radius: 0;margin: 0;}
......
......@@ -95,9 +95,24 @@
<NODE name="sign_up_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdminNoPriv"/>
<!--
TODO: uncomment when plans and billing screens are available for all users
<FORM name="*.send" factory="Participant" class="performa.form.SendVerificationMailFP">
<AccountVerificationEmailer factory="Participant" class="oneit.email.ConfigurableArticleTemplateEmailer" templateShortcut="CompanyAccountVerificationMail"/>
</FORM>
-->
</NODE>
<!--TODO: delete when plans and billing screens are available for all users-->
<NODE name="sign_up_eap_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdminNoPriv"/>
<FORM name="*.send" factory="Participant" class="performa.form.SendVerificationMailFP">
<AccountVerificationEmailer factory="Participant" class="oneit.email.ConfigurableArticleTemplateEmailer" templateShortcut="CompanyAccountVerificationMail"/>
</FORM>
</NODE>
<NODE name="responsive_alert_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdminNoPriv"/>
</NODE>
<NODE name="verification_sent_jsp" factory="Participant">
......
<footer class="power-footer">
<div class="footer-link text-center">
<ul>
<li><a href="#">&COPY; <%= Calendar.getInstance().get(Calendar.YEAR) %> Talentology</a></li>
<li><a href="#">Privacy Policy</a></li>
<li><a href="https://www.talentology.com/" target="_blank">&COPY; <%= Calendar.getInstance().get(Calendar.YEAR) %> Talentology</a></li>
<li><a href="https://www.talentology.com/privacy/" target="_blank">Privacy Policy</a></li>
</ul>
</div>
</footer>
......
......@@ -20,6 +20,8 @@
<%@include file="/inc/std_imports.jsp" %>
<%@include file="/hotjar.jsp" %>
<%@include file="/heapAnalysis.jsp" %>
<%@page import="oneit.servlets.portability.BrowserServices"%>
</head>
<script>
window.intercomSettings = {
......@@ -32,6 +34,13 @@
</script>
<body>
<%
boolean isMobile = BrowserServices.isMobile(request);
if(isMobile)
{
response.sendRedirect(request.getContextPath() + "/extensions/adminportal/responsive_alert.jsp");
}
Article home = WebUtils.getArticleByShortCut(objTran, WebUtils.ADMIN_HOME);
String homeUrl = home.getLink(request);
String signoutUrl = "logout.jsp?nextURL=" + homeUrl;
......
......@@ -282,23 +282,30 @@
Map<FactorLevelLink, Map> factorDetails = factorClassDtls.get(factorClass);
Double rating = roleScoreMap.get(factorClass).get2();
ColorCode colorCode = roleScoreMap.get(factorClass).get1();
String cssClass = colorCode.getCSSClass();
String cssClass = colorCode != null ? colorCode.getCSSClass() : "";
%>
<div class="main-pro-bar">
<div class="pro-bar">
<div class="main-score-bar <%= job.isExpressJob() ? "" : "main-pro-bar"%>">
<div class="score-bar <%= job.isExpressJob() ? "express-bar" : "pro-bar"%>">
<span class="appli-label"><oneit:toString value="<%= factorClass %>" mode="EscapeHTML"/></span>
<span class="appli-percen gray"><oneit:toString value="<%= rating %>" mode="PercentageWholeNumber"/></span>
<span class="appli-progress-bar">
<div class="progress">
<div class="progress-bar <%= cssClass %>" role="progressbar" aria-valuenow="<%= rating %>" aria-valuemin="0" aria-valuemax="100" style="width:<%= rating %>%"></div>
</div>
</span>
<span class="expand-box">
<span class="hasarrow"><img src="images/select-down-arrow.svg"></span>
</span>
<%
if(!job.isExpressJob())
{
%>
<span class="appli-percen gray"><oneit:toString value="<%= rating %>" mode="PercentageWholeNumber"/></span>
<span class="appli-progress-bar">
<div class="progress">
<div class="progress-bar <%= cssClass %>" role="progressbar" aria-valuenow="<%= rating %>" aria-valuemin="0" aria-valuemax="100" style="width:<%= rating %>%"></div>
</div>
</span>
<span class="expand-box">
<span class="hasarrow"><img src="images/select-down-arrow.svg"></span>
</span>
<%
}
%>
</div>
<div class="expand-hide-tag">
<div class="core-values <%= job.isExpressJob() ? "" : "expand-hide-tag"%>">
<%
for(FactorLevelLink factorLevelLink : factorDetails.keySet())
{
......@@ -358,8 +365,8 @@
Long rating = cultureFitData.get(cClass).get0();
%>
<div class="main-pro-bar">
<div class="pro-bar">
<div class="main-score-bar main-pro-bar">
<div class="score-bar pro-bar">
<span class="appli-label"><oneit:toString value="<%= cClass %>" mode="EscapeHTML"/></span>
<span class="appli-percen gray"><oneit:toString value="<%= rating %>" mode="PercentageWholeNumber" /></span>
<span class="appli-progress-bar">
......@@ -371,7 +378,7 @@
<span class="hasarrow"><img src="images/select-down-arrow.svg" /></span>
</span>
</div>
<div class="expand-hide-tag">
<div class="core-values expand-hide-tag">
<%
for(Tuple.T3 tuple : cultureFitData.get(cClass).get1())
{
......@@ -409,8 +416,8 @@
{
Long rating = requirementFitData.get(importance);
%>
<div class="main-pro-bar <%= importance %>">
<div class="pro-bar">
<div class="main-score-bar main-pro-bar <%= importance %>">
<div class="score-bar pro-bar">
<span class="appli-label"><oneit:toString value="<%= importance %>" mode="EscapeHTML"/></span>
<span class="appli-percen gray"><oneit:toString value="<%= rating %>" mode="PercentageWholeNumber" /></span>
<span class="appli-progress-bar">
......@@ -433,7 +440,7 @@
if(reqAnswersByImportance.getValuesForKey(importance)!=null)
{
%>
<div class="expand-hide-tag">
<div class="core-values expand-hide-tag">
<%
for(AssessmentCriteriaAnswer answer: reqAnswersByImportance.getValuesForKey(importance))
{
......
......@@ -13,16 +13,7 @@
%>
<script>
$(document).ready(function(){
$('.type_radio').click(function(){
return false;
});
$(".level_radio").change(function(){
$('.form-page-area li.active').removeClass("active" );
$("input.level_radio:checked").closest('li').addClass("active" );
});
setupRecalc ($("form"), {'recalcOnError':true});
});
</script>
<oneit:form name="editJob" method="post" enctype="multipart/form-data">
......@@ -48,66 +39,58 @@
<%
FormTag jobForm = FormTag.getActiveFormTag(request);
FormBuilder formBuilder = jobForm.getFormBuilder();
String assessmentTypeKey = WebUtils.getInputKey(request, job, Job.FIELD_AssessmentType);
String assessmentTypeValue = formBuilder.fieldValue (assessmentTypeKey, job.getAssessmentType() == null ? "" : job.getAssessmentType().getName());
for(AssessmentType assessmentType : AssessmentType.getAssessmentTypeArray())
{
if(assessmentType.getDisabled() == Boolean.TRUE)
{
continue;
}
String assessmentTypeId = assessmentType.getName();
String selectedStr = CollectionUtils.equals(assessmentTypeValue, assessmentTypeId) ? "checked" : "";
String levelKey = WebUtils.getRadioSingleAssocKey(request, job, Job.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, job.getLevel() == null ? "" : String.valueOf(job.getLevelID()));
%>
<div class="radio radio-primary job-match-radio">
<input type="radio" name="<%= assessmentTypeKey %>" id="<%= assessmentTypeId %>" class="type_radio" value="<%= assessmentType.getName() %>" <%= selectedStr %>/>
<label for="<%= assessmentTypeId %>">
<span class="label-title"><oneit:toString value="<%= assessmentType %>" mode="EscapeHTML" /></span>
<oneit:toString value="<%= assessmentType.getHeaderDesc() %>" mode="EscapeHTML"/>
<oneit:toString value="<%= assessmentType.getQuestionDetails() %>" mode="EscapeHTML"/><br />
<span class="sub-radio-title"><oneit:toString value="<%= assessmentType.getAdditionalDesc() %>" mode="EscapeHTML" /></span>
</label>
</div>
<%
if(assessmentType == AssessmentType.COMPREHENSIVE)
{
String levelKey = WebUtils.getRadioSingleAssocKey(request, job, Job.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, job.getLevel() == null ? "" : String.valueOf(job.getLevelID()));
%>
<div class="main-pack-type">
<ul>
<%
for(Tuple.T3 tuple : Utils.getLevelsForComprehensive(transaction))
{
Level level = (Level)tuple.get0();
String levelId = String.valueOf(level.getID().longID());
boolean isSelected = CollectionUtils.equals(levelId, levelValue);
String selected = isSelected ? "checked" : "";
String liClass = isSelected ? "active" : "";
%>
<li class="<%= liClass %>" >
<a href="javascript:void(0)">
<input type="radio" name="<%= levelKey %>" id="<%= levelId %>" class="level_radio" value="<%= levelId %>" <%= selected %>/>
<label for="<%= levelId %>">
<span class="talen">Talentology</span>
<span class="pack-type"><oneit:toString value="<%= tuple.get1() %>" mode="EscapeHTML" /></span>
<span class="pack-img <%= tuple.get2() %>"></span>
</label>
</a>
</li>
<%
}
%>
</ul>
</div>
<div class="clearfix"></div>
<oneit:recalcClass htmlTag="div" classScript="job.getAssessmentType() == assessmentType ? 'main-pack-type' : '' " job="<%= job %>" assessmentType="<%= assessmentType %>">
<ul>
<%
for(Level level : Level.getAllLevelsforAssessmentType(transaction, assessmentType))
{
String levelId = String.valueOf(level.getID().longID());
boolean isSelected = CollectionUtils.equals(levelId, levelValue);
String selected = isSelected ? "checked" : "";
%>
<oneit:recalcClass htmlTag="li" classScript="job.getLevelClass(level)" job="<%= job %>" level="<%= level %>">
<a href="javascript:void(0)">
<input type="radio" name="<%= levelKey %>" id="<%= levelId %>" class="level_radio" value="<%= levelId %>" <%= selected %>/>
<label for="<%= levelId %>">
<span class="talen">Talentology</span>
<span class="pack-type"><oneit:toString value="<%= level %>" mode="EscapeHTML" /></span>
<span class="pack-img <%= level.getCSSClass() %>"></span>
</label>
</a>
</oneit:recalcClass>
<%
}
%>
</ul>
</oneit:recalcClass>
<div class="clearfix"></div>
<%
}
}
String levelKey = WebUtils.getRadioSingleAssocKey(request, job, Job.SINGLEREFERENCE_Level);
String levelValue = formBuilder.fieldValue (levelKey, job.getLevel() == null ? "" : String.valueOf(job.getLevelID()));
%>
<div class="clearfix"></div>
<div class="text-center">
<oneit:button value="Save as draft" name="saveJob" cssClass="btn btn-primary top-margin-37 largeBtn greyBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", jobPage)
......
......@@ -147,7 +147,7 @@
</div>
</div>
<div class="m-user-right">
<oneit:ormEnum obj="<%= companyUser %>" attributeName="Role" cssClass="form-control user-role"/>
<oneit:ormEnum obj="<%= companyUser %>" attributeName="Role" cssClass="form-control user-role" enums="<%= Arrays.asList(new RoleType[]{RoleType.ADMIN, RoleType.STANDARD}) %>"/>
</div>
<oneit:button name="save" value="Save" cssClass="<%= "save-user" + companyUser.getID().toString() + " hidden"%>"
requestAttribs="<%= CollectionUtils.mapEntry("CompanyUser", companyUser).mapEntry("nextPage", usersPage + "&UserSortOption=" + userSortOpt).toMap() %>" />
......
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page extends="oneit.servlets.jsp.FormJSP" %>
<%@ include file="/setuprequest.jsp" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<%! protected String getName (ServletConfig config) { return "responsive_alert_jsp"; } %>
<%@ include file="inc/htmlheader_nopriv.jsp" %>
<%
String fromPage = request.getParameter("fromPage") != null ? (String) request.getParameter("fromPage") : "";
%>
<div class="modal reponsive-alert" role="dialog">
<div class="responsive-alert-top">
<div class="responsive-alert-body">
<div class="responsive-alert-wrapper">
<div class="grin-with-sweat">😅</div>
<h2>Uh oh</h2>
<p> Talentology for Hiring Teams is currently available on desktop computers only.</p>
<p>Sorry about that!</p>
<%
if(fromPage.trim().equals("signin"))
{
%>
<p>On your desktop, please return to our sign in and you’ll be on your way.</p>
<%
}
else
{
%>
<p>On your desktop, check your email for our "Welcome to Talentology" message, and follow its link to get started!</p>
<%
}
%>
<div class="create-y-f-job">
<img src="<%= request.getContextPath() %>/images/logo.svg">
</div>
</div>
</div>
</div>
</div>
<%@ include file="inc/htmlfooter_nopriv.jsp" %>
\ No newline at end of file
......@@ -3,9 +3,17 @@
<%@ include file="/setuprequest.jsp" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<%@page import="oneit.servlets.portability.BrowserServices"%>
<%! protected String getName (ServletConfig config) { return "signin_jsp"; } %>
<%
boolean isMobile = BrowserServices.isMobile(request);
if(isMobile)
{
response.sendRedirect(request.getContextPath() + "/extensions/adminportal/responsive_alert.jsp?fromPage=signin");
}
ORMProcessState process = (ORMProcessState) ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
String nextPage = WebUtils.getArticleByShortCut(objTran, WebUtils.ADMIN_HOME).getLink(request);
......
<%@ page extends="oneit.servlets.jsp.FormJSP" %>
<%@ include file="/setuprequest.jsp" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<%! protected String getName (ServletConfig config) { return "sign_up_eap_jsp"; } %>
<%@ include file="inc/htmlheader_nopriv.jsp" %>
<%
ORMProcessState process = (ORMProcessState) ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
Boolean toRedirect = GenericObjDF.getOrCreateObject (request, "Company", Company.REFERENCE_Company);
Company company = (Company) process.getAttribute("Company");
SecUser secUser = null;
CompanyUser companyUser = company.getAddedByUser();
if(companyUser == null)
{
secUser = SecUser.createSecUser(objTran);
companyUser = secUser.getExtensionOrCreate(CompanyUser.REFERENCE_CompanyUser);
company.setAddedByUser(companyUser);
companyUser.setCompany(company);
}
secUser = companyUser.getUser();
if(toRedirect)
{
%><%@include file="/saferedirect.jsp"%><%
}
Debug.assertion(companyUser != null, "CompanyUser is null in admin portal");
%>
<script type="text/javascript">
$(document).ready(function() {
validate();
$('input').on('change keyup', function() { validate() });
});
function validate() {
var empty = false;
$('input[required]').each(function() {
if ( $.trim($( this ).val()) == '') {
empty = true;
if ($( this ).css('background-color') == 'rgb(250, 255, 189)') {
empty = false;
}
}
});
if (empty) {
$('.send-btn').attr('disabled', 'disabled');
} else {
$('.send-btn').removeAttr('disabled');
}
}
</script>
<style>
button[disabled] {
opacity: 0.6;
background-color: #0582ba;
}
</style>
<div class="hire-the-right-candi">Hire the right candidate</div>
<div>&nbsp;</div>
<oneit:form name="sign_up" method="post">
<oneit:dynInclude page="/extensions/applicantportal/inc/multifieldtext.jsp" data="<%= CollectionUtils.EMPTY_MAP%>"/>
<div class="main-box-layout login-box">
<oneit:dynInclude page="/extensions/adminportal/inc/company_user_data.jsp" data="<%= CollectionUtils.EMPTY_MAP%>" CompanyUser="<%= companyUser %>"/>
<oneit:button value="Sign up" name="send" cssClass="box-btn send-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", "verification_sent.jsp")
.mapEntry(NotificationUtils.NOTIFICATION_MSG_PARAM, "emailSent")
.mapEntry("Company", company)
.toMap() %>"/>
</div>
</oneit:form>
<%@ include file="inc/htmlfooter_nopriv.jsp" %>
\ No newline at end of file
<?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.RedefineTableOperation">
<tableName factory="String">oneit_sec_user_extension</tableName>
<column name="stripe_reference" type="String" nullable="true" length="100"/>
<column name="stripe_subscription" type="String" nullable="true" length="100"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
......@@ -130,7 +130,7 @@
if(companyUser.getCompany().getAddedByUser() == companyUser)
{
%>
<oneit:button value="Verify and proceed" name="gotoPage" cssClass="box-btn verify-btn"
<oneit:button value="Create my account" name="gotoPage" cssClass="box-btn verify-btn"
requestAttribs="<%= CollectionUtils.mapEntry("socialLogin", socialLogin)
.mapEntry("procParams", CollectionUtils.mapEntry("Company", companyUser.getCompany()).toMap())
.mapEntry("nextPage", nextPage).toMap() %>"/>
......@@ -139,7 +139,7 @@
else
{
%>
<oneit:button value="Verify and proceed" name="sendCompanyUserInvites" cssClass="box-btn verify-btn"
<oneit:button value="Create my account" name="sendCompanyUserInvites" cssClass="box-btn verify-btn"
requestAttribs="<%= CollectionUtils.mapEntry("socialLogin", socialLogin)
.mapEntry("CompanyUser", companyUser)
.mapEntry("nextPage", homePage)
......@@ -147,6 +147,11 @@
<%
}
%>
<div class="box-label" style="padding-top: 20px;">
By selecting 'Create my account' I agree to Talentology's
<a href="https://www.talentology.com/privacy/" target="_blank">privacy policy</a> and
<a href="https://www.talentology.com/terms-of-service/" target="_blank">terms of service</a>
</div>
</div>
</oneit:form>
</oneit:dynIncluded>
......
......@@ -145,26 +145,33 @@
<img src="images/app-job-match-icon.svg"> Role fit
<span><oneit:toString value="<%= jobApplication.getRoleFitPercentage() %>" mode="PercentageTwoDP" /></span>
</div>
<div class="detail-box">
<%
for(FactorClass factorClass : jobApplication.getSortedFactorClasses())
{
if(factorClass != null && roleScoreMap.get(factorClass) != null)
<%
if(!job.isExpressJob())
{
%>
<div class="detail-box">
<%
for(FactorClass factorClass : jobApplication.getSortedFactorClasses())
{
%>
<div class="detail-row">
<div class="detail-label">
<oneit:toString value="<%= factorClass %>" mode="EscapeHTML"/>
</div>
<div class="detail-no">
<oneit:toString value="<%= roleScoreMap.get(factorClass).get2() %>" mode="PercentageWholeNumber"/>
</div>
</div>
<%
if(factorClass != null && roleScoreMap.get(factorClass) != null)
{
%>
<div class="detail-row">
<div class="detail-label">
<oneit:toString value="<%= factorClass %>" mode="EscapeHTML"/>
</div>
<div class="detail-no">
<oneit:toString value="<%= roleScoreMap.get(factorClass).get2() %>" mode="PercentageWholeNumber"/>
</div>
</div>
<%
}
}
}
%>
</div>
%>
</div>
<%
}
%>
<div class="culture jcc">
<img src="images/culture-icon.svg"> culture fit
<span>
......
......@@ -6,12 +6,12 @@
Powered by
</div>
<div class="footer-site-logo">
<a href="http://talentology.com/"><img src="images/logo.svg"></a>
<a href="https://www.talentology.com/candidates-about-talentology/"><img src="images/logo.svg"></a>
</div>
<div class="footer-link text-center">
<ul>
<li><a href="http://talentology.com/">&copy; 2017 Talentology</a></li>
<li><a href="#">Privacy Policy</a></li>
<li><a href="https://www.talentology.com/candidates-about-talentology/">&copy; <%= Calendar.getInstance().get(Calendar.YEAR) %> Talentology</a></li>
<li><a href="https://www.talentology.com/privacy/" target="_blank">Privacy Policy</a></li>
</ul>
</div>
</footer>
......
......@@ -25,44 +25,82 @@
String currentPage = WebUtils.getArticleLink(request, objTran, WebUtils.JOB_APPLICATION, "JobMatchAssessment");
String nextPage = WebUtils.getArticleLink(request, objTran, WebUtils.JOB_APPLICATION, "SubmitApplication");
String culturePage = WebUtils.getArticleLink(request, objTran, WebUtils.JOB_APPLICATION, "WorkplaceCulture");
boolean isExpress = job.isExpressJob();
%>
<oneit:form name="editApplication" method="POST">
<oneit:evalBody buffer="<%= getBuffer(request) %>">
<%
if(actualNumber == 1 )
{
int maxRating = 7;
int midRating = 4;
String otherRating = "2, 3, 5, 6";
%>
<div class="main-sc-section sj-1">
<p>Using the scale given, indicate how important to you are the following aspects in your work life. Use the following system:</p>
<ul class="security-level">
<li><span>1</span> means of very little importance to you</li>
<li><oneit:toString value="<%= midRating %>" mode="EscapeHTML"/> means about average in importance to you</li>
<li><oneit:toString value="<%= maxRating %>" mode="EscapeHTML"/> means of high importance to you</li>
</ul>
<p>Use the other numbers (<oneit:toString value="<%= otherRating %>" mode="EscapeHTML"/>) to indicate in-between levels of importance to you.</p>
</div>
<div class="selection-br-line"></div>
<%
}
else if(questionType == QuestionType.IPSATIVE && actualNumber == 31)
<%
if(actualNumber == 1 )
{
int maxRating = 7;
int midRating = 4;
String otherRating = "2, 3, 5, 6";
%>
<div class="main-sc-section sj-1">
<p>Using the scale given, indicate how important to you are the following aspects in your work life. Use the following system:</p>
<ul class="security-level">
<li><span>1</span> means of very little importance to you</li>
<li><oneit:toString value="<%= midRating %>" mode="EscapeHTML"/> means about average in importance to you</li>
<li><oneit:toString value="<%= maxRating %>" mode="EscapeHTML"/> means of high importance to you</li>
</ul>
<p>Use the other numbers (<oneit:toString value="<%= otherRating %>" mode="EscapeHTML"/>) to indicate in-between levels of importance to you.</p>
</div>
<div class="selection-br-line"></div>
<%
}
else if(!isExpress && questionType == QuestionType.IPSATIVE && actualNumber == 31)
{
%>
<div class="main-sc-section sj-1">
<p>
For questions like these, indicate your preference by selecting the number closest to the term or idea that's most like you. We know that it can be challenging to make a choice sometimes, but try to avoid selecting the middle value.
</p>
</div>
<div class="selection-br-line"></div>
<%
}
else if(isExpress)
{
if(actualNumber == 17 || actualNumber == 30 || actualNumber == 34 || actualNumber == 37)
{
%>
%>
<div class="main-sc-section sj-1">
<p>
For questions like these, indicate your preference by selecting the number closest to the term or idea that's most like you. We know that it can be challenging to make a choice sometimes, but try to avoid selecting the middle value.
<%
if(actualNumber == 17)
{
%>
To what extent would you like each of the following activities to be <strong>required</strong> in your work?
A score of 1 means &quot;not very much at all&quot;, 4 means &quot;an average amount&quot;, while 7 means &quot;very greatly indeed&quot;.
The other numbers indicate in-between scores in your view.
<%
}
else if(actualNumber == 30 || actualNumber == 37)
{
%>
To what extent are the following statements true about you?
Use the same scale with 1 meaning not at all like you, 4 meaning middling or rather like you and 7 meaning definitely like you.
<%
}
else if(actualNumber == 34)
{
%>
To what extent would you agree with each of the following statements about work life?
Mark your answer on the 7-point scale, with 1 meaning very little agreement with the statement, 4 meaning &quot;average&quot; or middling agreement and 7 meaning very strong agreement.
<%
}
%>
</p>
</div>
<div class="selection-br-line"></div>
<%
<%
}
%>
}
%>
<div class="main-sc-section main-rate-section">
<%
int totNoOfQuestions = totalQuestions.size();
......@@ -144,28 +182,28 @@
}
%>
</div>
<%
if(!jobApplication.cultureCompleted())
{
%>
<oneit:button value=" " name="gotoPage" id="gotoPageNext" cssClass="box-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", culturePage)
.mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry("attribNamesToRestore", Collections.singleton("JobApplication"))
.toMap() %>"/>
<%
}
else
{
%>
<oneit:button value=" " name="completeApplication" id="gotoPageNext" cssClass="box-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry("attribNamesToRestore", Collections.singleton("JobApplication"))
.toMap() %>"/>
<%
}
%>
<%
if(!jobApplication.cultureCompleted())
{
%>
<oneit:button value=" " name="gotoPage" id="gotoPageNext" cssClass="box-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", culturePage)
.mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry("attribNamesToRestore", Collections.singleton("JobApplication"))
.toMap() %>"/>
<%
}
else
{
%>
<oneit:button value=" " name="completeApplication" id="gotoPageNext" cssClass="box-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry("attribNamesToRestore", Collections.singleton("JobApplication"))
.toMap() %>"/>
<%
}
%>
</oneit:evalBody>
</oneit:form>
\ No newline at end of file
......@@ -31,6 +31,9 @@
process.setAttribute("JobApplicationID" , jobApplication.getID().longValue());
}
//preloading
jobApplication.pipelineJobApplication().toCandidate().toProfileAssessmentAnswers().toQuestion().toRightQuestion().uniqueVals();
Job job = jobApplication.getJob();
Candidate candidate = jobApplication.getCandidate();
int questionNumber = jobApplication.getQuestionNumber();
......
......@@ -18,8 +18,6 @@
}
Debug.assertion(job != null, "Job is null in applicant portal");
String socialLoginNextPage = nextPage + "&JobID=" + job.getID().toString();
%>
<script type="text/javascript">
var interval;
......@@ -44,37 +42,7 @@
<oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML"/>
</div>
<div class="main-box-layout verify-i-setpone">
<div class="box-label">Sign in using your social network of choice</div>
<oneit:form name="socialLogin" method="post">
<ul class="social-login">
<li>
<oneit:button value=" " name="linkedinOAuthLogin" skin="link" cssClass="social_login_btn"
disabled="<%= Utils.linkedInAvailable() ? "false" : "true" %>"
requestAttribs="<%= CollectionUtils.mapEntry ("nextPage", socialLoginNextPage).toMap() %>">
<img src="<%= request.getContextPath() %>/images/login-linkedin-icon.svg" />
</oneit:button>
</li>
<li>
<oneit:button value=" " name="facebookOAuthLogin" skin="link" cssClass="social_login_btn"
disabled="<%= Utils.facebookAvailable() ? "false" : "true" %>"
requestAttribs="<%= CollectionUtils.mapEntry ("nextPage", socialLoginNextPage).toMap() %>">
<img src="<%= request.getContextPath() %>/images/login-facebok-icon.svg" />
</oneit:button>
</li>
<li>
<oneit:button value=" " name="googleOAuthLogin" skin="link" cssClass="social_login_btn"
disabled="<%= Utils.googleAvailable() ? "false" : "true" %>"
requestAttribs="<%= CollectionUtils.mapEntry ("nextPage", socialLoginNextPage).toMap() %>">
<img src="<%= request.getContextPath() %>/images/login-google.png" />
</oneit:button>
</li>
</ul>
</oneit:form>
<div class="box-br-line"><span></span></div>
<div class="box-label">Sent! Check your email now 😀</div>
</div>
</div>
</oneit:dynIncluded>
\ No newline at end of file
......@@ -158,13 +158,18 @@
%>
<div class="text-center">
<oneit:button value="<%= isVerify ? "Create my account" : "Verify and proceed"%>" name="verifyIdentity" cssClass="box-btn verify-btn"
<oneit:button value="Create my account" name="verifyIdentity" cssClass="box-btn verify-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("Job",job)
.mapEntry("Candidate",candidate)
.mapEntry("isVerify",isVerify)
.toMap() %>"/>
</div>
<div class="box-label" style="padding-top: 20px;">
By selecting 'Create my account' I agree to Talentology's
<a href="https://www.talentology.com/privacy/" target="_blank">privacy policy</a> and
<a href="https://www.talentology.com/terms-of-service/" target="_blank">terms of service</a>
</div>
</div>
</div>
</oneit:form>
......
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (1, 278.00, 330.00, 182.00, 28.45, 249.55, 306.45, 1945.30, 218.50, 1726.80, 2163.80, 0.00, 0.00, 0.00, 0.00, 1, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (2, 288.37, 340.00, 184.00, 28.21, 260.16, 316.58, 1971.99, 211.42, 1760.57, 2183.41, -0.04, 0.00, 8.23, 0.00, 2, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (3, 258.81, 300.00, 187.00, 20.24, 238.57, 279.05, 1675.37, 146.66, 1528.71, 1822.03, -0.09, 0.00, 8.52, 0.00, 3, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (4, 269.08, 300.00, 190.00, 19.80, 249.28, 288.88, 1705.39, 135.10, 1570.29, 1840.49, 0.02, 0.02, 7.70, 12.25, 4, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (5, 205.04, 250.00, 101.00, 24.39, 180.65, 229.43, 1497.34, 192.50, 1304.84, 1689.84, 0.00, 0.00, 0.00, 0.00, 5, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (6, 219.16, 250.00, 170.00, 18.06, 201.10, 237.22, 1577.64, 139.07, 1438.57, 1716.71, 0.00, 0.00, 0.00, 0.00, 6, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (10, 269.08, 300.00, 190.00, 19.80, 249.28, 288.88, 1705.39, 135.10, 1570.29, 1840.49, NULL, NULL, NULL, NULL, 7, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (14, 288.37, 340.00, 184.00, 28.21, 260.16, 316.58, 1971.99, 211.42, 1760.57, 2183.41, NULL, NULL, NULL, NULL, 8, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (15, 258.81, 300.00, 187.00, 20.24, 238.57, 279.05, 1675.37, 146.66, 1528.71, 1822.03, NULL, NULL, NULL, NULL, 9, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (16, 258.81, 300.00, 187.00, 20.24, 238.57, 279.05, 1675.37, 146.66, 1528.71, 1822.03, NULL, NULL, NULL, NULL, 10, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (21, 269.08, 300.00, 190.00, 19.80, 249.28, 288.88, 1705.39, 135.10, 1570.29, 1840.49, 0.02, 0.02, 7.70, 12.25, 11, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (26, 260.14, 300.00, 197.00, 22.34, 237.80, 282.48, 1649.20, 181.79, 1467.41, 1830.99, NULL, NULL, NULL, NULL, 12, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (27, 260.14, 300.00, 197.00, 22.34, NULL, NULL, 1649.20, 181.79, NULL, NULL, NULL, NULL, NULL, NULL, 13, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (28, 273.67, 295.00, 242.00, 13.52, 260.15, 287.19, 1777.45, 92.00, 1685.45, 1869.45, NULL, NULL, NULL, NULL, 14, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (29, 305.78, 335.00, 277.00, 17.91, 287.87, 323.69, 2094.21, 137.65, 1956.56, 2231.86, NULL, NULL, NULL, NULL, 15, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (30, 294.75, 320.00, 273.00, 13.51, 281.24, 308.26, 2014.58, 114.49, 1900.09, 2129.07, NULL, NULL, NULL, NULL, 16, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (31, 309.00, 335.00, 278.00, 18.41, 290.59, 327.41, 2126.42, 139.58, 1986.84, 2266.00, NULL, NULL, NULL, NULL, 17, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (40, 223.61, 270.00, 167.00, 22.22, 201.39, 245.83, 1503.45, 188.52, 1314.93, 1691.97, NULL, NULL, NULL, NULL, 18, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (1, 278.00, 330.00, 182.00, 28.45, 249.55, 306.45, 1945.30, 218.50, 1726.80, 2163.80, 0.00, 0.00, 0.00, 0.00, 1, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (2, 288.37, 340.00, 184.00, 28.21, 260.16, 316.58, 1971.99, 211.42, 1760.57, 2183.41, -0.04, 0.00, 8.23, 0.00, 2, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (3, 258.81, 300.00, 187.00, 20.24, 238.57, 279.05, 1675.37, 146.66, 1528.71, 1822.03, -0.09, 0.00, 8.52, 0.00, 3, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (4, 269.08, 300.00, 190.00, 19.80, 249.28, 288.88, 1705.39, 135.10, 1570.29, 1840.49, 0.02, 0.02, 7.70, 12.25, 4, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (5, 205.04, 250.00, 101.00, 24.39, 180.65, 229.43, 1497.34, 192.50, 1304.84, 1689.84, 0.00, 0.00, 0.00, 0.00, 5, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (6, 219.16, 250.00, 170.00, 18.06, 201.10, 237.22, 1577.64, 139.07, 1438.57, 1716.71, 0.00, 0.00, 0.00, 0.00, 6, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (10, 269.08, 300.00, 190.00, 19.80, 249.28, 288.88, 1705.39, 135.10, 1570.29, 1840.49, NULL, NULL, NULL, NULL, 7, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (14, 288.37, 340.00, 184.00, 28.21, 260.16, 316.58, 1971.99, 211.42, 1760.57, 2183.41, NULL, NULL, NULL, NULL, 8, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (15, 258.81, 300.00, 187.00, 20.24, 238.57, 279.05, 1675.37, 146.66, 1528.71, 1822.03, NULL, NULL, NULL, NULL, 9, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (16, 258.81, 300.00, 187.00, 20.24, 238.57, 279.05, 1675.37, 146.66, 1528.71, 1822.03, NULL, NULL, NULL, NULL, 10, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (21, 269.08, 300.00, 190.00, 19.80, 249.28, 288.88, 1705.39, 135.10, 1570.29, 1840.49, 0.02, 0.02, 7.70, 12.25, 11, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (26, 260.14, 300.00, 197.00, 22.34, 237.80, 282.48, 1649.20, 181.79, 1467.41, 1830.99, NULL, NULL, NULL, NULL, 12, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (27, 260.14, 300.00, 197.00, 22.34, NULL, NULL, 1649.20, 181.79, NULL, NULL, NULL, NULL, NULL, NULL, 13, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (28, 273.67, 295.00, 242.00, 13.52, 260.15, 287.19, 1777.45, 92.00, 1685.45, 1869.45, NULL, NULL, NULL, NULL, 14, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (29, 305.78, 335.00, 277.00, 17.91, 287.87, 323.69, 2094.21, 137.65, 1956.56, 2231.86, NULL, NULL, NULL, NULL, 15, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (30, 294.75, 320.00, 273.00, 13.51, 281.24, 308.26, 2014.58, 114.49, 1900.09, 2129.07, NULL, NULL, NULL, NULL, 16, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (31, 309.00, 335.00, 278.00, 18.41, 290.59, 327.41, 2126.42, 139.58, 1986.84, 2266.00, NULL, NULL, NULL, NULL, 17, now(), now());
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (40, 223.61, 270.00, 167.00, 22.22, 201.39, 245.83, 1503.45, 188.52, 1314.93, 1691.97, NULL, NULL, NULL, NULL, 18, now(), now());
<?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.RedefineTableOperation">
<tableName factory="String">tl_level</tableName>
<column name="applied_to_express" type="Boolean" nullable="true"/>
</NODE>
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_quest_lin</tableName>
<column name="is_express_question" type="Boolean" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
-- @AutoRun
update tl_level set applied_to_express = 'N';
update tl_quest_lin set is_express_question = 'N';
This source diff could not be displayed because it is too large. You can view the blob instead.
alter table tl_level_class_criteria alter column weighting drop not null;
<?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.RedefineTableOperation">
<tableName factory="String">tl_level</tableName>
<column name="css_class" type="String" nullable="true" length="100"/>
<column name="enabled" type="Boolean" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?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.RedefineTableOperation">
<tableName factory="String">tl_quest_lin</tableName>
<column name="inner_sort_order" type="Long" nullable="true"/>
</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_level_class_criteria</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='class_code' factory='String'>CARDRV</value>
<value name='level_number' factory='Integer'>1001</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>INFLUENCING</value>
<value name='level_number' factory='Integer'>1001</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>CONSGRP</value>
<value name='level_number' factory='Integer'>1001</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>EMOTSTAB</value>
<value name='level_number' factory='Integer'>1001</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>SOCIALGRP</value>
<value name='level_number' factory='Integer'>1001</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>CARDRV</value>
<value name='level_number' factory='Integer'>1002</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>INFLUENCING</value>
<value name='level_number' factory='Integer'>1002</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>CONSGRP</value>
<value name='level_number' factory='Integer'>1002</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>EMOTSTAB</value>
<value name='level_number' factory='Integer'>1002</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>SOCIALGRP</value>
<value name='level_number' factory='Integer'>1002</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>CARDRV</value>
<value name='level_number' factory='Integer'>1003</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>INFLUENCING</value>
<value name='level_number' factory='Integer'>1003</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>CONSGRP</value>
<value name='level_number' factory='Integer'>1003</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>EMOTSTAB</value>
<value name='level_number' factory='Integer'>1003</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_class_criteria</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='class_code' factory='String'>SOCIALGRP</value>
<value name='level_number' factory='Integer'>1003</value>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
update tl_level set enabled = 'N';
update tl_level set enabled = 'Y' where level_desc in ('Management', 'General Purpose', 'Sales', 'Executive', 'Customer Service', 'Non-Managers');
update tl_level set css_class = 'manag-pic' where level_desc = 'Management';
update tl_level set css_class = 'exe-pic' where level_desc = 'Executive';
update tl_level set css_class = 'sales-pic' where level_desc in ('Sales', 'Customer Service');
update tl_level set css_class = 'gn-pu' where level_desc in ('Non-Managers', 'General Purpose');
update tl_quest_lin set inner_sort_order = 1;
update tl_quest_lin set inner_sort_order = 0 where object_id in (1051, 1056, 1073);
<?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_level_norm</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='level_number' factory='Integer'>1001</value>
<value name='mean_score' factory='Double'>138.202437480215</value>
<value name='max_score' factory='Double'>160</value>
<value name='min_score' factory='Double'>75</value>
<value name='stddev_score' factory='Double'>14.7452681120821</value>
<value name='left_mean_score' factory='Double'>123.457169368133</value>
<value name='right_mean_score' factory='Double'>152.947705592297</value>
<value name='wght_mean_score' factory='Double'>940.692465970244</value>
<value name='wght_stddev_score' factory='Double'>107.142439252228</value>
<value name='wght_left_mean_score' factory='Double'>833.550026718016</value>
<value name='wght_right_mean_score' factory='Double'>1047.83490522247</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_norm</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='level_number' factory='Integer'>1002</value>
<value name='mean_score' factory='Double'>141.329177057357</value>
<value name='max_score' factory='Double'>160</value>
<value name='min_score' factory='Double'>58</value>
<value name='stddev_score' factory='Double'>13.9459276967423</value>
<value name='left_mean_score' factory='Double'>127.383249360614</value>
<value name='right_mean_score' factory='Double'>155.275104754099</value>
<value name='wght_mean_score' factory='Double'>1018.50997506234</value>
<value name='wght_stddev_score' factory='Double'>98.2572227406089</value>
<value name='wght_left_mean_score' factory='Double'>920.252752321735</value>
<value name='wght_right_mean_score' factory='Double'>1116.76719780295</value>
</NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_level_norm</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='level_number' factory='Integer'>1003</value>
<value name='mean_score' factory='Double'>140.98855938582</value>
<value name='max_score' factory='Double'>160</value>
<value name='min_score' factory='Double'>25</value>
<value name='stddev_score' factory='Double'>14.8990033103132</value>
<value name='left_mean_score' factory='Double'>126.089556075506</value>
<value name='right_mean_score' factory='Double'>155.887562696133</value>
<value name='wght_mean_score' factory='Double'>928.618846906518</value>
<value name='wght_stddev_score' factory='Double'>97.8014012838546</value>
<value name='wght_left_mean_score' factory='Double'>830.817445622664</value>
<value name='wght_right_mean_score' factory='Double'>1026.42024819037</value>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
Add followings to keyfile.properties - only for production
stripe.key=sk_live_oqwyeVyRa7Cpy2XmEgbTmi8D
stripe.pubkey=pk_live_pxpYJQUaXO4aYiBIy03GQA8D
Following are required only if stripe plan and coupon details have changed. Default values set are 0001 and EAP respectively.
stripe.plan.id
stripe.coupon.id
\ No newline at end of file
<?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.RedefineTableOperation">
<tableName factory="String">oneit_sec_user_extension</tableName>
<column name="roles" type="String" nullable="true" length="200"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?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.RedefineTableOperation">
<tableName factory="String">tl_company</tableName>
<column name="stripe_reference" type="String" nullable="true" length="100"/>
<column name="stripe_subscription" type="String" nullable="true" length="100"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
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