Commit 176262b3 by Nilu

manage plan layout changes - HT015. Layout styling to be done by saliya

parent 189d8aa8
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
<column name="card_id" type="String" nullable="true" length="100"/> <column name="card_id" type="String" nullable="true" length="100"/>
<column name="plan_renewed_on" type="Date" nullable="true"/> <column name="plan_renewed_on" type="Date" nullable="true"/>
<column name="used_credits" type="Long" nullable="true"/> <column name="used_credits" type="Long" nullable="true"/>
<column name="is_ppj" type="Boolean" nullable="true"/>
<column name="has_cap" type="Boolean" nullable="true"/>
<column name="max_cap" type="Long" nullable="true"/>
<column name="company_id" type="Long" length="11" nullable="false"/> <column name="company_id" type="Long" length="11" nullable="false"/>
<column name="billing_team_id" type="Long" length="11" nullable="true"/> <column name="billing_team_id" type="Long" length="11" nullable="true"/>
<column name="added_by_user_id" type="Long" length="11" nullable="false"/> <column name="added_by_user_id" type="Long" length="11" nullable="false"/>
......
...@@ -26,6 +26,9 @@ CREATE TABLE tl_hiring_team ( ...@@ -26,6 +26,9 @@ CREATE TABLE tl_hiring_team (
card_id varchar(100) NULL, card_id varchar(100) NULL,
plan_renewed_on datetime NULL, plan_renewed_on datetime NULL,
used_credits numeric(12) NULL, used_credits numeric(12) NULL,
is_ppj char(1) NULL,
has_cap char(1) NULL,
max_cap numeric(12) NULL,
company_id numeric(12) NOT NULL, company_id numeric(12) NOT NULL,
billing_team_id numeric(12) NULL, billing_team_id numeric(12) NULL,
added_by_user_id numeric(12) NOT NULL, added_by_user_id numeric(12) NOT NULL,
......
...@@ -27,6 +27,9 @@ CREATE TABLE tl_hiring_team ( ...@@ -27,6 +27,9 @@ CREATE TABLE tl_hiring_team (
card_id varchar2(100) NULL, card_id varchar2(100) NULL,
plan_renewed_on date NULL, plan_renewed_on date NULL,
used_credits number(12) NULL, used_credits number(12) NULL,
is_ppj char(1) NULL,
has_cap char(1) NULL,
max_cap number(12) NULL,
company_id number(12) NOT NULL, company_id number(12) NOT NULL,
billing_team_id number(12) NULL, billing_team_id number(12) NULL,
added_by_user_id number(12) NOT NULL, added_by_user_id number(12) NOT NULL,
......
...@@ -27,6 +27,9 @@ CREATE TABLE tl_hiring_team ( ...@@ -27,6 +27,9 @@ CREATE TABLE tl_hiring_team (
card_id varchar(100) NULL, card_id varchar(100) NULL,
plan_renewed_on timestamp NULL, plan_renewed_on timestamp NULL,
used_credits numeric(12) NULL, used_credits numeric(12) NULL,
is_ppj char(1) NULL,
has_cap char(1) NULL,
max_cap numeric(12) NULL,
company_id numeric(12) NOT NULL, company_id numeric(12) NOT NULL,
billing_team_id numeric(12) NULL, billing_team_id numeric(12) NULL,
added_by_user_id numeric(12) NOT NULL, added_by_user_id numeric(12) NOT NULL,
......
...@@ -25,11 +25,11 @@ public class SaveCompanyFP extends SaveFP ...@@ -25,11 +25,11 @@ public class SaveCompanyFP extends SaveFP
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{ {
HttpServletRequest request = submission.getRequest(); HttpServletRequest request = submission.getRequest();
Company company = process.getAttribute("Company") != null ? (Company) process.getAttribute("Company") : (Company) request.getAttribute("Company"); // Company company = process.getAttribute("Company") != null ? (Company) process.getAttribute("Company") : (Company) request.getAttribute("Company");
HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam"); HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam");
Boolean isPayment = (Boolean) request.getAttribute("IsPayment"); Boolean isPayment = (Boolean) request.getAttribute("IsPayment");
LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"In SaveCompanyFP saving company : ", company ); // LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"In SaveCompanyFP saving company : ", company );
if(CollectionUtils.equals(hiringTeam.getIsLogoDeleted(), Boolean.TRUE)) if(CollectionUtils.equals(hiringTeam.getIsLogoDeleted(), Boolean.TRUE))
{ {
...@@ -43,23 +43,23 @@ public class SaveCompanyFP extends SaveFP ...@@ -43,23 +43,23 @@ public class SaveCompanyFP extends SaveFP
hiringTeam.setBillingTeam(null); hiringTeam.setBillingTeam(null);
} }
if(CollectionUtils.equals(isPayment, Boolean.TRUE) && company.getPaymentJobCount()!=null) // if(CollectionUtils.equals(isPayment, Boolean.TRUE) && company.getPaymentJobCount()!=null)
{ // {
company.setPaymentPlan(company.getSelectedPaymentPlan()); // company.setPaymentPlan(company.getSelectedPaymentPlan());
//
LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"Company payment plan updated.", company, company.getPaymentPlan()); // LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"Company payment plan updated.", company, company.getPaymentPlan());
//
if(company.getCardID() != null ) // if(company.getCardID() != null )
{ // {
// cannot subscribe a user to a plan without card details // // cannot subscribe a user to a plan without card details
StripeUtils.updatePlan(company); // StripeUtils.updatePlan(company);
//
LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"Strpe subscription updated.", company, company.getStripeSubscription()); // LogMgr.log(Company.LOG, LogLevel.PROCESSING1,"Strpe subscription updated.", company, company.getStripeSubscription());
} // }
} // }
//
// Update company in intercom // // Update company in intercom
IntercomUtils.updateCompany(company); // IntercomUtils.updateCompany(company);
return super.processForm(process, submission, params); return super.processForm(process, submission, params);
} }
...@@ -69,16 +69,16 @@ public class SaveCompanyFP extends SaveFP ...@@ -69,16 +69,16 @@ public class SaveCompanyFP extends SaveFP
public void validate(ORMProcessState process, SubmissionDetails submission, MultiException exceptions, Map params) throws StorageException public void validate(ORMProcessState process, SubmissionDetails submission, MultiException exceptions, Map params) throws StorageException
{ {
HttpServletRequest request = submission.getRequest(); HttpServletRequest request = submission.getRequest();
Company company = process.getAttribute("Company") != null ? (Company) process.getAttribute("Company") : (Company) request.getAttribute("Company"); // Company company = process.getAttribute("Company") != null ? (Company) process.getAttribute("Company") : (Company) request.getAttribute("Company");
Boolean isPayment = (Boolean) request.getAttribute("IsPayment"); Boolean isPayment = (Boolean) request.getAttribute("IsPayment");
HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam"); HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam");
//to select payment plan when job open //to select payment plan when job open
if(CollectionUtils.equals(isPayment, Boolean.TRUE) && company.getPaymentJobCount()!=null) // if(CollectionUtils.equals(isPayment, Boolean.TRUE) && company.getPaymentJobCount()!=null)
{ // {
BusinessObjectParser.assertFieldCondition(company.getSelectedPaymentPlan()!= null, company , Company.SINGLEREFERENCE_PaymentPlan, "mandatory", exceptions, true, request); // BusinessObjectParser.assertFieldCondition(company.getSelectedPaymentPlan()!= null, company , Company.SINGLEREFERENCE_PaymentPlan, "mandatory", exceptions, true, request);
} // }
//
if(hiringTeam != null && !hiringTeam.getManageOwnBilling()) if(hiringTeam != null && !hiringTeam.getManageOwnBilling())
{ {
BusinessObjectParser.assertFieldCondition(hiringTeam.getBillingTeam() != null, hiringTeam , HiringTeam.SINGLEREFERENCE_BillingTeam, "mandatory", exceptions, true, request); BusinessObjectParser.assertFieldCondition(hiringTeam.getBillingTeam() != null, hiringTeam , HiringTeam.SINGLEREFERENCE_BillingTeam, "mandatory", exceptions, true, request);
......
...@@ -62,7 +62,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -62,7 +62,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
public static final String FIELD_CardID = "CardID"; public static final String FIELD_CardID = "CardID";
public static final String FIELD_PlanRenewedOn = "PlanRenewedOn"; public static final String FIELD_PlanRenewedOn = "PlanRenewedOn";
public static final String FIELD_UsedCredits = "UsedCredits"; public static final String FIELD_UsedCredits = "UsedCredits";
public static final String FIELD_IsPPJ = "IsPPJ";
public static final String FIELD_HasCap = "HasCap";
public static final String FIELD_MaxCap = "MaxCap";
public static final String FIELD_IsLogoDeleted = "IsLogoDeleted"; public static final String FIELD_IsLogoDeleted = "IsLogoDeleted";
public static final String FIELD_CouponCode = "CouponCode";
public static final String SINGLEREFERENCE_Company = "Company"; public static final String SINGLEREFERENCE_Company = "Company";
public static final String BACKREF_Company = ""; public static final String BACKREF_Company = "";
public static final String SINGLEREFERENCE_BillingTeam = "BillingTeam"; public static final String SINGLEREFERENCE_BillingTeam = "BillingTeam";
...@@ -96,7 +100,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -96,7 +100,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private static final DefaultAttributeHelper<HiringTeam> HELPER_CardID = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_CardID = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_PlanRenewedOn = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_PlanRenewedOn = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_UsedCredits = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_UsedCredits = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_IsPPJ = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_HasCap = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_MaxCap = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_IsLogoDeleted = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_IsLogoDeleted = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_CouponCode = DefaultAttributeHelper.INSTANCE;
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
...@@ -118,7 +126,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -118,7 +126,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private String _CardID; private String _CardID;
private Date _PlanRenewedOn; private Date _PlanRenewedOn;
private Integer _UsedCredits; private Integer _UsedCredits;
private Boolean _IsPPJ;
private Boolean _HasCap;
private Integer _MaxCap;
private Boolean _IsLogoDeleted; private Boolean _IsLogoDeleted;
private String _CouponCode;
// Private attributes corresponding to single references // Private attributes corresponding to single references
...@@ -138,6 +150,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -138,6 +150,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
// Arrays of validators for each attribute // Arrays of validators for each attribute
private static final AttributeValidator[] FIELD_IsLogoDeleted_Validators; private static final AttributeValidator[] FIELD_IsLogoDeleted_Validators;
private static final AttributeValidator[] FIELD_CouponCode_Validators;
private static final AttributeValidator[] FIELD_HiringTeamName_Validators; private static final AttributeValidator[] FIELD_HiringTeamName_Validators;
private static final AttributeValidator[] FIELD_HiringTeamLogo_Validators; private static final AttributeValidator[] FIELD_HiringTeamLogo_Validators;
private static final AttributeValidator[] FIELD_HiringTeamType_Validators; private static final AttributeValidator[] FIELD_HiringTeamType_Validators;
...@@ -156,6 +169,9 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -156,6 +169,9 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private static final AttributeValidator[] FIELD_CardID_Validators; private static final AttributeValidator[] FIELD_CardID_Validators;
private static final AttributeValidator[] FIELD_PlanRenewedOn_Validators; private static final AttributeValidator[] FIELD_PlanRenewedOn_Validators;
private static final AttributeValidator[] FIELD_UsedCredits_Validators; private static final AttributeValidator[] FIELD_UsedCredits_Validators;
private static final AttributeValidator[] FIELD_IsPPJ_Validators;
private static final AttributeValidator[] FIELD_HasCap_Validators;
private static final AttributeValidator[] FIELD_MaxCap_Validators;
// Arrays of behaviour decorators // Arrays of behaviour decorators
...@@ -179,6 +195,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -179,6 +195,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
setupAssocMetaData_AddedByUser(); setupAssocMetaData_AddedByUser();
setupAssocMetaData_PaymentPlan(); setupAssocMetaData_PaymentPlan();
FIELD_IsLogoDeleted_Validators = (AttributeValidator[])setupAttribMetaData_IsLogoDeleted(validatorMapping).toArray (new AttributeValidator[0]); FIELD_IsLogoDeleted_Validators = (AttributeValidator[])setupAttribMetaData_IsLogoDeleted(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CouponCode_Validators = (AttributeValidator[])setupAttribMetaData_CouponCode(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_HiringTeamName_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamName(validatorMapping).toArray (new AttributeValidator[0]); FIELD_HiringTeamName_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamName(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_HiringTeamLogo_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamLogo(validatorMapping).toArray (new AttributeValidator[0]); FIELD_HiringTeamLogo_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamLogo(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_HiringTeamType_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamType(validatorMapping).toArray (new AttributeValidator[0]); FIELD_HiringTeamType_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamType(validatorMapping).toArray (new AttributeValidator[0]);
...@@ -197,6 +214,9 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -197,6 +214,9 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
FIELD_CardID_Validators = (AttributeValidator[])setupAttribMetaData_CardID(validatorMapping).toArray (new AttributeValidator[0]); FIELD_CardID_Validators = (AttributeValidator[])setupAttribMetaData_CardID(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_PlanRenewedOn_Validators = (AttributeValidator[])setupAttribMetaData_PlanRenewedOn(validatorMapping).toArray (new AttributeValidator[0]); FIELD_PlanRenewedOn_Validators = (AttributeValidator[])setupAttribMetaData_PlanRenewedOn(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_UsedCredits_Validators = (AttributeValidator[])setupAttribMetaData_UsedCredits(validatorMapping).toArray (new AttributeValidator[0]); FIELD_UsedCredits_Validators = (AttributeValidator[])setupAttribMetaData_UsedCredits(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_IsPPJ_Validators = (AttributeValidator[])setupAttribMetaData_IsPPJ(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_HasCap_Validators = (AttributeValidator[])setupAttribMetaData_HasCap(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_MaxCap_Validators = (AttributeValidator[])setupAttribMetaData_MaxCap(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_HiringTeam.initialiseReference (); REFERENCE_HiringTeam.initialiseReference ();
...@@ -319,6 +339,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -319,6 +339,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
} }
// Meta Info setup // Meta Info setup
private static List setupAttribMetaData_CouponCode(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("length", "20");
metaInfo.put ("name", "CouponCode");
metaInfo.put ("type", "String");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for HiringTeam.CouponCode:", metaInfo);
ATTRIBUTES_METADATA_HiringTeam.put (FIELD_CouponCode, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(HiringTeam.class, "CouponCode", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for HiringTeam.CouponCode:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_HiringTeamName(Map validatorMapping) private static List setupAttribMetaData_HiringTeamName(Map validatorMapping)
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -674,6 +712,62 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -674,6 +712,62 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return validators; return validators;
} }
// Meta Info setup
private static List setupAttribMetaData_IsPPJ(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "is_ppj");
metaInfo.put ("defaultValue", "Boolean.TRUE");
metaInfo.put ("name", "IsPPJ");
metaInfo.put ("type", "Boolean");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for HiringTeam.IsPPJ:", metaInfo);
ATTRIBUTES_METADATA_HiringTeam.put (FIELD_IsPPJ, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(HiringTeam.class, "IsPPJ", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for HiringTeam.IsPPJ:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_HasCap(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "has_cap");
metaInfo.put ("defaultValue", "Boolean.FALSE");
metaInfo.put ("name", "HasCap");
metaInfo.put ("type", "Boolean");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for HiringTeam.HasCap:", metaInfo);
ATTRIBUTES_METADATA_HiringTeam.put (FIELD_HasCap, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(HiringTeam.class, "HasCap", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for HiringTeam.HasCap:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_MaxCap(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "max_cap");
metaInfo.put ("name", "MaxCap");
metaInfo.put ("type", "Integer");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for HiringTeam.MaxCap:", metaInfo);
ATTRIBUTES_METADATA_HiringTeam.put (FIELD_MaxCap, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(HiringTeam.class, "MaxCap", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for HiringTeam.MaxCap:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION // END OF STATIC METADATA DEFINITION
...@@ -719,7 +813,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -719,7 +813,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_CardID = (String)(HELPER_CardID.initialise (_CardID)); _CardID = (String)(HELPER_CardID.initialise (_CardID));
_PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.initialise (_PlanRenewedOn)); _PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.initialise (_PlanRenewedOn));
_UsedCredits = (Integer)(HELPER_UsedCredits.initialise (_UsedCredits)); _UsedCredits = (Integer)(HELPER_UsedCredits.initialise (_UsedCredits));
_IsPPJ = (Boolean)(Boolean.TRUE);
_HasCap = (Boolean)(Boolean.FALSE);
_MaxCap = (Integer)(HELPER_MaxCap.initialise (_MaxCap));
_IsLogoDeleted = (Boolean)(Boolean.FALSE); _IsLogoDeleted = (Boolean)(Boolean.FALSE);
_CouponCode = (String)(HELPER_CouponCode.initialise (_CouponCode));
} }
...@@ -2522,6 +2620,300 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -2522,6 +2620,300 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
} }
/** /**
* Get the attribute IsPPJ
*/
public Boolean getIsPPJ ()
{
assertValid();
Boolean valToReturn = _IsPPJ;
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
valToReturn = bhd.getIsPPJ ((HiringTeam)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 preIsPPJChange (Boolean newIsPPJ) 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 postIsPPJChange () throws FieldException
{
}
public FieldWriteability getWriteability_IsPPJ ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute IsPPJ. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setIsPPJ (Boolean newIsPPJ) throws FieldException
{
boolean oldAndNewIdentical = HELPER_IsPPJ.compare (_IsPPJ, newIsPPJ);
try
{
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
newIsPPJ = bhd.setIsPPJ ((HiringTeam)this, newIsPPJ);
oldAndNewIdentical = HELPER_IsPPJ.compare (_IsPPJ, newIsPPJ);
}
if (FIELD_IsPPJ_Validators.length > 0)
{
Object newIsPPJObj = HELPER_IsPPJ.toObject (newIsPPJ);
if (newIsPPJObj != null)
{
int loopMax = FIELD_IsPPJ_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_HiringTeam.get (FIELD_IsPPJ);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_IsPPJ_Validators[v].checkAttribute (this, FIELD_IsPPJ, metadata, newIsPPJObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_IsPPJ () != FieldWriteability.FALSE, "Field IsPPJ is not writeable");
preIsPPJChange (newIsPPJ);
markFieldChange (FIELD_IsPPJ);
_IsPPJ = newIsPPJ;
postFieldChange (FIELD_IsPPJ);
postIsPPJChange ();
}
}
/**
* Get the attribute HasCap
*/
public Boolean getHasCap ()
{
assertValid();
Boolean valToReturn = _HasCap;
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
valToReturn = bhd.getHasCap ((HiringTeam)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 preHasCapChange (Boolean newHasCap) 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 postHasCapChange () throws FieldException
{
}
public FieldWriteability getWriteability_HasCap ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute HasCap. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setHasCap (Boolean newHasCap) throws FieldException
{
boolean oldAndNewIdentical = HELPER_HasCap.compare (_HasCap, newHasCap);
try
{
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
newHasCap = bhd.setHasCap ((HiringTeam)this, newHasCap);
oldAndNewIdentical = HELPER_HasCap.compare (_HasCap, newHasCap);
}
if (FIELD_HasCap_Validators.length > 0)
{
Object newHasCapObj = HELPER_HasCap.toObject (newHasCap);
if (newHasCapObj != null)
{
int loopMax = FIELD_HasCap_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_HiringTeam.get (FIELD_HasCap);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_HasCap_Validators[v].checkAttribute (this, FIELD_HasCap, metadata, newHasCapObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_HasCap () != FieldWriteability.FALSE, "Field HasCap is not writeable");
preHasCapChange (newHasCap);
markFieldChange (FIELD_HasCap);
_HasCap = newHasCap;
postFieldChange (FIELD_HasCap);
postHasCapChange ();
}
}
/**
* Get the attribute MaxCap
*/
public Integer getMaxCap ()
{
assertValid();
Integer valToReturn = _MaxCap;
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
valToReturn = bhd.getMaxCap ((HiringTeam)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 preMaxCapChange (Integer newMaxCap) 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 postMaxCapChange () throws FieldException
{
}
public FieldWriteability getWriteability_MaxCap ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute MaxCap. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setMaxCap (Integer newMaxCap) throws FieldException
{
boolean oldAndNewIdentical = HELPER_MaxCap.compare (_MaxCap, newMaxCap);
try
{
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
newMaxCap = bhd.setMaxCap ((HiringTeam)this, newMaxCap);
oldAndNewIdentical = HELPER_MaxCap.compare (_MaxCap, newMaxCap);
}
if (FIELD_MaxCap_Validators.length > 0)
{
Object newMaxCapObj = HELPER_MaxCap.toObject (newMaxCap);
if (newMaxCapObj != null)
{
int loopMax = FIELD_MaxCap_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_HiringTeam.get (FIELD_MaxCap);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_MaxCap_Validators[v].checkAttribute (this, FIELD_MaxCap, metadata, newMaxCapObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_MaxCap () != FieldWriteability.FALSE, "Field MaxCap is not writeable");
preMaxCapChange (newMaxCap);
markFieldChange (FIELD_MaxCap);
_MaxCap = newMaxCap;
postFieldChange (FIELD_MaxCap);
postMaxCapChange ();
}
}
/**
* Get the attribute IsLogoDeleted * Get the attribute IsLogoDeleted
*/ */
public Boolean getIsLogoDeleted () public Boolean getIsLogoDeleted ()
...@@ -2619,6 +3011,104 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -2619,6 +3011,104 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
} }
} }
/**
* Get the attribute CouponCode
*/
public String getCouponCode ()
{
assertValid();
String valToReturn = _CouponCode;
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
valToReturn = bhd.getCouponCode ((HiringTeam)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 preCouponCodeChange (String newCouponCode) 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 postCouponCodeChange () throws FieldException
{
}
public FieldWriteability getWriteability_CouponCode ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute CouponCode. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setCouponCode (String newCouponCode) throws FieldException
{
boolean oldAndNewIdentical = HELPER_CouponCode.compare (_CouponCode, newCouponCode);
try
{
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
newCouponCode = bhd.setCouponCode ((HiringTeam)this, newCouponCode);
oldAndNewIdentical = HELPER_CouponCode.compare (_CouponCode, newCouponCode);
}
if (FIELD_CouponCode_Validators.length > 0)
{
Object newCouponCodeObj = HELPER_CouponCode.toObject (newCouponCode);
if (newCouponCodeObj != null)
{
int loopMax = FIELD_CouponCode_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_HiringTeam.get (FIELD_CouponCode);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_CouponCode_Validators[v].checkAttribute (this, FIELD_CouponCode, metadata, newCouponCodeObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_CouponCode () != FieldWriteability.FALSE, "Field CouponCode is not writeable");
preCouponCodeChange (newCouponCode);
markFieldChange (FIELD_CouponCode);
_CouponCode = newCouponCode;
postFieldChange (FIELD_CouponCode);
postCouponCodeChange ();
}
}
/** /**
...@@ -3624,6 +4114,9 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -3624,6 +4114,9 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
tl_hiring_teamPSet.setAttrib (FIELD_CardID, HELPER_CardID.toObject (_CardID)); // tl_hiring_teamPSet.setAttrib (FIELD_CardID, HELPER_CardID.toObject (_CardID)); //
tl_hiring_teamPSet.setAttrib (FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.toObject (_PlanRenewedOn)); // tl_hiring_teamPSet.setAttrib (FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.toObject (_PlanRenewedOn)); //
tl_hiring_teamPSet.setAttrib (FIELD_UsedCredits, HELPER_UsedCredits.toObject (_UsedCredits)); // tl_hiring_teamPSet.setAttrib (FIELD_UsedCredits, HELPER_UsedCredits.toObject (_UsedCredits)); //
tl_hiring_teamPSet.setAttrib (FIELD_IsPPJ, HELPER_IsPPJ.toObject (_IsPPJ)); //
tl_hiring_teamPSet.setAttrib (FIELD_HasCap, HELPER_HasCap.toObject (_HasCap)); //
tl_hiring_teamPSet.setAttrib (FIELD_MaxCap, HELPER_MaxCap.toObject (_MaxCap)); //
_Company.getPersistentSets (allSets); _Company.getPersistentSets (allSets);
_BillingTeam.getPersistentSets (allSets); _BillingTeam.getPersistentSets (allSets);
_AddedByUser.getPersistentSets (allSets); _AddedByUser.getPersistentSets (allSets);
...@@ -3660,6 +4153,9 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -3660,6 +4153,9 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_CardID = (String)(HELPER_CardID.fromObject (_CardID, tl_hiring_teamPSet.getAttrib (FIELD_CardID))); // _CardID = (String)(HELPER_CardID.fromObject (_CardID, tl_hiring_teamPSet.getAttrib (FIELD_CardID))); //
_PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.fromObject (_PlanRenewedOn, tl_hiring_teamPSet.getAttrib (FIELD_PlanRenewedOn))); // _PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.fromObject (_PlanRenewedOn, tl_hiring_teamPSet.getAttrib (FIELD_PlanRenewedOn))); //
_UsedCredits = (Integer)(HELPER_UsedCredits.fromObject (_UsedCredits, tl_hiring_teamPSet.getAttrib (FIELD_UsedCredits))); // _UsedCredits = (Integer)(HELPER_UsedCredits.fromObject (_UsedCredits, tl_hiring_teamPSet.getAttrib (FIELD_UsedCredits))); //
_IsPPJ = (Boolean)(HELPER_IsPPJ.fromObject (_IsPPJ, tl_hiring_teamPSet.getAttrib (FIELD_IsPPJ))); //
_HasCap = (Boolean)(HELPER_HasCap.fromObject (_HasCap, tl_hiring_teamPSet.getAttrib (FIELD_HasCap))); //
_MaxCap = (Integer)(HELPER_MaxCap.fromObject (_MaxCap, tl_hiring_teamPSet.getAttrib (FIELD_MaxCap))); //
_Company.setFromPersistentSets (objectID, allSets); _Company.setFromPersistentSets (objectID, allSets);
_BillingTeam.setFromPersistentSets (objectID, allSets); _BillingTeam.setFromPersistentSets (objectID, allSets);
_AddedByUser.setFromPersistentSets (objectID, allSets); _AddedByUser.setFromPersistentSets (objectID, allSets);
...@@ -3841,6 +4337,33 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -3841,6 +4337,33 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
e.addException (ex); e.addException (ex);
} }
try
{
setIsPPJ (otherHiringTeam.getIsPPJ ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setHasCap (otherHiringTeam.getHasCap ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setMaxCap (otherHiringTeam.getMaxCap ());
}
catch (FieldException ex)
{
e.addException (ex);
}
} }
} }
...@@ -3874,7 +4397,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -3874,7 +4397,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_CardID = sourceHiringTeam._CardID; _CardID = sourceHiringTeam._CardID;
_PlanRenewedOn = sourceHiringTeam._PlanRenewedOn; _PlanRenewedOn = sourceHiringTeam._PlanRenewedOn;
_UsedCredits = sourceHiringTeam._UsedCredits; _UsedCredits = sourceHiringTeam._UsedCredits;
_IsPPJ = sourceHiringTeam._IsPPJ;
_HasCap = sourceHiringTeam._HasCap;
_MaxCap = sourceHiringTeam._MaxCap;
_IsLogoDeleted = sourceHiringTeam._IsLogoDeleted; _IsLogoDeleted = sourceHiringTeam._IsLogoDeleted;
_CouponCode = sourceHiringTeam._CouponCode;
} }
} }
...@@ -3955,7 +4482,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -3955,7 +4482,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_CardID = (String)(HELPER_CardID.readExternal (_CardID, vals.get(FIELD_CardID))); // _CardID = (String)(HELPER_CardID.readExternal (_CardID, vals.get(FIELD_CardID))); //
_PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.readExternal (_PlanRenewedOn, vals.get(FIELD_PlanRenewedOn))); // _PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.readExternal (_PlanRenewedOn, vals.get(FIELD_PlanRenewedOn))); //
_UsedCredits = (Integer)(HELPER_UsedCredits.readExternal (_UsedCredits, vals.get(FIELD_UsedCredits))); // _UsedCredits = (Integer)(HELPER_UsedCredits.readExternal (_UsedCredits, vals.get(FIELD_UsedCredits))); //
_IsPPJ = (Boolean)(HELPER_IsPPJ.readExternal (_IsPPJ, vals.get(FIELD_IsPPJ))); //
_HasCap = (Boolean)(HELPER_HasCap.readExternal (_HasCap, vals.get(FIELD_HasCap))); //
_MaxCap = (Integer)(HELPER_MaxCap.readExternal (_MaxCap, vals.get(FIELD_MaxCap))); //
_IsLogoDeleted = (Boolean)(HELPER_IsLogoDeleted.readExternal (_IsLogoDeleted, vals.get(FIELD_IsLogoDeleted))); // _IsLogoDeleted = (Boolean)(HELPER_IsLogoDeleted.readExternal (_IsLogoDeleted, vals.get(FIELD_IsLogoDeleted))); //
_CouponCode = (String)(HELPER_CouponCode.readExternal (_CouponCode, vals.get(FIELD_CouponCode))); //
_Company.readExternalData(vals.get(SINGLEREFERENCE_Company)); _Company.readExternalData(vals.get(SINGLEREFERENCE_Company));
_BillingTeam.readExternalData(vals.get(SINGLEREFERENCE_BillingTeam)); _BillingTeam.readExternalData(vals.get(SINGLEREFERENCE_BillingTeam));
_AddedByUser.readExternalData(vals.get(SINGLEREFERENCE_AddedByUser)); _AddedByUser.readExternalData(vals.get(SINGLEREFERENCE_AddedByUser));
...@@ -3991,7 +4522,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -3991,7 +4522,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
vals.put (FIELD_CardID, HELPER_CardID.writeExternal (_CardID)); vals.put (FIELD_CardID, HELPER_CardID.writeExternal (_CardID));
vals.put (FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.writeExternal (_PlanRenewedOn)); vals.put (FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.writeExternal (_PlanRenewedOn));
vals.put (FIELD_UsedCredits, HELPER_UsedCredits.writeExternal (_UsedCredits)); vals.put (FIELD_UsedCredits, HELPER_UsedCredits.writeExternal (_UsedCredits));
vals.put (FIELD_IsPPJ, HELPER_IsPPJ.writeExternal (_IsPPJ));
vals.put (FIELD_HasCap, HELPER_HasCap.writeExternal (_HasCap));
vals.put (FIELD_MaxCap, HELPER_MaxCap.writeExternal (_MaxCap));
vals.put (FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.writeExternal (_IsLogoDeleted)); vals.put (FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.writeExternal (_IsLogoDeleted));
vals.put (FIELD_CouponCode, HELPER_CouponCode.writeExternal (_CouponCode));
vals.put (SINGLEREFERENCE_Company, _Company.writeExternalData()); vals.put (SINGLEREFERENCE_Company, _Company.writeExternalData());
vals.put (SINGLEREFERENCE_BillingTeam, _BillingTeam.writeExternalData()); vals.put (SINGLEREFERENCE_BillingTeam, _BillingTeam.writeExternalData());
vals.put (SINGLEREFERENCE_AddedByUser, _AddedByUser.writeExternalData()); vals.put (SINGLEREFERENCE_AddedByUser, _AddedByUser.writeExternalData());
...@@ -4083,6 +4618,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4083,6 +4618,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
listener.notifyFieldChange(this, other, FIELD_UsedCredits, HELPER_UsedCredits.toObject(this._UsedCredits), HELPER_UsedCredits.toObject(otherHiringTeam._UsedCredits)); listener.notifyFieldChange(this, other, FIELD_UsedCredits, HELPER_UsedCredits.toObject(this._UsedCredits), HELPER_UsedCredits.toObject(otherHiringTeam._UsedCredits));
} }
if (!HELPER_IsPPJ.compare(this._IsPPJ, otherHiringTeam._IsPPJ))
{
listener.notifyFieldChange(this, other, FIELD_IsPPJ, HELPER_IsPPJ.toObject(this._IsPPJ), HELPER_IsPPJ.toObject(otherHiringTeam._IsPPJ));
}
if (!HELPER_HasCap.compare(this._HasCap, otherHiringTeam._HasCap))
{
listener.notifyFieldChange(this, other, FIELD_HasCap, HELPER_HasCap.toObject(this._HasCap), HELPER_HasCap.toObject(otherHiringTeam._HasCap));
}
if (!HELPER_MaxCap.compare(this._MaxCap, otherHiringTeam._MaxCap))
{
listener.notifyFieldChange(this, other, FIELD_MaxCap, HELPER_MaxCap.toObject(this._MaxCap), HELPER_MaxCap.toObject(otherHiringTeam._MaxCap));
}
// Compare single assocs // Compare single assocs
_Company.compare (otherHiringTeam._Company, listener); _Company.compare (otherHiringTeam._Company, listener);
...@@ -4104,6 +4651,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4104,6 +4651,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
super.visitAttributes (visitor); super.visitAttributes (visitor);
visitor.visitField(this, FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.toObject(getIsLogoDeleted())); visitor.visitField(this, FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.toObject(getIsLogoDeleted()));
visitor.visitField(this, FIELD_CouponCode, HELPER_CouponCode.toObject(getCouponCode()));
} }
...@@ -4130,6 +4678,9 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4130,6 +4678,9 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
visitor.visitField(this, FIELD_CardID, HELPER_CardID.toObject(getCardID())); visitor.visitField(this, FIELD_CardID, HELPER_CardID.toObject(getCardID()));
visitor.visitField(this, FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.toObject(getPlanRenewedOn())); visitor.visitField(this, FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.toObject(getPlanRenewedOn()));
visitor.visitField(this, FIELD_UsedCredits, HELPER_UsedCredits.toObject(getUsedCredits())); visitor.visitField(this, FIELD_UsedCredits, HELPER_UsedCredits.toObject(getUsedCredits()));
visitor.visitField(this, FIELD_IsPPJ, HELPER_IsPPJ.toObject(getIsPPJ()));
visitor.visitField(this, FIELD_HasCap, HELPER_HasCap.toObject(getHasCap()));
visitor.visitField(this, FIELD_MaxCap, HELPER_MaxCap.toObject(getMaxCap()));
visitor.visitAssociation (_Company); visitor.visitAssociation (_Company);
visitor.visitAssociation (_BillingTeam); visitor.visitAssociation (_BillingTeam);
visitor.visitAssociation (_AddedByUser); visitor.visitAssociation (_AddedByUser);
...@@ -4265,6 +4816,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4265,6 +4816,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return filter.matches (getUsedCredits ()); return filter.matches (getUsedCredits ());
} }
else if (attribName.equals (FIELD_IsPPJ))
{
return filter.matches (getIsPPJ ());
}
else if (attribName.equals (FIELD_HasCap))
{
return filter.matches (getHasCap ());
}
else if (attribName.equals (FIELD_MaxCap))
{
return filter.matches (getMaxCap ());
}
else if (attribName.equals (SINGLEREFERENCE_Company)) else if (attribName.equals (SINGLEREFERENCE_Company))
{ {
return filter.matches (getCompany ()); return filter.matches (getCompany ());
...@@ -4420,6 +4983,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4420,6 +4983,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return this; return this;
} }
public SearchAll andIsPPJ (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_hiring_team.is_ppj", "IsPPJ");
return this;
}
public SearchAll andHasCap (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_hiring_team.has_cap", "HasCap");
return this;
}
public SearchAll andMaxCap (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_hiring_team.max_cap", "MaxCap");
return this;
}
public SearchAll andCompany (QueryFilter<Company> filter) public SearchAll andCompany (QueryFilter<Company> filter)
{ {
filter.addFilter (context, "tl_hiring_team.company_id", "Company"); filter.addFilter (context, "tl_hiring_team.company_id", "Company");
...@@ -4551,10 +5132,26 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4551,10 +5132,26 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return HELPER_UsedCredits.toObject (getUsedCredits ()); return HELPER_UsedCredits.toObject (getUsedCredits ());
} }
else if (attribName.equals (FIELD_IsPPJ))
{
return HELPER_IsPPJ.toObject (getIsPPJ ());
}
else if (attribName.equals (FIELD_HasCap))
{
return HELPER_HasCap.toObject (getHasCap ());
}
else if (attribName.equals (FIELD_MaxCap))
{
return HELPER_MaxCap.toObject (getMaxCap ());
}
else if (attribName.equals (FIELD_IsLogoDeleted)) else if (attribName.equals (FIELD_IsLogoDeleted))
{ {
return HELPER_IsLogoDeleted.toObject (getIsLogoDeleted ()); return HELPER_IsLogoDeleted.toObject (getIsLogoDeleted ());
} }
else if (attribName.equals (FIELD_CouponCode))
{
return HELPER_CouponCode.toObject (getCouponCode ());
}
else else
{ {
return super.getAttribute (attribName); return super.getAttribute (attribName);
...@@ -4640,10 +5237,26 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4640,10 +5237,26 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return HELPER_UsedCredits; return HELPER_UsedCredits;
} }
else if (attribName.equals (FIELD_IsPPJ))
{
return HELPER_IsPPJ;
}
else if (attribName.equals (FIELD_HasCap))
{
return HELPER_HasCap;
}
else if (attribName.equals (FIELD_MaxCap))
{
return HELPER_MaxCap;
}
else if (attribName.equals (FIELD_IsLogoDeleted)) else if (attribName.equals (FIELD_IsLogoDeleted))
{ {
return HELPER_IsLogoDeleted; return HELPER_IsLogoDeleted;
} }
else if (attribName.equals (FIELD_CouponCode))
{
return HELPER_CouponCode;
}
else else
{ {
return super.getAttributeHelper (attribName); return super.getAttributeHelper (attribName);
...@@ -4729,10 +5342,26 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4729,10 +5342,26 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
setUsedCredits ((Integer)(HELPER_UsedCredits.fromObject (_UsedCredits, attribValue))); setUsedCredits ((Integer)(HELPER_UsedCredits.fromObject (_UsedCredits, attribValue)));
} }
else if (attribName.equals (FIELD_IsPPJ))
{
setIsPPJ ((Boolean)(HELPER_IsPPJ.fromObject (_IsPPJ, attribValue)));
}
else if (attribName.equals (FIELD_HasCap))
{
setHasCap ((Boolean)(HELPER_HasCap.fromObject (_HasCap, attribValue)));
}
else if (attribName.equals (FIELD_MaxCap))
{
setMaxCap ((Integer)(HELPER_MaxCap.fromObject (_MaxCap, attribValue)));
}
else if (attribName.equals (FIELD_IsLogoDeleted)) else if (attribName.equals (FIELD_IsLogoDeleted))
{ {
setIsLogoDeleted ((Boolean)(HELPER_IsLogoDeleted.fromObject (_IsLogoDeleted, attribValue))); setIsLogoDeleted ((Boolean)(HELPER_IsLogoDeleted.fromObject (_IsLogoDeleted, attribValue)));
} }
else if (attribName.equals (FIELD_CouponCode))
{
setCouponCode ((String)(HELPER_CouponCode.fromObject (_CouponCode, attribValue)));
}
else else
{ {
super.setAttribute (attribName, attribValue); super.setAttribute (attribName, attribValue);
...@@ -4825,6 +5454,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4825,6 +5454,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return getWriteability_UsedCredits (); return getWriteability_UsedCredits ();
} }
else if (fieldName.equals (FIELD_IsPPJ))
{
return getWriteability_IsPPJ ();
}
else if (fieldName.equals (FIELD_HasCap))
{
return getWriteability_HasCap ();
}
else if (fieldName.equals (FIELD_MaxCap))
{
return getWriteability_MaxCap ();
}
else if (fieldName.equals (MULTIPLEREFERENCE_Users)) else if (fieldName.equals (MULTIPLEREFERENCE_Users))
{ {
return getWriteability_Users (); return getWriteability_Users ();
...@@ -4853,6 +5494,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4853,6 +5494,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return getWriteability_IsLogoDeleted (); return getWriteability_IsLogoDeleted ();
} }
else if (fieldName.equals (FIELD_CouponCode))
{
return getWriteability_CouponCode ();
}
else else
{ {
return super.getWriteable (fieldName); return super.getWriteable (fieldName);
...@@ -4953,11 +5598,31 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4953,11 +5598,31 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
fields.add (FIELD_UsedCredits); fields.add (FIELD_UsedCredits);
} }
if (getWriteability_IsPPJ () != FieldWriteability.TRUE)
{
fields.add (FIELD_IsPPJ);
}
if (getWriteability_HasCap () != FieldWriteability.TRUE)
{
fields.add (FIELD_HasCap);
}
if (getWriteability_MaxCap () != FieldWriteability.TRUE)
{
fields.add (FIELD_MaxCap);
}
if (getWriteability_IsLogoDeleted () != FieldWriteability.TRUE) if (getWriteability_IsLogoDeleted () != FieldWriteability.TRUE)
{ {
fields.add (FIELD_IsLogoDeleted); fields.add (FIELD_IsLogoDeleted);
} }
if (getWriteability_CouponCode () != FieldWriteability.TRUE)
{
fields.add (FIELD_CouponCode);
}
super.putUnwriteable (fields); super.putUnwriteable (fields);
} }
...@@ -4985,7 +5650,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4985,7 +5650,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
result.add(HELPER_CardID.getAttribObject (getClass (), _CardID, false, FIELD_CardID)); result.add(HELPER_CardID.getAttribObject (getClass (), _CardID, false, FIELD_CardID));
result.add(HELPER_PlanRenewedOn.getAttribObject (getClass (), _PlanRenewedOn, false, FIELD_PlanRenewedOn)); result.add(HELPER_PlanRenewedOn.getAttribObject (getClass (), _PlanRenewedOn, false, FIELD_PlanRenewedOn));
result.add(HELPER_UsedCredits.getAttribObject (getClass (), _UsedCredits, false, FIELD_UsedCredits)); result.add(HELPER_UsedCredits.getAttribObject (getClass (), _UsedCredits, false, FIELD_UsedCredits));
result.add(HELPER_IsPPJ.getAttribObject (getClass (), _IsPPJ, false, FIELD_IsPPJ));
result.add(HELPER_HasCap.getAttribObject (getClass (), _HasCap, false, FIELD_HasCap));
result.add(HELPER_MaxCap.getAttribObject (getClass (), _MaxCap, false, FIELD_MaxCap));
result.add(HELPER_IsLogoDeleted.getAttribObject (getClass (), _IsLogoDeleted, false, FIELD_IsLogoDeleted)); result.add(HELPER_IsLogoDeleted.getAttribObject (getClass (), _IsLogoDeleted, false, FIELD_IsLogoDeleted));
result.add(HELPER_CouponCode.getAttribObject (getClass (), _CouponCode, false, FIELD_CouponCode));
return result; return result;
} }
...@@ -5379,6 +6048,60 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -5379,6 +6048,60 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
} }
/** /**
* Get the attribute IsPPJ
*/
public Boolean getIsPPJ (HiringTeam obj, Boolean original)
{
return original;
}
/**
* Change the value set for attribute IsPPJ.
* May modify the field beforehand
* Occurs before validation.
*/
public Boolean setIsPPJ (HiringTeam obj, Boolean newIsPPJ) throws FieldException
{
return newIsPPJ;
}
/**
* Get the attribute HasCap
*/
public Boolean getHasCap (HiringTeam obj, Boolean original)
{
return original;
}
/**
* Change the value set for attribute HasCap.
* May modify the field beforehand
* Occurs before validation.
*/
public Boolean setHasCap (HiringTeam obj, Boolean newHasCap) throws FieldException
{
return newHasCap;
}
/**
* Get the attribute MaxCap
*/
public Integer getMaxCap (HiringTeam obj, Integer original)
{
return original;
}
/**
* Change the value set for attribute MaxCap.
* May modify the field beforehand
* Occurs before validation.
*/
public Integer setMaxCap (HiringTeam obj, Integer newMaxCap) throws FieldException
{
return newMaxCap;
}
/**
* Get the attribute IsLogoDeleted * Get the attribute IsLogoDeleted
*/ */
public Boolean getIsLogoDeleted (HiringTeam obj, Boolean original) public Boolean getIsLogoDeleted (HiringTeam obj, Boolean original)
...@@ -5396,6 +6119,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -5396,6 +6119,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return newIsLogoDeleted; return newIsLogoDeleted;
} }
/**
* Get the attribute CouponCode
*/
public String getCouponCode (HiringTeam obj, String original)
{
return original;
}
/**
* Change the value set for attribute CouponCode.
* May modify the field beforehand
* Occurs before validation.
*/
public String setCouponCode (HiringTeam obj, String newCouponCode) throws FieldException
{
return newCouponCode;
}
} }
...@@ -5460,6 +6201,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -5460,6 +6201,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return toIsLogoDeleted (); return toIsLogoDeleted ();
} }
if (name.equals ("CouponCode"))
{
return toCouponCode ();
}
if (name.equals ("HiringTeamName")) if (name.equals ("HiringTeamName"))
{ {
return toHiringTeamName (); return toHiringTeamName ();
...@@ -5532,6 +6277,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -5532,6 +6277,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return toUsedCredits (); return toUsedCredits ();
} }
if (name.equals ("IsPPJ"))
{
return toIsPPJ ();
}
if (name.equals ("HasCap"))
{
return toHasCap ();
}
if (name.equals ("MaxCap"))
{
return toMaxCap ();
}
if (name.equals ("Company")) if (name.equals ("Company"))
{ {
return toCompany (); return toCompany ();
...@@ -5556,6 +6313,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -5556,6 +6313,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
public PipeLine<From, Boolean> toIsLogoDeleted () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsLogoDeleted)); } public PipeLine<From, Boolean> toIsLogoDeleted () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsLogoDeleted)); }
public PipeLine<From, String> toCouponCode () { return pipe(new ORMAttributePipe<Me, String>(FIELD_CouponCode)); }
public PipeLine<From, String> toHiringTeamName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_HiringTeamName)); } public PipeLine<From, String> toHiringTeamName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_HiringTeamName)); }
public PipeLine<From, BinaryContent> toHiringTeamLogo () { return pipe(new ORMAttributePipe<Me, BinaryContent>(FIELD_HiringTeamLogo)); } public PipeLine<From, BinaryContent> toHiringTeamLogo () { return pipe(new ORMAttributePipe<Me, BinaryContent>(FIELD_HiringTeamLogo)); }
...@@ -5591,6 +6350,12 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -5591,6 +6350,12 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
public PipeLine<From, Date> toPlanRenewedOn () { return pipe(new ORMAttributePipe<Me, Date>(FIELD_PlanRenewedOn)); } public PipeLine<From, Date> toPlanRenewedOn () { return pipe(new ORMAttributePipe<Me, Date>(FIELD_PlanRenewedOn)); }
public PipeLine<From, Integer> toUsedCredits () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_UsedCredits)); } public PipeLine<From, Integer> toUsedCredits () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_UsedCredits)); }
public PipeLine<From, Boolean> toIsPPJ () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsPPJ)); }
public PipeLine<From, Boolean> toHasCap () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_HasCap)); }
public PipeLine<From, Integer> toMaxCap () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_MaxCap)); }
public Company.CompanyPipeLineFactory<From, Company> toCompany () { return toCompany (Filter.ALL); } public Company.CompanyPipeLineFactory<From, Company> toCompany () { return toCompany (Filter.ALL); }
public Company.CompanyPipeLineFactory<From, Company> toCompany (Filter<Company> filter) public Company.CompanyPipeLineFactory<From, Company> toCompany (Filter<Company> filter)
...@@ -5638,6 +6403,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -5638,6 +6403,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return true; return true;
} }
if(CollectionUtils.equals(attribName, "CouponCode"))
{
return true;
}
return super.isTransientAttrib(attribName); return super.isTransientAttrib(attribName);
} }
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<MULTIPLEREFERENCE name="Clients" type="Client" backreferenceName="HiringTeam" /> <MULTIPLEREFERENCE name="Clients" type="Client" backreferenceName="HiringTeam" />
<TRANSIENT name="IsLogoDeleted" type="Boolean" defaultValue="Boolean.FALSE"/> <TRANSIENT name="IsLogoDeleted" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="CouponCode" type="String" length="20"/>
<TABLE name="tl_hiring_team" tablePrefix="object"> <TABLE name="tl_hiring_team" tablePrefix="object">
...@@ -33,6 +34,9 @@ ...@@ -33,6 +34,9 @@
<ATTRIB name="CardID" type="String" dbcol="card_id" length="100" /> <ATTRIB name="CardID" type="String" dbcol="card_id" length="100" />
<ATTRIB name="PlanRenewedOn" type="Date" dbcol="plan_renewed_on" mandatory="false" /> <ATTRIB name="PlanRenewedOn" type="Date" dbcol="plan_renewed_on" mandatory="false" />
<ATTRIB name="UsedCredits" type="Integer" dbcol="used_credits" /> <ATTRIB name="UsedCredits" type="Integer" dbcol="used_credits" />
<ATTRIB name="IsPPJ" type="Boolean" dbcol="is_ppj" defaultValue="Boolean.TRUE"/>
<ATTRIB name="HasCap" type="Boolean" dbcol="has_cap" defaultValue="Boolean.FALSE"/>
<ATTRIB name="MaxCap" type="Integer" dbcol="max_cap" />
<SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" mandatory="true" backreferenceName="HiringTeams" /> <SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" mandatory="true" backreferenceName="HiringTeams" />
<SINGLEREFERENCE name="BillingTeam" type="HiringTeam" dbcol="billing_team_id" mandatory="false" /> <SINGLEREFERENCE name="BillingTeam" type="HiringTeam" dbcol="billing_team_id" mandatory="false" />
......
...@@ -47,6 +47,9 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -47,6 +47,9 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
private String dummyCardID; private String dummyCardID;
private Date dummyPlanRenewedOn; private Date dummyPlanRenewedOn;
private Integer dummyUsedCredits; private Integer dummyUsedCredits;
private Boolean dummyIsPPJ;
private Boolean dummyHasCap;
private Integer dummyMaxCap;
// Static constants corresponding to attribute helpers // Static constants corresponding to attribute helpers
...@@ -68,6 +71,9 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -68,6 +71,9 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
private static final DefaultAttributeHelper HELPER_CardID = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_CardID = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_PlanRenewedOn = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_PlanRenewedOn = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_UsedCredits = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_UsedCredits = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_IsPPJ = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_HasCap = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_MaxCap = DefaultAttributeHelper.INSTANCE;
...@@ -92,10 +98,13 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -92,10 +98,13 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
dummyCardID = (String)(HELPER_CardID.initialise (dummyCardID)); dummyCardID = (String)(HELPER_CardID.initialise (dummyCardID));
dummyPlanRenewedOn = (Date)(HELPER_PlanRenewedOn.initialise (dummyPlanRenewedOn)); dummyPlanRenewedOn = (Date)(HELPER_PlanRenewedOn.initialise (dummyPlanRenewedOn));
dummyUsedCredits = (Integer)(HELPER_UsedCredits.initialise (dummyUsedCredits)); dummyUsedCredits = (Integer)(HELPER_UsedCredits.initialise (dummyUsedCredits));
dummyIsPPJ = (Boolean)(HELPER_IsPPJ.initialise (dummyIsPPJ));
dummyHasCap = (Boolean)(HELPER_HasCap.initialise (dummyHasCap));
dummyMaxCap = (Integer)(HELPER_MaxCap.initialise (dummyMaxCap));
} }
private String SELECT_COLUMNS = "{PREFIX}tl_hiring_team.object_id as id, {PREFIX}tl_hiring_team.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_hiring_team.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_hiring_team.hiring_team_name, {PREFIX}tl_hiring_team.hiring_team_logo, {PREFIX}tl_hiring_team.hiring_team_type, {PREFIX}tl_hiring_team.industry, {PREFIX}tl_hiring_team.time_zone, {PREFIX}tl_hiring_team.state, {PREFIX}tl_hiring_team.country, {PREFIX}tl_hiring_team.post_code, {PREFIX}tl_hiring_team.city, {PREFIX}tl_hiring_team.has_client_support, {PREFIX}tl_hiring_team.manage_own_billing, {PREFIX}tl_hiring_team.stripe_reference, {PREFIX}tl_hiring_team.stripe_subscription, {PREFIX}tl_hiring_team.name_on_card, {PREFIX}tl_hiring_team.card_post_code, {PREFIX}tl_hiring_team.card_id, {PREFIX}tl_hiring_team.plan_renewed_on, {PREFIX}tl_hiring_team.used_credits, {PREFIX}tl_hiring_team.company_id, {PREFIX}tl_hiring_team.billing_team_id, {PREFIX}tl_hiring_team.added_by_user_id, {PREFIX}tl_hiring_team.payment_plan_id, 1 AS commasafe "; private String SELECT_COLUMNS = "{PREFIX}tl_hiring_team.object_id as id, {PREFIX}tl_hiring_team.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_hiring_team.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_hiring_team.hiring_team_name, {PREFIX}tl_hiring_team.hiring_team_logo, {PREFIX}tl_hiring_team.hiring_team_type, {PREFIX}tl_hiring_team.industry, {PREFIX}tl_hiring_team.time_zone, {PREFIX}tl_hiring_team.state, {PREFIX}tl_hiring_team.country, {PREFIX}tl_hiring_team.post_code, {PREFIX}tl_hiring_team.city, {PREFIX}tl_hiring_team.has_client_support, {PREFIX}tl_hiring_team.manage_own_billing, {PREFIX}tl_hiring_team.stripe_reference, {PREFIX}tl_hiring_team.stripe_subscription, {PREFIX}tl_hiring_team.name_on_card, {PREFIX}tl_hiring_team.card_post_code, {PREFIX}tl_hiring_team.card_id, {PREFIX}tl_hiring_team.plan_renewed_on, {PREFIX}tl_hiring_team.used_credits, {PREFIX}tl_hiring_team.is_ppj, {PREFIX}tl_hiring_team.has_cap, {PREFIX}tl_hiring_team.max_cap, {PREFIX}tl_hiring_team.company_id, {PREFIX}tl_hiring_team.billing_team_id, {PREFIX}tl_hiring_team.added_by_user_id, {PREFIX}tl_hiring_team.payment_plan_id, 1 AS commasafe ";
private String SELECT_JOINS = ""; private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
...@@ -164,6 +173,9 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -164,6 +173,9 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_CardID)|| !tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_CardID)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_PlanRenewedOn)|| !tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_PlanRenewedOn)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_UsedCredits)|| !tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_UsedCredits)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_IsPPJ)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_HasCap)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_MaxCap)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_Company)|| !tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_Company)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_BillingTeam)|| !tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_BillingTeam)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_AddedByUser)|| !tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_AddedByUser)||
...@@ -247,10 +259,10 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -247,10 +259,10 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
{ {
int rowsUpdated = executeStatement (sqlMgr, int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_hiring_team " + "UPDATE {PREFIX}tl_hiring_team " +
"SET hiring_team_name = ?, hiring_team_logo = ?, hiring_team_type = ?, industry = ?, time_zone = ?, state = ?, country = ?, post_code = ?, city = ?, has_client_support = ?, manage_own_billing = ?, stripe_reference = ?, stripe_subscription = ?, name_on_card = ?, card_post_code = ?, card_id = ?, plan_renewed_on = ?, used_credits = ?, company_id = ? , billing_team_id = ? , added_by_user_id = ? , payment_plan_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET hiring_team_name = ?, hiring_team_logo = ?, hiring_team_type = ?, industry = ?, time_zone = ?, state = ?, country = ?, post_code = ?, city = ?, has_client_support = ?, manage_own_billing = ?, stripe_reference = ?, stripe_subscription = ?, name_on_card = ?, card_post_code = ?, card_id = ?, plan_renewed_on = ?, used_credits = ?, is_ppj = ?, has_cap = ?, max_cap = ?, company_id = ? , billing_team_id = ? , added_by_user_id = ? , payment_plan_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_hiring_team.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE tl_hiring_team.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_HiringTeamName.getForSQL(dummyHiringTeamName, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamName))).listEntry (HELPER_HiringTeamLogo.getForSQL(dummyHiringTeamLogo, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamLogo))).listEntry (HELPER_HiringTeamType.getForSQL(dummyHiringTeamType, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Industry))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_TimeZone))).listEntry (HELPER_State.getForSQL(dummyState, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_City))).listEntry (HELPER_HasClientSupport.getForSQL(dummyHasClientSupport, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasClientSupport))).listEntry (HELPER_ManageOwnBilling.getForSQL(dummyManageOwnBilling, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_ManageOwnBilling))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeSubscription))).listEntry (HELPER_NameOnCard.getForSQL(dummyNameOnCard, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_NameOnCard))).listEntry (HELPER_CardPostCode.getForSQL(dummyCardPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardPostCode))).listEntry (HELPER_CardID.getForSQL(dummyCardID, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardID))).listEntry (HELPER_PlanRenewedOn.getForSQL(dummyPlanRenewedOn, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanRenewedOn))).listEntry (HELPER_UsedCredits.getForSQL(dummyUsedCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_UsedCredits))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Company)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_BillingTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_AddedByUser)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_PaymentPlan)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (HELPER_HiringTeamName.getForSQL(dummyHiringTeamName, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamName))).listEntry (HELPER_HiringTeamLogo.getForSQL(dummyHiringTeamLogo, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamLogo))).listEntry (HELPER_HiringTeamType.getForSQL(dummyHiringTeamType, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Industry))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_TimeZone))).listEntry (HELPER_State.getForSQL(dummyState, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_City))).listEntry (HELPER_HasClientSupport.getForSQL(dummyHasClientSupport, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasClientSupport))).listEntry (HELPER_ManageOwnBilling.getForSQL(dummyManageOwnBilling, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_ManageOwnBilling))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeSubscription))).listEntry (HELPER_NameOnCard.getForSQL(dummyNameOnCard, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_NameOnCard))).listEntry (HELPER_CardPostCode.getForSQL(dummyCardPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardPostCode))).listEntry (HELPER_CardID.getForSQL(dummyCardID, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardID))).listEntry (HELPER_PlanRenewedOn.getForSQL(dummyPlanRenewedOn, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanRenewedOn))).listEntry (HELPER_UsedCredits.getForSQL(dummyUsedCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_UsedCredits))).listEntry (HELPER_IsPPJ.getForSQL(dummyIsPPJ, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_IsPPJ))).listEntry (HELPER_HasCap.getForSQL(dummyHasCap, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasCap))).listEntry (HELPER_MaxCap.getForSQL(dummyMaxCap, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_MaxCap))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Company)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_BillingTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_AddedByUser)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_PaymentPlan)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -524,6 +536,9 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -524,6 +536,9 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_CardID, HELPER_CardID.getFromRS(dummyCardID, r, "card_id")); tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_CardID, HELPER_CardID.getFromRS(dummyCardID, r, "card_id"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.getFromRS(dummyPlanRenewedOn, r, "plan_renewed_on")); tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.getFromRS(dummyPlanRenewedOn, r, "plan_renewed_on"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_UsedCredits, HELPER_UsedCredits.getFromRS(dummyUsedCredits, r, "used_credits")); tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_UsedCredits, HELPER_UsedCredits.getFromRS(dummyUsedCredits, r, "used_credits"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_IsPPJ, HELPER_IsPPJ.getFromRS(dummyIsPPJ, r, "is_ppj"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_HasCap, HELPER_HasCap.getFromRS(dummyHasCap, r, "has_cap"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_MaxCap, HELPER_MaxCap.getFromRS(dummyMaxCap, r, "max_cap"));
tl_hiring_teamPSet.setAttrib(HiringTeam.SINGLEREFERENCE_Company, r.getObject ("company_id")); tl_hiring_teamPSet.setAttrib(HiringTeam.SINGLEREFERENCE_Company, r.getObject ("company_id"));
tl_hiring_teamPSet.setAttrib(HiringTeam.SINGLEREFERENCE_BillingTeam, r.getObject ("billing_team_id")); tl_hiring_teamPSet.setAttrib(HiringTeam.SINGLEREFERENCE_BillingTeam, r.getObject ("billing_team_id"));
...@@ -545,10 +560,10 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -545,10 +560,10 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
{ {
executeStatement (sqlMgr, executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_hiring_team " + "INSERT INTO {PREFIX}tl_hiring_team " +
" (hiring_team_name, hiring_team_logo, hiring_team_type, industry, time_zone, state, country, post_code, city, has_client_support, manage_own_billing, stripe_reference, stripe_subscription, name_on_card, card_post_code, card_id, plan_renewed_on, used_credits, company_id, billing_team_id, added_by_user_id, payment_plan_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " + " (hiring_team_name, hiring_team_logo, hiring_team_type, industry, time_zone, state, country, post_code, city, has_client_support, manage_own_billing, stripe_reference, stripe_subscription, name_on_card, card_post_code, card_id, plan_renewed_on, used_credits, is_ppj, has_cap, max_cap, company_id, billing_team_id, added_by_user_id, payment_plan_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " + "VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_HiringTeamName.getForSQL(dummyHiringTeamName, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamName))).listEntry (HELPER_HiringTeamLogo.getForSQL(dummyHiringTeamLogo, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamLogo))).listEntry (HELPER_HiringTeamType.getForSQL(dummyHiringTeamType, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Industry))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_TimeZone))).listEntry (HELPER_State.getForSQL(dummyState, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_City))).listEntry (HELPER_HasClientSupport.getForSQL(dummyHasClientSupport, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasClientSupport))).listEntry (HELPER_ManageOwnBilling.getForSQL(dummyManageOwnBilling, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_ManageOwnBilling))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeSubscription))).listEntry (HELPER_NameOnCard.getForSQL(dummyNameOnCard, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_NameOnCard))).listEntry (HELPER_CardPostCode.getForSQL(dummyCardPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardPostCode))).listEntry (HELPER_CardID.getForSQL(dummyCardID, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardID))).listEntry (HELPER_PlanRenewedOn.getForSQL(dummyPlanRenewedOn, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanRenewedOn))).listEntry (HELPER_UsedCredits.getForSQL(dummyUsedCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_UsedCredits))) .listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Company)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_BillingTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_AddedByUser)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_PaymentPlan)))) .listEntry (objectID.longID ()).toList().toArray()); CollectionUtils.listEntry (HELPER_HiringTeamName.getForSQL(dummyHiringTeamName, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamName))).listEntry (HELPER_HiringTeamLogo.getForSQL(dummyHiringTeamLogo, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamLogo))).listEntry (HELPER_HiringTeamType.getForSQL(dummyHiringTeamType, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Industry))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_TimeZone))).listEntry (HELPER_State.getForSQL(dummyState, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_City))).listEntry (HELPER_HasClientSupport.getForSQL(dummyHasClientSupport, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasClientSupport))).listEntry (HELPER_ManageOwnBilling.getForSQL(dummyManageOwnBilling, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_ManageOwnBilling))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeSubscription))).listEntry (HELPER_NameOnCard.getForSQL(dummyNameOnCard, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_NameOnCard))).listEntry (HELPER_CardPostCode.getForSQL(dummyCardPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardPostCode))).listEntry (HELPER_CardID.getForSQL(dummyCardID, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardID))).listEntry (HELPER_PlanRenewedOn.getForSQL(dummyPlanRenewedOn, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanRenewedOn))).listEntry (HELPER_UsedCredits.getForSQL(dummyUsedCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_UsedCredits))).listEntry (HELPER_IsPPJ.getForSQL(dummyIsPPJ, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_IsPPJ))).listEntry (HELPER_HasCap.getForSQL(dummyHasCap, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasCap))).listEntry (HELPER_MaxCap.getForSQL(dummyMaxCap, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_MaxCap))) .listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Company)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_BillingTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_AddedByUser)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_PaymentPlan)))) .listEntry (objectID.longID ()).toList().toArray());
tl_hiring_teamPSet.setStatus (PersistentSetStatus.PROCESSED); tl_hiring_teamPSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<% <%
String tabNumber = (String) getData(request, "TabNumber"); String tabNumber = (String) getData(request, "TabNumber");
String firstPage = WebUtils.getSamePageInRenderMode(request, "Page"); String firstPage = WebUtils.getSamePageInRenderMode(request, "Page");
String detailsPage = WebUtils.getSamePageInRenderMode(request, "HiringTeam");
String secondPage = WebUtils.getSamePageInRenderMode(request, "ManagePlan"); String secondPage = WebUtils.getSamePageInRenderMode(request, "ManagePlan");
String thirdPage = WebUtils.getSamePageInRenderMode(request, "Billing"); String thirdPage = WebUtils.getSamePageInRenderMode(request, "Billing");
String forthPage = WebUtils.getSamePageInRenderMode(request, "Invoices"); String forthPage = WebUtils.getSamePageInRenderMode(request, "Invoices");
...@@ -20,7 +21,7 @@ ...@@ -20,7 +21,7 @@
<ul class="nav nav-tabs tabs-left"> <ul class="nav nav-tabs tabs-left">
<li class="<%= tabNumber == "1" ? "active" : ""%>"> <li class="<%= tabNumber == "1" ? "active" : ""%>">
<oneit:button value=" " name="gotoPage" skin="link" <oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", firstPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", detailsPage)
.toMap() %>"> .toMap() %>">
Team Details Team Details
</oneit:button> </oneit:button>
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<div class="<%= widthClass %> appli-l eq-second-height"> <div class="<%= widthClass %> appli-l eq-second-height">
<span class="appli-view-bar"> <span class="appli-view-bar">
<div class="progress"> <div class="progress">
<div class="progress-bar <%= (criteriaVal == 100 ? " green" : "")%>" role="progressbar" aria-valuenow="<%= criteria %>" aria-valuemin="0" aria-valuemax="100" <div class="progress-bar <%= (criteriaVal == 100 && !missingReq ? " green" : "")%>" role="progressbar" aria-valuenow="<%= criteria %>" aria-valuemin="0" aria-valuemax="100"
style="<%= "width: " + criteria %>"> style="<%= "width: " + criteria %>">
</div> </div>
</div> </div>
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
job.setHiringTeam(hiringTeam); job.setHiringTeam(hiringTeam);
job.setJobOwner(companyUser); job.setJobOwner(companyUser);
%> %>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() $(document).ready(function()
...@@ -38,15 +36,15 @@ ...@@ -38,15 +36,15 @@
$(".oneit-radio input").each(function(){ $(".oneit-radio input").each(function(){
if($(this).is(':checked')) { if($(this).is(':checked')) {
updateRadioChecked(this); updateRadioChecked(this);
} }
$(this).click(function(){ $(this).click(function(){
if($(this).is(':checked')) { if($(this).is(':checked')) {
updateRadioChecked(this); updateRadioChecked(this);
} }
}); });
}); });
}); });
...@@ -68,7 +66,6 @@ ...@@ -68,7 +66,6 @@
<div class="form-page-area nopadding"> <div class="form-page-area nopadding">
<div class="create-job"> <div class="create-job">
<div class="form-page-section"> <div class="form-page-section">
<div class="form-group row"> <div class="form-group row">
<div class="col-md-12"> <div class="col-md-12">
<label class="label-16">Select a starting point</label> <label class="label-16">Select a starting point</label>
...@@ -80,42 +77,33 @@ ...@@ -80,42 +77,33 @@
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-6"> <div class="col-md-6">
<div class="oneit-radio"> <div class="oneit-radio">
<label class="create-job-selector rectangle-4"> <label class="create-job-selector rectangle-4">
<img src="images/create_from_template.png"> <img src="images/create_from_template.png">
<h3>Create from template</h3> <h3>Create from template</h3>
<oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="true"/> <oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="true"/>
<div> <div>
<tagfile:ormsingleasso_select obj="<%= job %>" assocName="JobTemplate" options="<%= jobs %>" <tagfile:ormsingleasso_select obj="<%= job %>" assocName="JobTemplate" options="<%= jobs %>"
blankValue="Select your template"/> blankValue="Select your template"/>
</div> </div>
</label>
</div>
</label>
</div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="oneit-radio" > <div class="oneit-radio" >
<label class="create-job-selector rectangle-4"> <label class="create-job-selector rectangle-4">
<img src="images/create_new_job.png">
<img src="images/create_new_job.png"> <h3>Create a new job</h3>
<h3>Create a new job</h3> <oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="false"/>
<oneit:ormInput obj="<%= job %>" type="radio" attributeName="FromTemplate" value="false"/> <div>
<div> New jobs can be saved as a template to be used in future.
New jobs can be saved as a template to be used in future. </div>
</div> </label>
</div>
</label>
</div>
</div> </div>
</div> </div>
<div class="text-center"> <div class="text-center">
<oneit:button value="Get Started" name="gotoCreateJob" cssClass="btn btn-primary largeBtn" <oneit:button value="Get Started" name="gotoCreateJob" cssClass="btn btn-primary largeBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("Job", job) .mapEntry("Job", job)
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
SecUser loggedInUser = SecUser.getTXUser(transaction); SecUser loggedInUser = SecUser.getTXUser(transaction);
CompanyUser companyUser = loggedInUser.getExtension(CompanyUser.REFERENCE_CompanyUser); CompanyUser companyUser = loggedInUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
Company company = companyUser.getCompany(); Company company = companyUser.getCompany();
HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam");
Debug.assertion(company != null , "Invalid company in admin portal my company"); Debug.assertion(company != null , "Invalid company in admin portal my company");
...@@ -17,12 +18,12 @@ ...@@ -17,12 +18,12 @@
Integer maxCount = 0; Integer maxCount = 0;
Integer minCount = 0; Integer minCount = 0;
if(company.getPaymentPlan()!=null && company.getPaymentJobCount()==null) if(company.getPaymentPlan() != null && company.getPaymentJobCount() == null)
{ {
company.setPaymentJobCount(company.getPaymentPlan().getActiveJobCount()); company.setPaymentJobCount(company.getPaymentPlan().getActiveJobCount());
} }
if(plans.length>0) if(plans.length > 0)
{ {
Collection<Integer> jCounts = PaymentPlan.pipesPaymentPlan(plans).toActiveJobCount().vals(); Collection<Integer> jCounts = PaymentPlan.pipesPaymentPlan(plans).toActiveJobCount().vals();
maxCount = Collections.max(jCounts); maxCount = Collections.max(jCounts);
...@@ -34,71 +35,13 @@ ...@@ -34,71 +35,13 @@
$(document).ready(function() $(document).ready(function()
{ {
recalcFunction = setupRecalc ($("form#editCompany"), {'recalcOnError':true}); recalcFunction = setupRecalc ($("form#editCompany"), {'recalcOnError':true});
$("#upload").change(function(){
readURL(this);
});
$("#remove-logo").click(function(){
removeLogo();
});
validate();
$('input').on('change keyup', function() { validate() });
addPostRecalcHandler(function ($fieldThatChanged) {
if (! $fieldThatChanged) {
return;
}
var name = $fieldThatChanged.attr('name');
if (typeof name !== typeof undefined && name !== false) {
if ( name.indexOf('PaymentJobCount') >= 0 ) {
validate();
}
}
});
}); });
</script>
function validate() {
// var empty = false;
// $('input[required]').each(function() {
// if ($( this ).val() == '') {
// empty = true;
// }
// });
//
// if (empty) {
// $('.save-btn').attr('disabled', 'disabled');
// } else {
// $('.save-btn').removeAttr('disabled');
// }
if ($('.subscr-change').hasClass('disabled')) {
$('.save-btn').attr('disabled', 'disabled');
} else {
$('.save-btn').removeAttr('disabled');
}
}
</script>
<style>
.subscr-change button{
background-color: grey;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
opacity: 1;
}
</style>
<div class="container-fluid"> <div class="container-fluid">
<div class="row content"> <div class="row content">
<div class="main-content-area"> <div class="main-content-area">
<h1 class="page-title">My Hiring Team</h1> <h1 class="page-title"><%= hiringTeam.getHiringTeamName() %></h1>
<div class="my-company-area"> <div class="my-company-area">
<oneit:form name="editCompany" method="post" enctype="multipart/form-data"> <oneit:form name="editCompany" method="post" enctype="multipart/form-data">
...@@ -112,140 +55,133 @@ ...@@ -112,140 +55,133 @@
<!-- Tab panes --> <!-- Tab panes -->
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="company-detail"> <div class="tab-pane active" id="company-detail">
<% <div class="tabpage-title">
if(company.getPaymentPlan()==null) <label class="label-20">Manage Plan</label>
{ </div>
%> <div>
<div class="tabpage-title"> <oneit:ormInput obj="<%= hiringTeam %>" type="text" attributeName="CouponCode" cssClass="form-control" />
<label class="label-20">No Current Plan</label><br/> <oneit:button value="Apply" name="saveCompany" cssClass="btn btn-primary"
<label class="label-14">You'll be charged each time you add a new job</label>
<div class="line-break"></div>
</div>
<div>
<label class="label-20">Talentology Subscription</label>
</div>
<div class="grey-area payment-grey-area">
<div class="text-center">
<label class="label-20">Subscribe and save</label>
</div>
<div class="a-label-row payment-type-row">
<div class="col-md-6 col-sm-6 col-xs-6 text-right">
<div class="active-jobs-per-mont">
Active Jobs Per Month
</div>
<oneit:ormInput type="number" obj="<%= company %>" attributeName="PaymentJobCount" required="true"
min="<%= minCount %>" max="<%= maxCount %>" step="1" cssClass="payment-paln-count"/>
</div>
<div class="col-md-6 col-sm-6 col-xs-6 text-left">
<oneit:recalcClass htmlTag="span" classScript="company.getPerJobPaymentPlanAmount()!=null ? 'show': 'hide'" company="<%= company %>">
<div >
<span class="payment-amt text-right">
<oneit:recalc mode="Currency" script="company.getPerJobPaymentPlanAmount()" company="<%= company %>" nullValue=""/>
</span>
<span class="text-left">
<p class="per-job">
Per Job
</p>
</span>
</div>
</oneit:recalcClass>
</div>
</div>
<div class="a-label-row text-center">
<oneit:button value="Upgrade" name="saveCompany" cssClass="btn btn-primary largeBtn btn-green save-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry ("Company", company)
.mapEntry ("IsPayment", Boolean.TRUE)
.mapEntry ("attribNamesToRestore", Collections.singleton("Company"))
.toMap() %>" /> .toMap() %>" />
</div> </div>
<div>
<oneit:recalcClass htmlTag="span" classScript="company.getPaymentPlanAmount()!=null ? 'show': 'hide'" company="<%= company %>"> coupon applied
<div class="a-label-row text-center"> <oneit:toString value="ABCD123" mode="EscapeHTML"/> - save
<div class="col-md-12 col-sm-12 col-xs-12 payment-job-det text-center"> <oneit:toString value="10%" mode="EscapeHTML"/>
<oneit:recalc mode="Currency" script="company.getPerJobPaymentPlanAmount()" company="<%= company %>" nullValue=""/> Expires
Monthly for up to <oneit:toString value="18 Sep 2018" mode="EscapeHTML"/>
<oneit:recalc mode="EscapeHTML" script="company.getPaymentJobCount()" company="<%= company %>" nullValue=""/> </div>
jobs / month
<div>
Save <div class="form-group row">
<oneit:recalc mode="Currency" script="company.getPaymentPlanSaveAmount()" company="<%= company %>" nullValue=""/> <div class="col-md-12">
per month <div class="oneit-radio">
</div> <label class="create-job-selector rectangle-4">
</div> <oneit:ormInput obj="<%= hiringTeam %>" type="radio" attributeName="IsPPJ" value="true"/>
<div class="col-md-3 col-sm-3 col-xs-3"> <div>
</div> Pay Per Job
<br/>
<span>
You'll be charged each time you add a new job
</span>
<br/>
<oneit:toString value="<%= PaymentPlan.PER_PER_JOB_AMOUNT %>" mode="Currency"/>/ Job
<br/>
was <oneit:toString value="<%= PaymentPlan.PER_PER_JOB_AMOUNT %>" mode="Currency"/> per job
</div> </div>
</oneit:recalcClass> </label>
<div class="a-label-row">&nbsp;</div>
</div>
<%
}
else
{
%>
<div class="tabpage-title">
<label class="label-20">Current Plan</label><br/>
<label class="label-14">View and edit your subscription </label>
<div class="line-break"></div>
</div> </div>
</div>
<div class="a-label-row pay-subsc-row"> </div>
<div class="col-md-6 col-sm-6 col-xs-6 text-left"> <div class="form-group row">
<label class="label-20 pay-subsc-txt">Talentology Subscription</label> <div class="col-md-12">
<div class="oneit-radio" >
<label class="create-job-selector rectangle-4">
<oneit:ormInput obj="<%= hiringTeam %>" type="radio" attributeName="IsPPJ" value="false"/>
<div>
Subscribe & Save
<br/>
<span>
Intend to post multiple jobs this month?
Find a plan to suit your hiring needs, and save today.
</spa<n>
</div>
</label>
<div>
Your subscription is billed and resets on the <oneit:toString value="12th" mode="EscapeHTML"/> of every month
</div> </div>
<div class="col-md-6 col-sm-6 col-xs-6 text-right"> <div>
<oneit:ormInput type="number" obj="<%= company %>" attributeName="PaymentJobCount" required="true" Choose Your Plan
min="<%= minCount %>" max="<%= maxCount %>" step="1" cssClass="payment-paln-count"/>
<label class="label-20">&nbsp;Jobs / month </label>
</div> </div>
<div>
<br/>
10 Jobs
<br/><br/>
<oneit:toString value="<%= 243.00 %>" mode="Currency"/>
<br/>
was <oneit:toString value="<%= 270.00 %>" mode="Currency"/>
<br/><br/>
<oneit:toString value="<%= 2430.00 %>" mode="Currency"/> / month
<br/>
was <oneit:toString value="<%= 2700.00 %>" mode="Currency"/>
</div>
<oneit:button value="Active" name="saveCompany" cssClass="btn btn-primary"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.toMap() %>" />
<oneit:button value="Select" name="saveCompany" cssClass="btn btn-primary"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.toMap() %>" />
</div> </div>
</div>
<div class="pay-subsc-det-row a-label-row"> </div>
<oneit:recalcClass htmlTag="span" classScript="company.getPaymentPlanAmount()!=null ? 'show': 'hide'" company="<%= company %>"> <div class="form-group row">
<div class="col-md-6 col-sm-6 col-xs-6 text-left"> <div class="col-md-12">
Total: <span>
<span class="pay-subsc-amt"> Additional jobs over plan allowance are billed at the Cost Per Job for the subscription level
<oneit:recalc mode="Currency" script="company.getPaymentPlanAmount()" company="<%= company %>" nullValue=""/> </span>
/ mo <span>
</span> Would you like to set a maximum limit on the total jobs able to be posted
</div> </span>
<div class="col-md-6 col-sm-6 col-xs-6 text-right pay-subsc-det"> </div>
<div class="text-right"> </div>
<oneit:recalc mode="Currency" script="company.getPerJobPaymentPlanAmount()" company="<%= company %>" nullValue=""/> <div class="form-group row">
per job. Save <div class="col-md-12">
<oneit:recalc mode="Currency" script="company.getPaymentPlanSaveAmount()" company="<%= company %>" nullValue=""/> <span>
per month. Would you like to set a maximum limit on the total jobs able to be posted
</div> </span>
</div> </div>
</oneit:recalcClass> </div>
</div>
<div class="form-group row">
<div class="a-label-row text-center pay-subsc-btn-row"> No, leave it open
<oneit:recalcClass htmlTag="div" classScript="company.isSubscriptionChanged() ? 'subscr-change enabled': 'subscr-change disabled'" company="<%= company %>"> <label class="switch">
<oneit:recalcClass htmlTag="span" classScript="hiringTeam.isTrue(hiringTeam.getHasCap()) ? 'checkbox checked': 'checkbox unchecked'" hiringTeam="<%= hiringTeam %>">
<oneit:ormInput obj="<%= hiringTeam %>" attributeName="HasCap" type="checkbox"/>
</oneit:recalcClass>
<div class="slider round"></div>
</label>
yes, set a cap
</div>
<div class="form-group row">
<oneit:ormInput obj="<%= hiringTeam %>" type="text" attributeName="MaxCap" cssClass="form-control" />
<oneit:button value="Update Subscription" name="saveCompany" cssClass="btn btn-primary largeBtn btn-green save-btn" <oneit:button value="Set Max" name="saveCompany" cssClass="btn btn-primary"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry ("restartProcess", Boolean.TRUE) .toMap() %>" />
.mapEntry ("Company", company) </div>
.mapEntry ("IsPayment", Boolean.TRUE)
.mapEntry ("attribNamesToRestore", Collections.singleton("Company"))
.toMap() %>" />
</oneit:recalcClass>
</div>
<div class="line-break"></div> <div class="form-group row">
<% <oneit:button value="Update Subscription" name="saveCompany" cssClass="btn btn-primary largeBtn btn-green save-btn" style="display:none;"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
} .mapEntry ("restartProcess", Boolean.TRUE)
%> .mapEntry ("Company", company)
.mapEntry ("IsPayment", Boolean.TRUE)
.mapEntry ("attribNamesToRestore", Collections.singleton("Company"))
.toMap() %>" />
</div>
<div class="text-center footer-note"> <div class="text-center footer-note">
Looking to cancel your account? Please <a href="http://www.talentology.com/">contact us.</a> Looking to cancel your account? Please <a href="http://www.talentology.com/">contact us.</a>
......
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
CompanyUser companyUser = loggedInUser.getExtension(CompanyUser.REFERENCE_CompanyUser); CompanyUser companyUser = loggedInUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
Company company = companyUser.getCompany(); Company company = companyUser.getCompany();
HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam"); HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam");
String nextPage = WebUtils.getSamePageInRenderMode(request, "Page");
Debug.assertion(company != null , "Invalid company in admin portal my company"); Debug.assertion(company != null , "Invalid company in admin portal my company");
Debug.assertion(company != null , "Invalid hiring team in admin portal my company"); Debug.assertion(company != null , "Invalid hiring team in admin portal my company");
String nextPage = WebUtils.getSamePageInRenderMode(request, "Page");
%> %>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() $(document).ready(function()
...@@ -54,10 +54,15 @@ ...@@ -54,10 +54,15 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row content"> <div class="row content">
<div class="main-content-area"> <div class="main-content-area">
<h1 class="page-title"><%= hiringTeam.getHiringTeamName() %></h1> <oneit:form name="editCompany" method="post" enctype="multipart/form-data">
<div class="my-company-area">
<oneit:form name="editCompany" method="post" enctype="multipart/form-data"> <oneit:button cssClass="arrow-btn-blue" name="gotoPage" value=" " skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage).toMap() %>" >
<img src="images/arrow-left-prev_blue.svg" />
</oneit:button>
<h1 class="page-title"><%= hiringTeam.getHiringTeamName() %></h1>
<div class="my-company-area">
<div style="padding-left: 15px; padding-right: 15px;"> <div style="padding-left: 15px; padding-right: 15px;">
<oneit:dynInclude page="/extensions/applicantportal/inc/multifieldtext.jsp" data="<%= CollectionUtils.EMPTY_MAP%>"/> <oneit:dynInclude page="/extensions/applicantportal/inc/multifieldtext.jsp" data="<%= CollectionUtils.EMPTY_MAP%>"/>
</div> </div>
...@@ -182,8 +187,8 @@ ...@@ -182,8 +187,8 @@
</div> </div>
</div> </div>
</div> </div>
</oneit:form> </div>
</div> </oneit:form>
</div> </div>
</div> </div>
</div> </div>
......
<?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_hiring_team</tableName>
<column name="is_ppj" 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_hiring_team</tableName>
<column name="has_cap" type="Boolean" nullable="true"/>
<column name="max_cap" type="Long" nullable="true"/>
</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