Commit bed8c30c by Harsh Shah

Finish Feature-20190508

parents 838438e6 efce8e5a
......@@ -27,6 +27,7 @@
<column name="card_post_code" type="String" nullable="true" length="10"/>
<column name="card_id" type="String" nullable="true" length="100"/>
<column name="plan_renewed_on" type="Date" nullable="true"/>
<column name="ppj_credits" type="Long" nullable="true"/>
<column name="used_credits" type="Long" nullable="true"/>
<column name="available_credits" type="Long" nullable="true"/>
<column name="is_ppj" type="Boolean" nullable="true"/>
......@@ -36,6 +37,8 @@
<column name="last_plan_amount" type="Double" nullable="true"/>
<column name="google_address_text" type="String" nullable="true" length="300"/>
<column name="plan_cancelled" type="Boolean" nullable="true"/>
<column name="on_trial" type="Boolean" nullable="true"/>
<column name="trial_job_count" type="Long" nullable="true"/>
<column name="message_id" type="Long" nullable="true"/>
<column name="company_id" type="Long" length="11" nullable="false"/>
<column name="billing_team_id" type="Long" length="11" nullable="true"/>
......
......@@ -8,7 +8,7 @@
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="job_title" type="String" nullable="false" length="30"/>
<column name="job_title" type="String" nullable="false" length="60"/>
<column name="job_description" type="CLOB" nullable="false"/>
<column name="job_status" type="String" nullable="false" length="200"/>
<column name="open_date" type="Date" nullable="true"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_notification_template</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="notification_type" type="String" nullable="false" length="200"/>
<column name="days_after" type="Long" nullable="false"/>
<column name="notification_content" type="CLOB" nullable="false"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -27,6 +27,7 @@ CREATE TABLE tl_hiring_team (
card_post_code varchar(10) NULL,
card_id varchar(100) NULL,
plan_renewed_on datetime NULL,
ppj_credits numeric(12) NULL,
used_credits numeric(12) NULL,
available_credits numeric(12) NULL,
is_ppj char(1) NULL,
......@@ -36,6 +37,8 @@ CREATE TABLE tl_hiring_team (
last_plan_amount numeric(20,5) NULL,
google_address_text varchar(300) NULL,
plan_cancelled char(1) NULL,
on_trial char(1) NULL,
trial_job_count numeric(12) NULL,
message_id numeric(12) NULL,
company_id numeric(12) NOT NULL,
billing_team_id numeric(12) NULL,
......
......@@ -8,7 +8,7 @@ CREATE TABLE tl_job (
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
job_title varchar(30) NOT NULL,
job_title varchar(60) NOT NULL,
job_description text NOT NULL,
job_status varchar(200) NOT NULL,
open_date datetime NULL,
......
-- DROP TABLE tl_notification_template;
CREATE TABLE tl_notification_template (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
notification_type varchar(200) NOT NULL,
days_after numeric(12) NOT NULL,
notification_content text NOT NULL
);
ALTER TABLE tl_notification_template ADD
CONSTRAINT PK_tl_notification_template PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
......@@ -28,6 +28,7 @@ CREATE TABLE tl_hiring_team (
card_post_code varchar2(10) NULL,
card_id varchar2(100) NULL,
plan_renewed_on date NULL,
ppj_credits number(12) NULL,
used_credits number(12) NULL,
available_credits number(12) NULL,
is_ppj char(1) NULL,
......@@ -37,6 +38,8 @@ CREATE TABLE tl_hiring_team (
last_plan_amount number(20,5) NULL,
google_address_text varchar2(300) NULL,
plan_cancelled char(1) NULL,
on_trial char(1) NULL,
trial_job_count number(12) NULL,
message_id number(12) NULL,
company_id number(12) NOT NULL,
billing_team_id number(12) NULL,
......
......@@ -9,7 +9,7 @@ CREATE TABLE tl_job (
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
job_title varchar2(30) NOT NULL,
job_title varchar2(60) NOT NULL,
job_description clob NOT NULL,
job_status varchar2(200) NOT NULL,
open_date date NULL,
......
-- DROP TABLE tl_notification_template;
CREATE TABLE tl_notification_template (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
notification_type varchar2(200) NOT NULL,
days_after number(12) NOT NULL,
notification_content clob NOT NULL
);
ALTER TABLE tl_notification_template ADD
CONSTRAINT PK_tl_notification_template PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
......@@ -28,6 +28,7 @@ CREATE TABLE tl_hiring_team (
card_post_code varchar(10) NULL,
card_id varchar(100) NULL,
plan_renewed_on timestamp NULL,
ppj_credits numeric(12) NULL,
used_credits numeric(12) NULL,
available_credits numeric(12) NULL,
is_ppj char(1) NULL,
......@@ -37,6 +38,8 @@ CREATE TABLE tl_hiring_team (
last_plan_amount numeric(20,5) NULL,
google_address_text varchar(300) NULL,
plan_cancelled char(1) NULL,
on_trial char(1) NULL,
trial_job_count numeric(12) NULL,
message_id numeric(12) NULL,
company_id numeric(12) NOT NULL,
billing_team_id numeric(12) NULL,
......
......@@ -9,7 +9,7 @@ CREATE TABLE tl_job (
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
job_title varchar(30) NOT NULL,
job_title varchar(60) NOT NULL,
job_description text NOT NULL,
job_status varchar(200) NOT NULL,
open_date timestamp NULL,
......
-- @AutoRun
-- drop table tl_notification_template;
CREATE TABLE tl_notification_template (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
notification_type varchar(200) NOT NULL,
days_after numeric(12) NOT NULL,
notification_content text NOT NULL
);
ALTER TABLE tl_notification_template ADD
CONSTRAINT pk_tl_notification_template PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
......@@ -6,7 +6,9 @@ import oneit.objstore.ObjectTransaction;
import oneit.objstore.StorageException;
import oneit.objstore.rdbms.filters.LessThanFilter;
import oneit.utils.DateDiff;
import oneit.utils.math.NullArith;
import oneit.utils.parsers.FieldException;
import performa.orm.HiringTeam;
import performa.orm.Job;
import performa.orm.types.JobStatus;
......@@ -30,7 +32,39 @@ public class CloseJobBatch extends ORMBatch
job.setIsManuallyClosed(Boolean.FALSE);
LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "Setting Job Status to Closed in job : ", job);
if(job.getJobApplicationsCount() == 0)
{
HiringTeam hiringTeam = job.getHiringTeam();
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "No Applicants for job: ", job, " hence crediting account : ", billingTeam);
if(billingTeam.isTrue(billingTeam.getOnTrial()))
{
billingTeam.setTrialJobCount(billingTeam.getTrialJobCount() - 1);
LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "Reducing trail job count of hiring team : ", billingTeam);
}
else
{
if(billingTeam.getIsPPJ())
{
billingTeam.setPPJCredits(NullArith.add(billingTeam.getPPJCredits(), 1).intValue());
LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "Increasing PPJ Credits of hiring team : ", billingTeam);
}
else
{
if(billingTeam.getUsedCredits() > billingTeam.getAvailableCredits())
{
billingTeam.setAvailableCredits(NullArith.add(billingTeam.getAvailableCredits(), 1).intValue());
LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "Increasing Available Credits of hiring team (to recover usage records on stripe) : ", billingTeam);
}
billingTeam.setUsedCredits(NullArith.subtract(billingTeam.getUsedCredits(), 1).intValue());
LogMgr.log(CLOSE_JOB_BATCH, LogLevel.PROCESSING1, "Reducing used credits of hiring team ", billingTeam);
}
}
}
}
}
}
\ No newline at end of file
package performa.batch;
import java.util.Calendar;
import oneit.appservices.batch.ORMBatch;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.logging.LoggingArea;
import oneit.objstore.ObjectTransaction;
import oneit.objstore.StorageException;
import oneit.objstore.rdbms.filters.InFilter;
import oneit.objstore.rdbms.filters.LessThanEqualFilter;
import oneit.utils.DateDiff;
import oneit.utils.parsers.FieldException;
import performa.orm.Job;
import performa.orm.types.JobStatus;
public class NotificationBatch extends ORMBatch
{
public static LoggingArea NOTIFICATION_BATCH = LoggingArea.createLoggingArea("NotificationBatch");
@Override
public void run(ObjectTransaction ot) throws StorageException, FieldException
{
LogMgr.log (NOTIFICATION_BATCH, LogLevel.PROCESSING1, "RUNNING Notification Batch");
Job[] closedJobs = Job.SearchByAll()
.andJobStatus(new InFilter<>(JobStatus.COMPLETE, JobStatus.FILLED))
.andLastStatusChangeDate(new LessThanEqualFilter<>(DateDiff.add(DateDiff.getToday(), 14, Calendar.DATE)))
.search(ot);
}
}
\ No newline at end of file
......@@ -74,6 +74,7 @@ public class AddHiringTeamFP extends SaveFP
}
else
{
hiringTeam.setOnTrial(false);
hiringTeam.setBilledByTeam(company.getBillingTeam());
}
......
......@@ -16,7 +16,6 @@ import oneit.servlets.process.SaveFP;
import oneit.utils.BusinessException;
import oneit.utils.DateDiff;
import oneit.utils.math.NullArith;
import performa.orm.CompanyUser;
import performa.orm.HiringTeam;
import performa.orm.Job;
import performa.utils.StripeUtils;
......@@ -34,11 +33,9 @@ public class ExtendJobFP extends SaveFP
HiringTeam hiringTeam = job.getHiringTeam();
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
SecUser secUser = SecUser.getTXUser(process.getTransaction());
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
LogMgr.log(LOG, LogLevel.PROCESSING1, "Start of Extend job : ", job);
job.setApplyBy(DateDiff.add(job.getApplyBy(), Calendar.DATE, 30));
job.setLastEdited(new Date());
......@@ -53,7 +50,7 @@ public class ExtendJobFP extends SaveFP
}
else if(billingTeam.getIsPPJ())
{
StripeUtils.makePayment(hiringTeam, job);
hiringTeam.makePayment(job);
}
LogMgr.log(LOG, LogLevel.PROCESSING1, "Job Extended. Apply by date : ", job.getApplyBy());
......
......@@ -59,7 +59,7 @@ public class MakePaymentFP extends SaveFP
if(hiringTeam.getCardID() != null && hiringTeam.isTrue(hiringTeam.getIsPPJ()))
{
StripeUtils.makePayment(hiringTeam, job);
hiringTeam.makePayment(job);
}
if(hiringTeam.getCardID() == null)
......
......@@ -56,6 +56,8 @@ public class SaveCompanyFP extends SaveFP
}
else
{
hiringTeam.setOnTrial(false);
if(hiringTeam.getPaymentPlan() != null && subscription != null)
{
StripeUtils.cancelSubscription(subscription, true);
......
......@@ -35,12 +35,43 @@ public class SaveJobFP extends SaveFP
LogMgr.log(Job.LOG, LogLevel.PROCESSING1,"In SaveJobFP saving job : ", job );
if(job.getJobStatus() == JobStatus.DRAFT && status != null && status == JobStatus.OPEN)
if(job.getJobStatus() == JobStatus.OPEN && status != null && status == JobStatus.CANCELLED)
{
if(billingTeam.isTrue(billingTeam.getOnTrial()))
{
billingTeam.setTrialJobCount(billingTeam.getTrialJobCount() - 1);
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Cancelling job: ", job, " hence reducing trial job count : ", billingTeam);
}
else
{
if(billingTeam.getIsPPJ())
{
billingTeam.setPPJCredits(NullArith.add(billingTeam.getPPJCredits(), 1).intValue());
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Cancelling job: ", job, " hence increasing PPJ credits : ", billingTeam);
}
else
{
if(billingTeam.getUsedCredits() > billingTeam.getAvailableCredits())
{
billingTeam.setAvailableCredits(NullArith.add(billingTeam.getAvailableCredits(), 1).intValue());
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Cancelling job: ", job, " hence increasing available credits (to recover usage records on stripe) : ", billingTeam);
}
billingTeam.setUsedCredits(NullArith.subtract(billingTeam.getUsedCredits(), 1).intValue());
LogMgr.log(Job.LOG, LogLevel.PROCESSING1, "Cancelling job: ", job, " hence reducing used credits : ", billingTeam);
}
}
}
else if(job.getJobStatus() == JobStatus.DRAFT && status != null && status == JobStatus.OPEN)
{
job.setApplyBy(DateDiff.add(DateDiff.getToday(), Calendar.DATE, 30));
job.setOpenDate(new Date());
if (billingTeam.canCreateJob())
if(billingTeam.isTrue(billingTeam.getOnTrial()))
{
billingTeam.setTrialJobCount(billingTeam.getTrialJobCount() + 1);
}
else if (billingTeam.canCreateJob())
{
billingTeam.setUsedCredits(NullArith.add(billingTeam.getUsedCredits(), 1).intValue());
......@@ -51,7 +82,7 @@ public class SaveJobFP extends SaveFP
}
else if(billingTeam.getIsPPJ())
{
StripeUtils.makePayment(hiringTeam, job);
billingTeam.makePayment(job);
}
LogMgr.log(Job.LOG, LogLevel.PROCESSING1,"Job status changed as Open. ", job );
......@@ -90,24 +121,21 @@ public class SaveJobFP extends SaveFP
JobStatus status = (JobStatus) request.getAttribute("JobStatus");
HiringTeam hiringTeam = job.getHiringTeam();
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
// if(job.getJobStatus() != JobStatus.DRAFT || openJob == Boolean.TRUE)
// {
// BusinessObjectParser.assertFieldCondition(job.getLevel() != null, job , Job.SINGLEREFERENCE_Level, "mandatory", exceptions, true, request);
//
// if(job.getLevel() != null)
// {
// BusinessObjectParser.assertFieldCondition(job.showLevelOption(job.getLevel()), job , Job.SINGLEREFERENCE_Level, "invalid", exceptions, true, request);
// }
// }
if(status != null && status == JobStatus.OPEN)
{
BusinessObjectParser.assertFieldCondition(billingTeam.getCardID() != null , billingTeam, HiringTeam.FIELD_CardID, "mandatoryCardDetails", exceptions, true, request);
if(!billingTeam.getIsPPJ())
if(billingTeam.isTrue(billingTeam.getOnTrial()))
{
BusinessObjectParser.assertFieldCondition(billingTeam.canCreateJob() , job, Job.FIELD_JobStatus, "insufficientCredit", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(billingTeam.getTrialJobCount() < 1 , billingTeam, HiringTeam.FIELD_TrialJobCount, "cannotOpenJob", exceptions, true, request);
}
else
{
BusinessObjectParser.assertFieldCondition(billingTeam.getCardID() != null , billingTeam, HiringTeam.FIELD_CardID, "mandatoryCardDetails", exceptions, true, request);
if(!billingTeam.getIsPPJ())
{
BusinessObjectParser.assertFieldCondition(billingTeam.canCreateJob() , job, Job.FIELD_JobStatus, "insufficientCredit", exceptions, true, request);
}
}
}
......
......@@ -140,6 +140,8 @@ public class SavePaymentPlanFP extends SaveFP
}
}
hiringTeam.setOnTrial(false);
return super.processForm(process, submission, params);
}
......
......@@ -144,6 +144,12 @@ public class SendVerificationMailFP extends SaveFP
candidate.setIsPasswordChanged(true);
}
// job has no requirements, and candidate has already done the culture and role fit. Submit application automatically.
if(!job.getIncludeAssessmentCriteria() && (candidate.cultureCompleted(job) || !job.getIncludeCulture()) && candidate.assessmentCompleted(job))
{
jobApplication.setApplicationStatus(ApplicationStatus.SUBMITTED);
}
// storing candidate location in application for distance calculation to be accurate even if user edits
// location in the next application
jobApplication.setGoogleAddressText(candidate.getGoogleAddressText());
......
......@@ -61,6 +61,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
public static final String FIELD_CardPostCode = "CardPostCode";
public static final String FIELD_CardID = "CardID";
public static final String FIELD_PlanRenewedOn = "PlanRenewedOn";
public static final String FIELD_PPJCredits = "PPJCredits";
public static final String FIELD_UsedCredits = "UsedCredits";
public static final String FIELD_AvailableCredits = "AvailableCredits";
public static final String FIELD_IsPPJ = "IsPPJ";
......@@ -70,6 +71,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
public static final String FIELD_LastPlanAmount = "LastPlanAmount";
public static final String FIELD_GoogleAddressText = "GoogleAddressText";
public static final String FIELD_PlanCancelled = "PlanCancelled";
public static final String FIELD_OnTrial = "OnTrial";
public static final String FIELD_TrialJobCount = "TrialJobCount";
public static final String FIELD_MessageID = "MessageID";
public static final String FIELD_IsLogoDeleted = "IsLogoDeleted";
public static final String FIELD_CouponCode = "CouponCode";
......@@ -114,6 +117,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private static final DefaultAttributeHelper<HiringTeam> HELPER_CardPostCode = 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_PPJCredits = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_UsedCredits = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_AvailableCredits = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_IsPPJ = DefaultAttributeHelper.INSTANCE;
......@@ -123,6 +127,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private static final DefaultAttributeHelper<HiringTeam> HELPER_LastPlanAmount = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_GoogleAddressText = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_PlanCancelled = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_OnTrial = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_TrialJobCount = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_MessageID = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_IsLogoDeleted = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_CouponCode = DefaultAttributeHelper.INSTANCE;
......@@ -150,6 +156,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private String _CardPostCode;
private String _CardID;
private Date _PlanRenewedOn;
private Integer _PPJCredits;
private Integer _UsedCredits;
private Integer _AvailableCredits;
private Boolean _IsPPJ;
......@@ -159,6 +166,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private Double _LastPlanAmount;
private String _GoogleAddressText;
private Boolean _PlanCancelled;
private Boolean _OnTrial;
private Integer _TrialJobCount;
private Integer _MessageID;
private Boolean _IsLogoDeleted;
private String _CouponCode;
......@@ -207,6 +216,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private static final AttributeValidator[] FIELD_CardPostCode_Validators;
private static final AttributeValidator[] FIELD_CardID_Validators;
private static final AttributeValidator[] FIELD_PlanRenewedOn_Validators;
private static final AttributeValidator[] FIELD_PPJCredits_Validators;
private static final AttributeValidator[] FIELD_UsedCredits_Validators;
private static final AttributeValidator[] FIELD_AvailableCredits_Validators;
private static final AttributeValidator[] FIELD_IsPPJ_Validators;
......@@ -216,6 +226,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private static final AttributeValidator[] FIELD_LastPlanAmount_Validators;
private static final AttributeValidator[] FIELD_GoogleAddressText_Validators;
private static final AttributeValidator[] FIELD_PlanCancelled_Validators;
private static final AttributeValidator[] FIELD_OnTrial_Validators;
private static final AttributeValidator[] FIELD_TrialJobCount_Validators;
private static final AttributeValidator[] FIELD_MessageID_Validators;
......@@ -266,6 +278,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
FIELD_CardPostCode_Validators = (AttributeValidator[])setupAttribMetaData_CardPostCode(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_PPJCredits_Validators = (AttributeValidator[])setupAttribMetaData_PPJCredits(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_UsedCredits_Validators = (AttributeValidator[])setupAttribMetaData_UsedCredits(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_AvailableCredits_Validators = (AttributeValidator[])setupAttribMetaData_AvailableCredits(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_IsPPJ_Validators = (AttributeValidator[])setupAttribMetaData_IsPPJ(validatorMapping).toArray (new AttributeValidator[0]);
......@@ -275,6 +288,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
FIELD_LastPlanAmount_Validators = (AttributeValidator[])setupAttribMetaData_LastPlanAmount(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_GoogleAddressText_Validators = (AttributeValidator[])setupAttribMetaData_GoogleAddressText(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_PlanCancelled_Validators = (AttributeValidator[])setupAttribMetaData_PlanCancelled(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_OnTrial_Validators = (AttributeValidator[])setupAttribMetaData_OnTrial(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_TrialJobCount_Validators = (AttributeValidator[])setupAttribMetaData_TrialJobCount(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_MessageID_Validators = (AttributeValidator[])setupAttribMetaData_MessageID(validatorMapping).toArray (new AttributeValidator[0]);
......@@ -855,6 +870,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
}
// Meta Info setup
private static List setupAttribMetaData_PPJCredits(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "ppj_credits");
metaInfo.put ("name", "PPJCredits");
metaInfo.put ("type", "Integer");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for HiringTeam.PPJCredits:", metaInfo);
ATTRIBUTES_METADATA_HiringTeam.put (FIELD_PPJCredits, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(HiringTeam.class, "PPJCredits", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for HiringTeam.PPJCredits:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_UsedCredits(Map validatorMapping)
{
Map metaInfo = new HashMap ();
......@@ -1020,6 +1053,44 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
}
// Meta Info setup
private static List setupAttribMetaData_OnTrial(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "on_trial");
metaInfo.put ("defaultValue", "Boolean.FALSE");
metaInfo.put ("name", "OnTrial");
metaInfo.put ("type", "Boolean");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for HiringTeam.OnTrial:", metaInfo);
ATTRIBUTES_METADATA_HiringTeam.put (FIELD_OnTrial, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(HiringTeam.class, "OnTrial", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for HiringTeam.OnTrial:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_TrialJobCount(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "trial_job_count");
metaInfo.put ("defaultValue", "0");
metaInfo.put ("name", "TrialJobCount");
metaInfo.put ("type", "Integer");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for HiringTeam.TrialJobCount:", metaInfo);
ATTRIBUTES_METADATA_HiringTeam.put (FIELD_TrialJobCount, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(HiringTeam.class, "TrialJobCount", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for HiringTeam.TrialJobCount:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_MessageID(Map validatorMapping)
{
Map metaInfo = new HashMap ();
......@@ -1083,6 +1154,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_CardPostCode = (String)(HELPER_CardPostCode.initialise (_CardPostCode));
_CardID = (String)(HELPER_CardID.initialise (_CardID));
_PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.initialise (_PlanRenewedOn));
_PPJCredits = (Integer)(HELPER_PPJCredits.initialise (_PPJCredits));
_UsedCredits = (Integer)(HELPER_UsedCredits.initialise (_UsedCredits));
_AvailableCredits = (Integer)(HELPER_AvailableCredits.initialise (_AvailableCredits));
_IsPPJ = (Boolean)(HELPER_IsPPJ.initialise (_IsPPJ));
......@@ -1092,6 +1164,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_LastPlanAmount = (Double)(HELPER_LastPlanAmount.initialise (_LastPlanAmount));
_GoogleAddressText = (String)(HELPER_GoogleAddressText.initialise (_GoogleAddressText));
_PlanCancelled = (Boolean)(Boolean.FALSE);
_OnTrial = (Boolean)(Boolean.FALSE);
_TrialJobCount = (Integer)(0);
_MessageID = (Integer)(HELPER_MessageID.initialise (_MessageID));
_IsLogoDeleted = (Boolean)(Boolean.FALSE);
_CouponCode = (String)(HELPER_CouponCode.initialise (_CouponCode));
......@@ -3001,6 +3075,104 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
}
/**
* Get the attribute PPJCredits
*/
public Integer getPPJCredits ()
{
assertValid();
Integer valToReturn = _PPJCredits;
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
valToReturn = bhd.getPPJCredits ((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 prePPJCreditsChange (Integer newPPJCredits) 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 postPPJCreditsChange () throws FieldException
{
}
public FieldWriteability getWriteability_PPJCredits ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute PPJCredits. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setPPJCredits (Integer newPPJCredits) throws FieldException
{
boolean oldAndNewIdentical = HELPER_PPJCredits.compare (_PPJCredits, newPPJCredits);
try
{
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
newPPJCredits = bhd.setPPJCredits ((HiringTeam)this, newPPJCredits);
oldAndNewIdentical = HELPER_PPJCredits.compare (_PPJCredits, newPPJCredits);
}
if (FIELD_PPJCredits_Validators.length > 0)
{
Object newPPJCreditsObj = HELPER_PPJCredits.toObject (newPPJCredits);
if (newPPJCreditsObj != null)
{
int loopMax = FIELD_PPJCredits_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_HiringTeam.get (FIELD_PPJCredits);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_PPJCredits_Validators[v].checkAttribute (this, FIELD_PPJCredits, metadata, newPPJCreditsObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_PPJCredits () != FieldWriteability.FALSE, "Field PPJCredits is not writeable");
prePPJCreditsChange (newPPJCredits);
markFieldChange (FIELD_PPJCredits);
_PPJCredits = newPPJCredits;
postFieldChange (FIELD_PPJCredits);
postPPJCreditsChange ();
}
}
/**
* Get the attribute UsedCredits
*/
public Integer getUsedCredits ()
......@@ -3883,6 +4055,202 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
}
/**
* Get the attribute OnTrial
*/
public Boolean getOnTrial ()
{
assertValid();
Boolean valToReturn = _OnTrial;
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
valToReturn = bhd.getOnTrial ((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 preOnTrialChange (Boolean newOnTrial) 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 postOnTrialChange () throws FieldException
{
}
public FieldWriteability getWriteability_OnTrial ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute OnTrial. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setOnTrial (Boolean newOnTrial) throws FieldException
{
boolean oldAndNewIdentical = HELPER_OnTrial.compare (_OnTrial, newOnTrial);
try
{
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
newOnTrial = bhd.setOnTrial ((HiringTeam)this, newOnTrial);
oldAndNewIdentical = HELPER_OnTrial.compare (_OnTrial, newOnTrial);
}
if (FIELD_OnTrial_Validators.length > 0)
{
Object newOnTrialObj = HELPER_OnTrial.toObject (newOnTrial);
if (newOnTrialObj != null)
{
int loopMax = FIELD_OnTrial_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_HiringTeam.get (FIELD_OnTrial);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_OnTrial_Validators[v].checkAttribute (this, FIELD_OnTrial, metadata, newOnTrialObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_OnTrial () != FieldWriteability.FALSE, "Field OnTrial is not writeable");
preOnTrialChange (newOnTrial);
markFieldChange (FIELD_OnTrial);
_OnTrial = newOnTrial;
postFieldChange (FIELD_OnTrial);
postOnTrialChange ();
}
}
/**
* Get the attribute TrialJobCount
*/
public Integer getTrialJobCount ()
{
assertValid();
Integer valToReturn = _TrialJobCount;
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
valToReturn = bhd.getTrialJobCount ((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 preTrialJobCountChange (Integer newTrialJobCount) 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 postTrialJobCountChange () throws FieldException
{
}
public FieldWriteability getWriteability_TrialJobCount ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute TrialJobCount. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setTrialJobCount (Integer newTrialJobCount) throws FieldException
{
boolean oldAndNewIdentical = HELPER_TrialJobCount.compare (_TrialJobCount, newTrialJobCount);
try
{
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
newTrialJobCount = bhd.setTrialJobCount ((HiringTeam)this, newTrialJobCount);
oldAndNewIdentical = HELPER_TrialJobCount.compare (_TrialJobCount, newTrialJobCount);
}
if (FIELD_TrialJobCount_Validators.length > 0)
{
Object newTrialJobCountObj = HELPER_TrialJobCount.toObject (newTrialJobCount);
if (newTrialJobCountObj != null)
{
int loopMax = FIELD_TrialJobCount_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_HiringTeam.get (FIELD_TrialJobCount);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_TrialJobCount_Validators[v].checkAttribute (this, FIELD_TrialJobCount, metadata, newTrialJobCountObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_TrialJobCount () != FieldWriteability.FALSE, "Field TrialJobCount is not writeable");
preTrialJobCountChange (newTrialJobCount);
markFieldChange (FIELD_TrialJobCount);
_TrialJobCount = newTrialJobCount;
postFieldChange (FIELD_TrialJobCount);
postTrialJobCountChange ();
}
}
/**
* Get the attribute MessageID
*/
public Integer getMessageID ()
......@@ -5641,6 +6009,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
tl_hiring_teamPSet.setAttrib (FIELD_CardPostCode, HELPER_CardPostCode.toObject (_CardPostCode)); //
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_PPJCredits, HELPER_PPJCredits.toObject (_PPJCredits)); //
tl_hiring_teamPSet.setAttrib (FIELD_UsedCredits, HELPER_UsedCredits.toObject (_UsedCredits)); //
tl_hiring_teamPSet.setAttrib (FIELD_AvailableCredits, HELPER_AvailableCredits.toObject (_AvailableCredits)); //
tl_hiring_teamPSet.setAttrib (FIELD_IsPPJ, HELPER_IsPPJ.toObject (_IsPPJ)); //
......@@ -5650,6 +6019,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
tl_hiring_teamPSet.setAttrib (FIELD_LastPlanAmount, HELPER_LastPlanAmount.toObject (_LastPlanAmount)); //
tl_hiring_teamPSet.setAttrib (FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject (_GoogleAddressText)); //
tl_hiring_teamPSet.setAttrib (FIELD_PlanCancelled, HELPER_PlanCancelled.toObject (_PlanCancelled)); //
tl_hiring_teamPSet.setAttrib (FIELD_OnTrial, HELPER_OnTrial.toObject (_OnTrial)); //
tl_hiring_teamPSet.setAttrib (FIELD_TrialJobCount, HELPER_TrialJobCount.toObject (_TrialJobCount)); //
tl_hiring_teamPSet.setAttrib (FIELD_MessageID, HELPER_MessageID.toObject (_MessageID)); //
_Company.getPersistentSets (allSets);
_BilledByTeam.getPersistentSets (allSets);
......@@ -5689,6 +6060,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_CardPostCode = (String)(HELPER_CardPostCode.fromObject (_CardPostCode, tl_hiring_teamPSet.getAttrib (FIELD_CardPostCode))); //
_CardID = (String)(HELPER_CardID.fromObject (_CardID, tl_hiring_teamPSet.getAttrib (FIELD_CardID))); //
_PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.fromObject (_PlanRenewedOn, tl_hiring_teamPSet.getAttrib (FIELD_PlanRenewedOn))); //
_PPJCredits = (Integer)(HELPER_PPJCredits.fromObject (_PPJCredits, tl_hiring_teamPSet.getAttrib (FIELD_PPJCredits))); //
_UsedCredits = (Integer)(HELPER_UsedCredits.fromObject (_UsedCredits, tl_hiring_teamPSet.getAttrib (FIELD_UsedCredits))); //
_AvailableCredits = (Integer)(HELPER_AvailableCredits.fromObject (_AvailableCredits, tl_hiring_teamPSet.getAttrib (FIELD_AvailableCredits))); //
_IsPPJ = (Boolean)(HELPER_IsPPJ.fromObject (_IsPPJ, tl_hiring_teamPSet.getAttrib (FIELD_IsPPJ))); //
......@@ -5698,6 +6070,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_LastPlanAmount = (Double)(HELPER_LastPlanAmount.fromObject (_LastPlanAmount, tl_hiring_teamPSet.getAttrib (FIELD_LastPlanAmount))); //
_GoogleAddressText = (String)(HELPER_GoogleAddressText.fromObject (_GoogleAddressText, tl_hiring_teamPSet.getAttrib (FIELD_GoogleAddressText))); //
_PlanCancelled = (Boolean)(HELPER_PlanCancelled.fromObject (_PlanCancelled, tl_hiring_teamPSet.getAttrib (FIELD_PlanCancelled))); //
_OnTrial = (Boolean)(HELPER_OnTrial.fromObject (_OnTrial, tl_hiring_teamPSet.getAttrib (FIELD_OnTrial))); //
_TrialJobCount = (Integer)(HELPER_TrialJobCount.fromObject (_TrialJobCount, tl_hiring_teamPSet.getAttrib (FIELD_TrialJobCount))); //
_MessageID = (Integer)(HELPER_MessageID.fromObject (_MessageID, tl_hiring_teamPSet.getAttrib (FIELD_MessageID))); //
_Company.setFromPersistentSets (objectID, allSets);
_BilledByTeam.setFromPersistentSets (objectID, allSets);
......@@ -5892,6 +6266,15 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
try
{
setPPJCredits (otherHiringTeam.getPPJCredits ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setUsedCredits (otherHiringTeam.getUsedCredits ());
}
catch (FieldException ex)
......@@ -5973,6 +6356,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
try
{
setOnTrial (otherHiringTeam.getOnTrial ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setTrialJobCount (otherHiringTeam.getTrialJobCount ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setMessageID (otherHiringTeam.getMessageID ());
}
catch (FieldException ex)
......@@ -6014,6 +6415,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_CardPostCode = sourceHiringTeam._CardPostCode;
_CardID = sourceHiringTeam._CardID;
_PlanRenewedOn = sourceHiringTeam._PlanRenewedOn;
_PPJCredits = sourceHiringTeam._PPJCredits;
_UsedCredits = sourceHiringTeam._UsedCredits;
_AvailableCredits = sourceHiringTeam._AvailableCredits;
_IsPPJ = sourceHiringTeam._IsPPJ;
......@@ -6023,6 +6425,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_LastPlanAmount = sourceHiringTeam._LastPlanAmount;
_GoogleAddressText = sourceHiringTeam._GoogleAddressText;
_PlanCancelled = sourceHiringTeam._PlanCancelled;
_OnTrial = sourceHiringTeam._OnTrial;
_TrialJobCount = sourceHiringTeam._TrialJobCount;
_MessageID = sourceHiringTeam._MessageID;
_IsLogoDeleted = sourceHiringTeam._IsLogoDeleted;
_CouponCode = sourceHiringTeam._CouponCode;
......@@ -6111,6 +6515,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_CardPostCode = (String)(HELPER_CardPostCode.readExternal (_CardPostCode, vals.get(FIELD_CardPostCode))); //
_CardID = (String)(HELPER_CardID.readExternal (_CardID, vals.get(FIELD_CardID))); //
_PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.readExternal (_PlanRenewedOn, vals.get(FIELD_PlanRenewedOn))); //
_PPJCredits = (Integer)(HELPER_PPJCredits.readExternal (_PPJCredits, vals.get(FIELD_PPJCredits))); //
_UsedCredits = (Integer)(HELPER_UsedCredits.readExternal (_UsedCredits, vals.get(FIELD_UsedCredits))); //
_AvailableCredits = (Integer)(HELPER_AvailableCredits.readExternal (_AvailableCredits, vals.get(FIELD_AvailableCredits))); //
_IsPPJ = (Boolean)(HELPER_IsPPJ.readExternal (_IsPPJ, vals.get(FIELD_IsPPJ))); //
......@@ -6120,6 +6525,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_LastPlanAmount = (Double)(HELPER_LastPlanAmount.readExternal (_LastPlanAmount, vals.get(FIELD_LastPlanAmount))); //
_GoogleAddressText = (String)(HELPER_GoogleAddressText.readExternal (_GoogleAddressText, vals.get(FIELD_GoogleAddressText))); //
_PlanCancelled = (Boolean)(HELPER_PlanCancelled.readExternal (_PlanCancelled, vals.get(FIELD_PlanCancelled))); //
_OnTrial = (Boolean)(HELPER_OnTrial.readExternal (_OnTrial, vals.get(FIELD_OnTrial))); //
_TrialJobCount = (Integer)(HELPER_TrialJobCount.readExternal (_TrialJobCount, vals.get(FIELD_TrialJobCount))); //
_MessageID = (Integer)(HELPER_MessageID.readExternal (_MessageID, vals.get(FIELD_MessageID))); //
_IsLogoDeleted = (Boolean)(HELPER_IsLogoDeleted.readExternal (_IsLogoDeleted, vals.get(FIELD_IsLogoDeleted))); //
_CouponCode = (String)(HELPER_CouponCode.readExternal (_CouponCode, vals.get(FIELD_CouponCode))); //
......@@ -6163,6 +6570,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
vals.put (FIELD_CardPostCode, HELPER_CardPostCode.writeExternal (_CardPostCode));
vals.put (FIELD_CardID, HELPER_CardID.writeExternal (_CardID));
vals.put (FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.writeExternal (_PlanRenewedOn));
vals.put (FIELD_PPJCredits, HELPER_PPJCredits.writeExternal (_PPJCredits));
vals.put (FIELD_UsedCredits, HELPER_UsedCredits.writeExternal (_UsedCredits));
vals.put (FIELD_AvailableCredits, HELPER_AvailableCredits.writeExternal (_AvailableCredits));
vals.put (FIELD_IsPPJ, HELPER_IsPPJ.writeExternal (_IsPPJ));
......@@ -6172,6 +6580,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
vals.put (FIELD_LastPlanAmount, HELPER_LastPlanAmount.writeExternal (_LastPlanAmount));
vals.put (FIELD_GoogleAddressText, HELPER_GoogleAddressText.writeExternal (_GoogleAddressText));
vals.put (FIELD_PlanCancelled, HELPER_PlanCancelled.writeExternal (_PlanCancelled));
vals.put (FIELD_OnTrial, HELPER_OnTrial.writeExternal (_OnTrial));
vals.put (FIELD_TrialJobCount, HELPER_TrialJobCount.writeExternal (_TrialJobCount));
vals.put (FIELD_MessageID, HELPER_MessageID.writeExternal (_MessageID));
vals.put (FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.writeExternal (_IsLogoDeleted));
vals.put (FIELD_CouponCode, HELPER_CouponCode.writeExternal (_CouponCode));
......@@ -6274,6 +6684,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
listener.notifyFieldChange(this, other, FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.toObject(this._PlanRenewedOn), HELPER_PlanRenewedOn.toObject(otherHiringTeam._PlanRenewedOn));
}
if (!HELPER_PPJCredits.compare(this._PPJCredits, otherHiringTeam._PPJCredits))
{
listener.notifyFieldChange(this, other, FIELD_PPJCredits, HELPER_PPJCredits.toObject(this._PPJCredits), HELPER_PPJCredits.toObject(otherHiringTeam._PPJCredits));
}
if (!HELPER_UsedCredits.compare(this._UsedCredits, otherHiringTeam._UsedCredits))
{
listener.notifyFieldChange(this, other, FIELD_UsedCredits, HELPER_UsedCredits.toObject(this._UsedCredits), HELPER_UsedCredits.toObject(otherHiringTeam._UsedCredits));
......@@ -6310,6 +6724,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
listener.notifyFieldChange(this, other, FIELD_PlanCancelled, HELPER_PlanCancelled.toObject(this._PlanCancelled), HELPER_PlanCancelled.toObject(otherHiringTeam._PlanCancelled));
}
if (!HELPER_OnTrial.compare(this._OnTrial, otherHiringTeam._OnTrial))
{
listener.notifyFieldChange(this, other, FIELD_OnTrial, HELPER_OnTrial.toObject(this._OnTrial), HELPER_OnTrial.toObject(otherHiringTeam._OnTrial));
}
if (!HELPER_TrialJobCount.compare(this._TrialJobCount, otherHiringTeam._TrialJobCount))
{
listener.notifyFieldChange(this, other, FIELD_TrialJobCount, HELPER_TrialJobCount.toObject(this._TrialJobCount), HELPER_TrialJobCount.toObject(otherHiringTeam._TrialJobCount));
}
if (!HELPER_MessageID.compare(this._MessageID, otherHiringTeam._MessageID))
{
listener.notifyFieldChange(this, other, FIELD_MessageID, HELPER_MessageID.toObject(this._MessageID), HELPER_MessageID.toObject(otherHiringTeam._MessageID));
......@@ -6367,6 +6789,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
visitor.visitField(this, FIELD_CardPostCode, HELPER_CardPostCode.toObject(getCardPostCode()));
visitor.visitField(this, FIELD_CardID, HELPER_CardID.toObject(getCardID()));
visitor.visitField(this, FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.toObject(getPlanRenewedOn()));
visitor.visitField(this, FIELD_PPJCredits, HELPER_PPJCredits.toObject(getPPJCredits()));
visitor.visitField(this, FIELD_UsedCredits, HELPER_UsedCredits.toObject(getUsedCredits()));
visitor.visitField(this, FIELD_AvailableCredits, HELPER_AvailableCredits.toObject(getAvailableCredits()));
visitor.visitField(this, FIELD_IsPPJ, HELPER_IsPPJ.toObject(getIsPPJ()));
......@@ -6376,6 +6799,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
visitor.visitField(this, FIELD_LastPlanAmount, HELPER_LastPlanAmount.toObject(getLastPlanAmount()));
visitor.visitField(this, FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject(getGoogleAddressText()));
visitor.visitField(this, FIELD_PlanCancelled, HELPER_PlanCancelled.toObject(getPlanCancelled()));
visitor.visitField(this, FIELD_OnTrial, HELPER_OnTrial.toObject(getOnTrial()));
visitor.visitField(this, FIELD_TrialJobCount, HELPER_TrialJobCount.toObject(getTrialJobCount()));
visitor.visitField(this, FIELD_MessageID, HELPER_MessageID.toObject(getMessageID()));
visitor.visitAssociation (_Company);
visitor.visitAssociation (_BilledByTeam);
......@@ -6526,6 +6951,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
return filter.matches (getPlanRenewedOn ());
}
else if (attribName.equals (FIELD_PPJCredits))
{
return filter.matches (getPPJCredits ());
}
else if (attribName.equals (FIELD_UsedCredits))
{
return filter.matches (getUsedCredits ());
......@@ -6562,6 +6991,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
return filter.matches (getPlanCancelled ());
}
else if (attribName.equals (FIELD_OnTrial))
{
return filter.matches (getOnTrial ());
}
else if (attribName.equals (FIELD_TrialJobCount))
{
return filter.matches (getTrialJobCount ());
}
else if (attribName.equals (FIELD_MessageID))
{
return filter.matches (getMessageID ());
......@@ -6731,6 +7168,12 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return this;
}
public SearchAll andPPJCredits (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_hiring_team.ppj_credits", "PPJCredits");
return this;
}
public SearchAll andUsedCredits (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_hiring_team.used_credits", "UsedCredits");
......@@ -6785,6 +7228,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return this;
}
public SearchAll andOnTrial (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_hiring_team.on_trial", "OnTrial");
return this;
}
public SearchAll andTrialJobCount (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_hiring_team.trial_job_count", "TrialJobCount");
return this;
}
public SearchAll andMessageID (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_hiring_team.message_id", "MessageID");
......@@ -6986,6 +7441,12 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return this;
}
public SearchBillingTeams andPPJCredits (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_hiring_team.ppj_credits", "PPJCredits");
return this;
}
public SearchBillingTeams andUsedCredits (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_hiring_team.used_credits", "UsedCredits");
......@@ -7040,6 +7501,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return this;
}
public SearchBillingTeams andOnTrial (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_hiring_team.on_trial", "OnTrial");
return this;
}
public SearchBillingTeams andTrialJobCount (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_hiring_team.trial_job_count", "TrialJobCount");
return this;
}
public SearchBillingTeams andMessageID (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_hiring_team.message_id", "MessageID");
......@@ -7187,6 +7660,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
return HELPER_PlanRenewedOn.toObject (getPlanRenewedOn ());
}
else if (attribName.equals (FIELD_PPJCredits))
{
return HELPER_PPJCredits.toObject (getPPJCredits ());
}
else if (attribName.equals (FIELD_UsedCredits))
{
return HELPER_UsedCredits.toObject (getUsedCredits ());
......@@ -7223,6 +7700,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
return HELPER_PlanCancelled.toObject (getPlanCancelled ());
}
else if (attribName.equals (FIELD_OnTrial))
{
return HELPER_OnTrial.toObject (getOnTrial ());
}
else if (attribName.equals (FIELD_TrialJobCount))
{
return HELPER_TrialJobCount.toObject (getTrialJobCount ());
}
else if (attribName.equals (FIELD_MessageID))
{
return HELPER_MessageID.toObject (getMessageID ());
......@@ -7332,6 +7817,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
return HELPER_PlanRenewedOn;
}
else if (attribName.equals (FIELD_PPJCredits))
{
return HELPER_PPJCredits;
}
else if (attribName.equals (FIELD_UsedCredits))
{
return HELPER_UsedCredits;
......@@ -7368,6 +7857,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
return HELPER_PlanCancelled;
}
else if (attribName.equals (FIELD_OnTrial))
{
return HELPER_OnTrial;
}
else if (attribName.equals (FIELD_TrialJobCount))
{
return HELPER_TrialJobCount;
}
else if (attribName.equals (FIELD_MessageID))
{
return HELPER_MessageID;
......@@ -7477,6 +7974,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
setPlanRenewedOn ((Date)(HELPER_PlanRenewedOn.fromObject (_PlanRenewedOn, attribValue)));
}
else if (attribName.equals (FIELD_PPJCredits))
{
setPPJCredits ((Integer)(HELPER_PPJCredits.fromObject (_PPJCredits, attribValue)));
}
else if (attribName.equals (FIELD_UsedCredits))
{
setUsedCredits ((Integer)(HELPER_UsedCredits.fromObject (_UsedCredits, attribValue)));
......@@ -7513,6 +8014,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
setPlanCancelled ((Boolean)(HELPER_PlanCancelled.fromObject (_PlanCancelled, attribValue)));
}
else if (attribName.equals (FIELD_OnTrial))
{
setOnTrial ((Boolean)(HELPER_OnTrial.fromObject (_OnTrial, attribValue)));
}
else if (attribName.equals (FIELD_TrialJobCount))
{
setTrialJobCount ((Integer)(HELPER_TrialJobCount.fromObject (_TrialJobCount, attribValue)));
}
else if (attribName.equals (FIELD_MessageID))
{
setMessageID ((Integer)(HELPER_MessageID.fromObject (_MessageID, attribValue)));
......@@ -7629,6 +8138,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
return getWriteability_PlanRenewedOn ();
}
else if (fieldName.equals (FIELD_PPJCredits))
{
return getWriteability_PPJCredits ();
}
else if (fieldName.equals (FIELD_UsedCredits))
{
return getWriteability_UsedCredits ();
......@@ -7665,6 +8178,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
return getWriteability_PlanCancelled ();
}
else if (fieldName.equals (FIELD_OnTrial))
{
return getWriteability_OnTrial ();
}
else if (fieldName.equals (FIELD_TrialJobCount))
{
return getWriteability_TrialJobCount ();
}
else if (fieldName.equals (FIELD_MessageID))
{
return getWriteability_MessageID ();
......@@ -7822,6 +8343,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
fields.add (FIELD_PlanRenewedOn);
}
if (getWriteability_PPJCredits () != FieldWriteability.TRUE)
{
fields.add (FIELD_PPJCredits);
}
if (getWriteability_UsedCredits () != FieldWriteability.TRUE)
{
fields.add (FIELD_UsedCredits);
......@@ -7867,6 +8393,16 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
fields.add (FIELD_PlanCancelled);
}
if (getWriteability_OnTrial () != FieldWriteability.TRUE)
{
fields.add (FIELD_OnTrial);
}
if (getWriteability_TrialJobCount () != FieldWriteability.TRUE)
{
fields.add (FIELD_TrialJobCount);
}
if (getWriteability_MessageID () != FieldWriteability.TRUE)
{
fields.add (FIELD_MessageID);
......@@ -7920,6 +8456,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
result.add(HELPER_CardPostCode.getAttribObject (getClass (), _CardPostCode, false, FIELD_CardPostCode));
result.add(HELPER_CardID.getAttribObject (getClass (), _CardID, false, FIELD_CardID));
result.add(HELPER_PlanRenewedOn.getAttribObject (getClass (), _PlanRenewedOn, false, FIELD_PlanRenewedOn));
result.add(HELPER_PPJCredits.getAttribObject (getClass (), _PPJCredits, false, FIELD_PPJCredits));
result.add(HELPER_UsedCredits.getAttribObject (getClass (), _UsedCredits, false, FIELD_UsedCredits));
result.add(HELPER_AvailableCredits.getAttribObject (getClass (), _AvailableCredits, false, FIELD_AvailableCredits));
result.add(HELPER_IsPPJ.getAttribObject (getClass (), _IsPPJ, false, FIELD_IsPPJ));
......@@ -7929,6 +8466,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
result.add(HELPER_LastPlanAmount.getAttribObject (getClass (), _LastPlanAmount, false, FIELD_LastPlanAmount));
result.add(HELPER_GoogleAddressText.getAttribObject (getClass (), _GoogleAddressText, false, FIELD_GoogleAddressText));
result.add(HELPER_PlanCancelled.getAttribObject (getClass (), _PlanCancelled, false, FIELD_PlanCancelled));
result.add(HELPER_OnTrial.getAttribObject (getClass (), _OnTrial, false, FIELD_OnTrial));
result.add(HELPER_TrialJobCount.getAttribObject (getClass (), _TrialJobCount, false, FIELD_TrialJobCount));
result.add(HELPER_MessageID.getAttribObject (getClass (), _MessageID, false, FIELD_MessageID));
result.add(HELPER_IsLogoDeleted.getAttribObject (getClass (), _IsLogoDeleted, false, FIELD_IsLogoDeleted));
result.add(HELPER_CouponCode.getAttribObject (getClass (), _CouponCode, false, FIELD_CouponCode));
......@@ -8345,6 +8884,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
}
/**
* Get the attribute PPJCredits
*/
public Integer getPPJCredits (HiringTeam obj, Integer original)
{
return original;
}
/**
* Change the value set for attribute PPJCredits.
* May modify the field beforehand
* Occurs before validation.
*/
public Integer setPPJCredits (HiringTeam obj, Integer newPPJCredits) throws FieldException
{
return newPPJCredits;
}
/**
* Get the attribute UsedCredits
*/
public Integer getUsedCredits (HiringTeam obj, Integer original)
......@@ -8507,6 +9064,42 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
}
/**
* Get the attribute OnTrial
*/
public Boolean getOnTrial (HiringTeam obj, Boolean original)
{
return original;
}
/**
* Change the value set for attribute OnTrial.
* May modify the field beforehand
* Occurs before validation.
*/
public Boolean setOnTrial (HiringTeam obj, Boolean newOnTrial) throws FieldException
{
return newOnTrial;
}
/**
* Get the attribute TrialJobCount
*/
public Integer getTrialJobCount (HiringTeam obj, Integer original)
{
return original;
}
/**
* Change the value set for attribute TrialJobCount.
* May modify the field beforehand
* Occurs before validation.
*/
public Integer setTrialJobCount (HiringTeam obj, Integer newTrialJobCount) throws FieldException
{
return newTrialJobCount;
}
/**
* Get the attribute MessageID
*/
public Integer getMessageID (HiringTeam obj, Integer original)
......@@ -8752,6 +9345,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
return toPlanRenewedOn ();
}
if (name.equals ("PPJCredits"))
{
return toPPJCredits ();
}
if (name.equals ("UsedCredits"))
{
return toUsedCredits ();
......@@ -8788,6 +9385,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{
return toPlanCancelled ();
}
if (name.equals ("OnTrial"))
{
return toOnTrial ();
}
if (name.equals ("TrialJobCount"))
{
return toTrialJobCount ();
}
if (name.equals ("MessageID"))
{
return toMessageID ();
......@@ -8864,6 +9469,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
public PipeLine<From, Date> toPlanRenewedOn () { return pipe(new ORMAttributePipe<Me, Date>(FIELD_PlanRenewedOn)); }
public PipeLine<From, Integer> toPPJCredits () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_PPJCredits)); }
public PipeLine<From, Integer> toUsedCredits () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_UsedCredits)); }
public PipeLine<From, Integer> toAvailableCredits () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_AvailableCredits)); }
......@@ -8882,6 +9489,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
public PipeLine<From, Boolean> toPlanCancelled () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_PlanCancelled)); }
public PipeLine<From, Boolean> toOnTrial () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_OnTrial)); }
public PipeLine<From, Integer> toTrialJobCount () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_TrialJobCount)); }
public PipeLine<From, Integer> toMessageID () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_MessageID)); }
public Company.CompanyPipeLineFactory<From, Company> toCompany () { return toCompany (Filter.ALL); }
......
......@@ -852,7 +852,7 @@ public abstract class BaseJob extends BaseBusinessClass
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "job_title");
metaInfo.put ("length", "30");
metaInfo.put ("length", "60");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "JobTitle");
metaInfo.put ("type", "String");
......
/*
* IMPORTANT!!!! XSL Autogenerated class, DO NOT EDIT!!!!!
* Template: Infrastructure8.2 rev3 [oneit.objstore.BusinessObjectTemplate.xsl]
*
* Version: 1.0
* Vendor: Apache Software Foundation (Xalan XSLTC)
* Vendor URL: http://xml.apache.org/xalan-j
*/
package performa.orm;
import java.io.*;
import java.util.*;
import oneit.appservices.config.*;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.attributes.*;
import oneit.objstore.rdbms.filters.*;
import oneit.objstore.parser.*;
import oneit.objstore.validator.*;
import oneit.objstore.utils.*;
import oneit.utils.*;
import oneit.utils.filter.Filter;
import oneit.utils.transform.*;
import oneit.utils.parsers.FieldException;
import performa.orm.types.*;
import performa.orm.*;
public abstract class BaseNotificationTemplate extends BaseBusinessClass
{
// Reference instance for the object
public static final NotificationTemplate REFERENCE_NotificationTemplate = new NotificationTemplate ();
// Reference instance for the object
public static final NotificationTemplate DUMMY_NotificationTemplate = new DummyNotificationTemplate ();
// Static constants corresponding to field names
public static final String FIELD_NotificationType = "NotificationType";
public static final String FIELD_DaysAfter = "DaysAfter";
public static final String FIELD_NotificationContent = "NotificationContent";
// Static constants corresponding to searches
public static final String SEARCH_All = "All";
// Static constants corresponding to attribute helpers
private static final EnumeratedAttributeHelper<NotificationTemplate, NotificationType> HELPER_NotificationType = new EnumeratedAttributeHelper<NotificationTemplate, NotificationType> (NotificationType.FACTORY_NotificationType);
private static final DefaultAttributeHelper<NotificationTemplate> HELPER_DaysAfter = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<NotificationTemplate> HELPER_NotificationContent = DefaultAttributeHelper.INSTANCE;
// Private attributes corresponding to business object data
private NotificationType _NotificationType;
private Integer _DaysAfter;
private String _NotificationContent;
// Private attributes corresponding to single references
// Private attributes corresponding to multiple references
// Map of maps of metadata
private static final Map ATTRIBUTES_METADATA_NotificationTemplate = new HashMap ();
// Arrays of validators for each attribute
private static final AttributeValidator[] FIELD_NotificationType_Validators;
private static final AttributeValidator[] FIELD_DaysAfter_Validators;
private static final AttributeValidator[] FIELD_NotificationContent_Validators;
// Arrays of behaviour decorators
private static final NotificationTemplateBehaviourDecorator[] NotificationTemplate_BehaviourDecorators;
static
{
try
{
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
FIELD_NotificationType_Validators = (AttributeValidator[])setupAttribMetaData_NotificationType(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_DaysAfter_Validators = (AttributeValidator[])setupAttribMetaData_DaysAfter(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_NotificationContent_Validators = (AttributeValidator[])setupAttribMetaData_NotificationContent(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_NotificationTemplate.initialiseReference ();
DUMMY_NotificationTemplate.initialiseReference ();
NotificationTemplate_BehaviourDecorators = BaseBusinessClass.getBBCBehaviours(NotificationTemplate.class).toArray(new NotificationTemplateBehaviourDecorator[0]);
}
catch (RuntimeException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR1, e, "Error initialising");
throw e;
}
}
// Meta Info setup
private static List setupAttribMetaData_NotificationType(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "notification_type");
metaInfo.put ("defaultValue", "NotificationType.TRIAL");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "NotificationType");
metaInfo.put ("type", "NotificationType");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for NotificationTemplate.NotificationType:", metaInfo);
ATTRIBUTES_METADATA_NotificationTemplate.put (FIELD_NotificationType, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(NotificationTemplate.class, "NotificationType", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for NotificationTemplate.NotificationType:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_DaysAfter(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "days_after");
metaInfo.put ("defaultValue", "0");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "DaysAfter");
metaInfo.put ("type", "Integer");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for NotificationTemplate.DaysAfter:", metaInfo);
ATTRIBUTES_METADATA_NotificationTemplate.put (FIELD_DaysAfter, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(NotificationTemplate.class, "DaysAfter", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for NotificationTemplate.DaysAfter:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_NotificationContent(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "notification_content");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "NotificationContent");
metaInfo.put ("type", "String");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for NotificationTemplate.NotificationContent:", metaInfo);
ATTRIBUTES_METADATA_NotificationTemplate.put (FIELD_NotificationContent, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(NotificationTemplate.class, "NotificationContent", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for NotificationTemplate.NotificationContent:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION
// This constructor should not be called
protected BaseNotificationTemplate ()
{
}
protected BBCBehaviourDecorator[] getBehaviours()
{
return NotificationTemplate_BehaviourDecorators;
}
// Initialise the attributes
protected void _initialiseNewObjAttributes (ObjectTransaction transaction) throws StorageException
{
super._initialiseNewObjAttributes (transaction);
_NotificationType = (NotificationType)(NotificationType.TRIAL);
_DaysAfter = (Integer)(0);
_NotificationContent = (String)(HELPER_NotificationContent.initialise (_NotificationContent));
}
// Initialise the associations
protected void _initialiseAssociations ()
{
super._initialiseAssociations ();
}
// Initialise the associations
protected BaseBusinessClass initialiseReference ()
{
super.initialiseReference ();
return this;
}
/**
* Get the attribute NotificationType
*/
public NotificationType getNotificationType ()
{
assertValid();
NotificationType valToReturn = _NotificationType;
for (NotificationTemplateBehaviourDecorator bhd : NotificationTemplate_BehaviourDecorators)
{
valToReturn = bhd.getNotificationType ((NotificationTemplate)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 preNotificationTypeChange (NotificationType newNotificationType) 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 postNotificationTypeChange () throws FieldException
{
}
public FieldWriteability getWriteability_NotificationType ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute NotificationType. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setNotificationType (NotificationType newNotificationType) throws FieldException
{
boolean oldAndNewIdentical = HELPER_NotificationType.compare (_NotificationType, newNotificationType);
try
{
for (NotificationTemplateBehaviourDecorator bhd : NotificationTemplate_BehaviourDecorators)
{
newNotificationType = bhd.setNotificationType ((NotificationTemplate)this, newNotificationType);
oldAndNewIdentical = HELPER_NotificationType.compare (_NotificationType, newNotificationType);
}
BusinessObjectParser.assertFieldCondition (newNotificationType != null, this, FIELD_NotificationType, "mandatory");
if (FIELD_NotificationType_Validators.length > 0)
{
Object newNotificationTypeObj = HELPER_NotificationType.toObject (newNotificationType);
if (newNotificationTypeObj != null)
{
int loopMax = FIELD_NotificationType_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_NotificationTemplate.get (FIELD_NotificationType);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_NotificationType_Validators[v].checkAttribute (this, FIELD_NotificationType, metadata, newNotificationTypeObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_NotificationType () != FieldWriteability.FALSE, "Field NotificationType is not writeable");
preNotificationTypeChange (newNotificationType);
markFieldChange (FIELD_NotificationType);
_NotificationType = newNotificationType;
postFieldChange (FIELD_NotificationType);
postNotificationTypeChange ();
}
}
/**
* Get the attribute DaysAfter
*/
public Integer getDaysAfter ()
{
assertValid();
Integer valToReturn = _DaysAfter;
for (NotificationTemplateBehaviourDecorator bhd : NotificationTemplate_BehaviourDecorators)
{
valToReturn = bhd.getDaysAfter ((NotificationTemplate)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 preDaysAfterChange (Integer newDaysAfter) 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 postDaysAfterChange () throws FieldException
{
}
public FieldWriteability getWriteability_DaysAfter ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute DaysAfter. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setDaysAfter (Integer newDaysAfter) throws FieldException
{
boolean oldAndNewIdentical = HELPER_DaysAfter.compare (_DaysAfter, newDaysAfter);
try
{
for (NotificationTemplateBehaviourDecorator bhd : NotificationTemplate_BehaviourDecorators)
{
newDaysAfter = bhd.setDaysAfter ((NotificationTemplate)this, newDaysAfter);
oldAndNewIdentical = HELPER_DaysAfter.compare (_DaysAfter, newDaysAfter);
}
BusinessObjectParser.assertFieldCondition (newDaysAfter != null, this, FIELD_DaysAfter, "mandatory");
if (FIELD_DaysAfter_Validators.length > 0)
{
Object newDaysAfterObj = HELPER_DaysAfter.toObject (newDaysAfter);
if (newDaysAfterObj != null)
{
int loopMax = FIELD_DaysAfter_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_NotificationTemplate.get (FIELD_DaysAfter);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_DaysAfter_Validators[v].checkAttribute (this, FIELD_DaysAfter, metadata, newDaysAfterObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_DaysAfter () != FieldWriteability.FALSE, "Field DaysAfter is not writeable");
preDaysAfterChange (newDaysAfter);
markFieldChange (FIELD_DaysAfter);
_DaysAfter = newDaysAfter;
postFieldChange (FIELD_DaysAfter);
postDaysAfterChange ();
}
}
/**
* Get the attribute NotificationContent
*/
public String getNotificationContent ()
{
assertValid();
String valToReturn = _NotificationContent;
for (NotificationTemplateBehaviourDecorator bhd : NotificationTemplate_BehaviourDecorators)
{
valToReturn = bhd.getNotificationContent ((NotificationTemplate)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 preNotificationContentChange (String newNotificationContent) 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 postNotificationContentChange () throws FieldException
{
}
public FieldWriteability getWriteability_NotificationContent ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute NotificationContent. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setNotificationContent (String newNotificationContent) throws FieldException
{
boolean oldAndNewIdentical = HELPER_NotificationContent.compare (_NotificationContent, newNotificationContent);
try
{
for (NotificationTemplateBehaviourDecorator bhd : NotificationTemplate_BehaviourDecorators)
{
newNotificationContent = bhd.setNotificationContent ((NotificationTemplate)this, newNotificationContent);
oldAndNewIdentical = HELPER_NotificationContent.compare (_NotificationContent, newNotificationContent);
}
BusinessObjectParser.assertFieldCondition (newNotificationContent != null, this, FIELD_NotificationContent, "mandatory");
if (FIELD_NotificationContent_Validators.length > 0)
{
Object newNotificationContentObj = HELPER_NotificationContent.toObject (newNotificationContent);
if (newNotificationContentObj != null)
{
int loopMax = FIELD_NotificationContent_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_NotificationTemplate.get (FIELD_NotificationContent);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_NotificationContent_Validators[v].checkAttribute (this, FIELD_NotificationContent, metadata, newNotificationContentObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_NotificationContent () != FieldWriteability.FALSE, "Field NotificationContent is not writeable");
preNotificationContentChange (newNotificationContent);
markFieldChange (FIELD_NotificationContent);
_NotificationContent = newNotificationContent;
postFieldChange (FIELD_NotificationContent);
postNotificationContentChange ();
}
}
/**
* A list of multi assoc names e.g. list of strings.
*/
public List<String> getSingleAssocs()
{
List result = super.getSingleAssocs ();
return result;
}
public BaseBusinessClass getSingleAssocReferenceInstance (String assocName)
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else
{
return super.getSingleAssocReferenceInstance (assocName);
}
}
public String getSingleAssocBackReference(String assocName)
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else
{
return super.getSingleAssocBackReference (assocName);
}
}
public BaseBusinessClass getSingleAssoc (String assocName) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else
{
return super.getSingleAssoc (assocName);
}
}
public BaseBusinessClass getSingleAssoc (String assocName, Get getType) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else
{
return super.getSingleAssoc (assocName, getType);
}
}
public Long getSingleAssocID (String assocName) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else
{
return super.getSingleAssocID (assocName);
}
}
public void setSingleAssoc (String assocName, BaseBusinessClass newValue) throws StorageException, FieldException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else
{
super.setSingleAssoc (assocName, newValue);
}
}
/**
* A list of multi assoc names e.g. list of strings.
*/
public List<String> getMultiAssocs()
{
List result = super.getMultiAssocs ();
return result;
}
/**
* Get the reference instance for the multi assoc name.
*/
public BaseBusinessClass getMultiAssocReferenceInstance(String attribName)
{
return super.getMultiAssocReferenceInstance(attribName);
}
public String getMultiAssocBackReference(String attribName)
{
return super.getMultiAssocBackReference(attribName);
}
/**
* Get the assoc count for the multi assoc name.
*/
public int getMultiAssocCount(String attribName) throws StorageException
{
return super.getMultiAssocCount(attribName);
}
/**
* Get the assoc at a particular index
*/
public BaseBusinessClass getMultiAssocAt(String attribName, int index) throws StorageException
{
return super.getMultiAssocAt(attribName, index);
}
/**
* Add to a multi assoc by attribute name
*/
public void addToMultiAssoc(String attribName, BaseBusinessClass newElement) throws StorageException
{
super.addToMultiAssoc(attribName, newElement);
}
/**
* Remove from a multi assoc by attribute name
*/
public void removeFromMultiAssoc(String attribName, BaseBusinessClass oldElement) throws StorageException
{
super.removeFromMultiAssoc(attribName, oldElement);
}
protected void __loadMultiAssoc (String attribName, BaseBusinessClass[] elements)
{
super.__loadMultiAssoc(attribName, elements);
}
protected boolean __isMultiAssocLoaded (String attribName)
{
return super.__isMultiAssocLoaded(attribName);
}
public void onDelete ()
{
try
{
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
super.onDelete ();
}
public NotificationTemplate newInstance ()
{
return new NotificationTemplate ();
}
public NotificationTemplate referenceInstance ()
{
return REFERENCE_NotificationTemplate;
}
public NotificationTemplate getInTransaction (ObjectTransaction t) throws StorageException
{
return getNotificationTemplateByID (t, getObjectID());
}
public BaseBusinessClass dummyInstance ()
{
return DUMMY_NotificationTemplate;
}
public String getBaseSetName ()
{
return "tl_notification_template";
}
/**
* This is where an object returns the Persistent sets that will
* store it into the database.
* The should be entered into allSets
*/
public void getPersistentSets (PersistentSetCollection allSets)
{
ObjectStatus myStatus = getStatus ();
PersistentSetStatus myPSetStatus = myStatus.getPSetStatus();
ObjectID myID = getID();
super.getPersistentSets (allSets);
PersistentSet tl_notification_templatePSet = allSets.getPersistentSet (myID, "tl_notification_template", myPSetStatus);
tl_notification_templatePSet.setAttrib (FIELD_ObjectID, myID);
tl_notification_templatePSet.setAttrib (FIELD_NotificationType, HELPER_NotificationType.toObject (_NotificationType)); //
tl_notification_templatePSet.setAttrib (FIELD_DaysAfter, HELPER_DaysAfter.toObject (_DaysAfter)); //
tl_notification_templatePSet.setAttrib (FIELD_NotificationContent, HELPER_NotificationContent.toObject (_NotificationContent)); //
}
/**
* Sets the objects state based on Persistent sets.
*/
public void setFromPersistentSets (ObjectID objectID, PersistentSetCollection allSets)
{
super.setFromPersistentSets (objectID, allSets);
PersistentSet tl_notification_templatePSet = allSets.getPersistentSet (objectID, "tl_notification_template");
_NotificationType = (NotificationType)(HELPER_NotificationType.fromObject (_NotificationType, tl_notification_templatePSet.getAttrib (FIELD_NotificationType))); //
_DaysAfter = (Integer)(HELPER_DaysAfter.fromObject (_DaysAfter, tl_notification_templatePSet.getAttrib (FIELD_DaysAfter))); //
_NotificationContent = (String)(HELPER_NotificationContent.fromObject (_NotificationContent, tl_notification_templatePSet.getAttrib (FIELD_NotificationContent))); //
}
public void setAttributesFrom (BaseBusinessClass other, MultiException e)
{
super.setAttributesFrom (other, e);
if (other instanceof NotificationTemplate)
{
NotificationTemplate otherNotificationTemplate = (NotificationTemplate)other;
try
{
setNotificationType (otherNotificationTemplate.getNotificationType ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setDaysAfter (otherNotificationTemplate.getDaysAfter ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setNotificationContent (otherNotificationTemplate.getNotificationContent ());
}
catch (FieldException ex)
{
e.addException (ex);
}
}
}
/**
* Set the attributes in this to copies of the attributes in source.
*/
public void copyAttributesFrom (BaseBusinessClass source)
{
super.copyAttributesFrom (source);
if (source instanceof BaseNotificationTemplate)
{
BaseNotificationTemplate sourceNotificationTemplate = (BaseNotificationTemplate)(source);
_NotificationType = sourceNotificationTemplate._NotificationType;
_DaysAfter = sourceNotificationTemplate._DaysAfter;
_NotificationContent = sourceNotificationTemplate._NotificationContent;
}
}
/**
* Set the associations in this to copies of the attributes in source.
*/
public void copySingleAssociationsFrom (BaseBusinessClass source, boolean linkToGhosts)
{
super.copySingleAssociationsFrom (source, linkToGhosts);
if (source instanceof BaseNotificationTemplate)
{
BaseNotificationTemplate sourceNotificationTemplate = (BaseNotificationTemplate)(source);
}
}
/**
* Set the associations in this to copies of the attributes in source.
*/
public void copyAssociationsFrom (BaseBusinessClass source, boolean linkToGhosts)
{
super.copyAssociationsFrom (source, linkToGhosts);
if (source instanceof BaseNotificationTemplate)
{
BaseNotificationTemplate sourceNotificationTemplate = (BaseNotificationTemplate)(source);
}
}
public void validate (ValidationContext context)
{
super.validate (context);
}
/**
* Subclasses must override this to read in their attributes
*/
protected void readExternalData(Map<String, Object> vals) throws IOException, ClassNotFoundException
{
super.readExternalData(vals);
_NotificationType = (NotificationType)(HELPER_NotificationType.readExternal (_NotificationType, vals.get(FIELD_NotificationType))); //
_DaysAfter = (Integer)(HELPER_DaysAfter.readExternal (_DaysAfter, vals.get(FIELD_DaysAfter))); //
_NotificationContent = (String)(HELPER_NotificationContent.readExternal (_NotificationContent, vals.get(FIELD_NotificationContent))); //
}
/**
* Subclasses must override this to write out their attributes
*/
protected void writeExternalData(Map<String, Object> vals) throws IOException
{
super.writeExternalData(vals);
vals.put (FIELD_NotificationType, HELPER_NotificationType.writeExternal (_NotificationType));
vals.put (FIELD_DaysAfter, HELPER_DaysAfter.writeExternal (_DaysAfter));
vals.put (FIELD_NotificationContent, HELPER_NotificationContent.writeExternal (_NotificationContent));
}
public void compare (BaseBusinessClass other, AttributeChangeListener listener) throws StorageException
{
super.compare (other, listener);
if (other instanceof BaseNotificationTemplate)
{
BaseNotificationTemplate otherNotificationTemplate = (BaseNotificationTemplate)(other);
if (!HELPER_NotificationType.compare(this._NotificationType, otherNotificationTemplate._NotificationType))
{
listener.notifyFieldChange(this, other, FIELD_NotificationType, HELPER_NotificationType.toObject(this._NotificationType), HELPER_NotificationType.toObject(otherNotificationTemplate._NotificationType));
}
if (!HELPER_DaysAfter.compare(this._DaysAfter, otherNotificationTemplate._DaysAfter))
{
listener.notifyFieldChange(this, other, FIELD_DaysAfter, HELPER_DaysAfter.toObject(this._DaysAfter), HELPER_DaysAfter.toObject(otherNotificationTemplate._DaysAfter));
}
if (!HELPER_NotificationContent.compare(this._NotificationContent, otherNotificationTemplate._NotificationContent))
{
listener.notifyFieldChange(this, other, FIELD_NotificationContent, HELPER_NotificationContent.toObject(this._NotificationContent), HELPER_NotificationContent.toObject(otherNotificationTemplate._NotificationContent));
}
// Compare single assocs
// Compare multiple assocs
}
}
public void visitTransients (AttributeVisitor visitor) throws StorageException
{
super.visitAttributes (visitor);
}
public void visitAttributes (AttributeVisitor visitor) throws StorageException
{
super.visitAttributes (visitor);
visitor.visitField(this, FIELD_NotificationType, HELPER_NotificationType.toObject(getNotificationType()));
visitor.visitField(this, FIELD_DaysAfter, HELPER_DaysAfter.toObject(getDaysAfter()));
visitor.visitField(this, FIELD_NotificationContent, HELPER_NotificationContent.toObject(getNotificationContent()));
}
public void visitAssociations (AssociationVisitor visitor, AssociatedScope scope) throws StorageException
{
super.visitAssociations (visitor, scope);
}
public static NotificationTemplate createNotificationTemplate (ObjectTransaction transaction) throws StorageException
{
NotificationTemplate result = new NotificationTemplate ();
result.initialiseNewObject (transaction);
return result;
}
public static NotificationTemplate getNotificationTemplateByID (ObjectTransaction transaction, Long objectID) throws StorageException
{
return (NotificationTemplate)(transaction.getObjectByID (REFERENCE_NotificationTemplate, objectID));
}
public boolean testFilter (String attribName, QueryFilter filter) throws StorageException
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_NotificationType))
{
return filter.matches (getNotificationType ());
}
else if (attribName.equals (FIELD_DaysAfter))
{
return filter.matches (getDaysAfter ());
}
else if (attribName.equals (FIELD_NotificationContent))
{
return filter.matches (getNotificationContent ());
}
else
{
return super.testFilter (attribName, filter);
}
}
public static SearchAll SearchByAll () { return new SearchAll (); }
public static class SearchAll extends SearchObject<NotificationTemplate>
{
public SearchAll andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "tl_notification_template.object_id", FIELD_ObjectID);
return this;
}
public SearchAll andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_notification_template.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchAll andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_notification_template.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchAll andNotificationType (QueryFilter<NotificationType> filter)
{
filter.addFilter (context, "tl_notification_template.notification_type", "NotificationType");
return this;
}
public SearchAll andDaysAfter (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_notification_template.days_after", "DaysAfter");
return this;
}
public SearchAll andNotificationContent (QueryFilter<String> filter)
{
filter.addFilter (context, "tl_notification_template.notification_content", "NotificationContent");
return this;
}
public NotificationTemplate[]
search (ObjectTransaction transaction) throws StorageException
{
BaseBusinessClass[] results = super.search (transaction, REFERENCE_NotificationTemplate, SEARCH_All, criteria);
Set<NotificationTemplate> typedResults = new LinkedHashSet <NotificationTemplate> ();
for (BaseBusinessClass bbcResult : results)
{
NotificationTemplate aResult = (NotificationTemplate)bbcResult;
typedResults.add (aResult);
}
return ObjstoreUtils.removeDeleted(transaction, typedResults).toArray (new NotificationTemplate[0]);
}
}
public static NotificationTemplate[]
searchAll (ObjectTransaction transaction) throws StorageException
{
return SearchByAll ()
.search (transaction);
}
public Object getAttribute (String attribName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_NotificationType))
{
return HELPER_NotificationType.toObject (getNotificationType ());
}
else if (attribName.equals (FIELD_DaysAfter))
{
return HELPER_DaysAfter.toObject (getDaysAfter ());
}
else if (attribName.equals (FIELD_NotificationContent))
{
return HELPER_NotificationContent.toObject (getNotificationContent ());
}
else
{
return super.getAttribute (attribName);
}
}
public AttributeHelper getAttributeHelper (String attribName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_NotificationType))
{
return HELPER_NotificationType;
}
else if (attribName.equals (FIELD_DaysAfter))
{
return HELPER_DaysAfter;
}
else if (attribName.equals (FIELD_NotificationContent))
{
return HELPER_NotificationContent;
}
else
{
return super.getAttributeHelper (attribName);
}
}
public void setAttribute (String attribName, Object attribValue) throws FieldException
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_NotificationType))
{
setNotificationType ((NotificationType)(HELPER_NotificationType.fromObject (_NotificationType, attribValue)));
}
else if (attribName.equals (FIELD_DaysAfter))
{
setDaysAfter ((Integer)(HELPER_DaysAfter.fromObject (_DaysAfter, attribValue)));
}
else if (attribName.equals (FIELD_NotificationContent))
{
setNotificationContent ((String)(HELPER_NotificationContent.fromObject (_NotificationContent, attribValue)));
}
else
{
super.setAttribute (attribName, attribValue);
}
}
public boolean isWriteable (String fieldName)
{
return getWriteable (fieldName) == FieldWriteability.TRUE;
}
public FieldWriteability getWriteable (String fieldName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (fieldName.equals (FIELD_NotificationType))
{
return getWriteability_NotificationType ();
}
else if (fieldName.equals (FIELD_DaysAfter))
{
return getWriteability_DaysAfter ();
}
else if (fieldName.equals (FIELD_NotificationContent))
{
return getWriteability_NotificationContent ();
}
else
{
return super.getWriteable (fieldName);
}
}
public void putUnwriteable (Set<String> fields)
{
if (getWriteability_NotificationType () != FieldWriteability.TRUE)
{
fields.add (FIELD_NotificationType);
}
if (getWriteability_DaysAfter () != FieldWriteability.TRUE)
{
fields.add (FIELD_DaysAfter);
}
if (getWriteability_NotificationContent () != FieldWriteability.TRUE)
{
fields.add (FIELD_NotificationContent);
}
super.putUnwriteable (fields);
}
public List<AbstractAttribute> getAttributes ()
{
List result = super.getAttributes ();
result.add(HELPER_NotificationType.getAttribObject (getClass (), _NotificationType, true, FIELD_NotificationType));
result.add(HELPER_DaysAfter.getAttribObject (getClass (), _DaysAfter, true, FIELD_DaysAfter));
result.add(HELPER_NotificationContent.getAttribObject (getClass (), _NotificationContent, true, FIELD_NotificationContent));
return result;
}
public Map getAttributeMetadata (String attribute)
{
if (ATTRIBUTES_METADATA_NotificationTemplate.containsKey (attribute))
{
return (Map)ATTRIBUTES_METADATA_NotificationTemplate.get (attribute);
}
else
{
return super.getAttributeMetadata (attribute);
}
}
public Object getAttributeMetadata (String attribute, String metadata)
{
if (ATTRIBUTES_METADATA_NotificationTemplate.containsKey (attribute))
{
return ((Map)ATTRIBUTES_METADATA_NotificationTemplate.get (attribute)).get(metadata);
}
else
{
return super.getAttributeMetadata (attribute, metadata);
}
}
public void preCommit (boolean willBeStored) throws Exception
{
super.preCommit(willBeStored);
if(willBeStored)
{
}
}
public oneit.servlets.objstore.binary.BinaryContentHandler getBinaryContentHandler(String attribName)
{
return super.getBinaryContentHandler(attribName);
}
public static class NotificationTemplateBehaviourDecorator extends BaseBusinessClass.BBCBehaviourDecorator<NotificationTemplate>
{
/**
* Get the attribute NotificationType
*/
public NotificationType getNotificationType (NotificationTemplate obj, NotificationType original)
{
return original;
}
/**
* Change the value set for attribute NotificationType.
* May modify the field beforehand
* Occurs before validation.
*/
public NotificationType setNotificationType (NotificationTemplate obj, NotificationType newNotificationType) throws FieldException
{
return newNotificationType;
}
/**
* Get the attribute DaysAfter
*/
public Integer getDaysAfter (NotificationTemplate obj, Integer original)
{
return original;
}
/**
* Change the value set for attribute DaysAfter.
* May modify the field beforehand
* Occurs before validation.
*/
public Integer setDaysAfter (NotificationTemplate obj, Integer newDaysAfter) throws FieldException
{
return newDaysAfter;
}
/**
* Get the attribute NotificationContent
*/
public String getNotificationContent (NotificationTemplate obj, String original)
{
return original;
}
/**
* Change the value set for attribute NotificationContent.
* May modify the field beforehand
* Occurs before validation.
*/
public String setNotificationContent (NotificationTemplate obj, String newNotificationContent) throws FieldException
{
return newNotificationContent;
}
}
public ORMPipeLine pipes()
{
return new NotificationTemplatePipeLineFactory<NotificationTemplate, NotificationTemplate> ((NotificationTemplate)this);
}
/**
* Use this instead of pipes() to get rid of type casting.
*/
public NotificationTemplatePipeLineFactory<NotificationTemplate, NotificationTemplate> pipelineNotificationTemplate()
{
return (NotificationTemplatePipeLineFactory<NotificationTemplate, NotificationTemplate>) pipes();
}
public static NotificationTemplatePipeLineFactory<NotificationTemplate, NotificationTemplate> pipesNotificationTemplate(Collection<NotificationTemplate> items)
{
return REFERENCE_NotificationTemplate.new NotificationTemplatePipeLineFactory<NotificationTemplate, NotificationTemplate> (items);
}
public static NotificationTemplatePipeLineFactory<NotificationTemplate, NotificationTemplate> pipesNotificationTemplate(NotificationTemplate[] _items)
{
return pipesNotificationTemplate(Arrays.asList (_items));
}
public static NotificationTemplatePipeLineFactory<NotificationTemplate, NotificationTemplate> pipesNotificationTemplate()
{
return pipesNotificationTemplate((Collection)null);
}
public class NotificationTemplatePipeLineFactory<From extends BaseBusinessClass, Me extends NotificationTemplate> extends BaseBusinessClass.ORMPipeLine<From, Me>
{
public <Prev> NotificationTemplatePipeLineFactory (PipeLine<From, Prev> pipeLine, Pipe<Prev, Me> nextPipe)
{
super (pipeLine, nextPipe);
}
public NotificationTemplatePipeLineFactory (From seed)
{
super(seed);
}
public NotificationTemplatePipeLineFactory (Collection<From> seed)
{
super(seed);
}
public PipeLine<From, ? extends Object> to(String name)
{
if (name.equals ("NotificationType"))
{
return toNotificationType ();
}
if (name.equals ("DaysAfter"))
{
return toDaysAfter ();
}
if (name.equals ("NotificationContent"))
{
return toNotificationContent ();
}
return super.to(name);
}
public PipeLine<From, NotificationType> toNotificationType () { return pipe(new ORMAttributePipe<Me, NotificationType>(FIELD_NotificationType)); }
public PipeLine<From, Integer> toDaysAfter () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_DaysAfter)); }
public PipeLine<From, String> toNotificationContent () { return pipe(new ORMAttributePipe<Me, String>(FIELD_NotificationContent)); }
}
public boolean isTransientAttrib(String attribName)
{
return super.isTransientAttrib(attribName);
}
public boolean isTransientSingleReference(String assocName)
{
return super.isTransientSingleReference(assocName);
}
}
class DummyNotificationTemplate extends NotificationTemplate
{
// Default constructor primarily to support Externalisable
public DummyNotificationTemplate()
{
super();
}
public void assertValid ()
{
}
}
......@@ -9,10 +9,12 @@ import oneit.objstore.FieldWriteability;
import oneit.objstore.ValidationContext;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.security.SecUser;
import oneit.utils.BusinessException;
import oneit.utils.CollectionUtils;
import oneit.utils.DateDiff;
import oneit.utils.StringUtils;
import oneit.utils.filter.Filter;
import oneit.utils.math.NullArith;
import oneit.utils.parsers.FieldException;
import performa.orm.types.CurrencyType;
import performa.orm.types.RoleType;
......@@ -111,6 +113,13 @@ public class HiringTeam extends BaseHiringTeam
{
return super.getUsedCredits() != null ? super.getUsedCredits() : 0;
}
@Override
public Integer getPPJCredits()
{
return super.getPPJCredits() != null ? super.getPPJCredits() : 0;
}
@Override
......@@ -164,6 +173,11 @@ public class HiringTeam extends BaseHiringTeam
{
if(getManageOwnBilling())
{
if(isTrue(getOnTrial()))
{
return getTrialJobCount() == 0;
}
return getPaymentPlan() != null && getStripeSubscription() != null && (getAvailableCredits() > getUsedCredits() || !getHasCap() || (getHasCap() && getMaxCap() > getUsedCredits()));
}
......@@ -265,6 +279,11 @@ public class HiringTeam extends BaseHiringTeam
{
if(getManageOwnBilling())
{
if(isTrue(getOnTrial()))
{
return true;
}
return getCardID() != null && getIsPPJ() != null && (getIsPPJ() || (!getIsPPJ() && getPaymentPlan() != null && getStripeSubscription() != null));
}
......@@ -276,9 +295,37 @@ public class HiringTeam extends BaseHiringTeam
{
if(getManageOwnBilling())
{
if(isTrue(getOnTrial()))
{
return getTrialJobCount() == 0;
}
return isTrue(isPPJ()) || ( isFalse(isPPJ()) && getPaymentPlan() != null && getStripeSubscription() != null && (getAvailableCredits() > getUsedCredits() || !getHasCap() || (getHasCap() && getMaxCap() > getUsedCredits())));
}
return getBilledByTeam().allowJobCreation();
}
public boolean trialJobNotAllowed()
{
return isTrue(getOnTrial()) && getTrialJobCount() == 1;
}
@Override
public Integer getTrialJobCount()
{
return super.getTrialJobCount() != null ? super.getTrialJobCount() : 0;
}
public void makePayment(Job job) throws BusinessException
{
if(getPPJCredits() > 0)
{
setPPJCredits(NullArith.subtract(getPPJCredits(), 1).intValue());
}
else
{
StripeUtils.makePayment(this, job);
}
}
}
\ No newline at end of file
......@@ -37,6 +37,7 @@
<ATTRIB name="CardPostCode" type="String" dbcol="card_post_code" length="10" />
<ATTRIB name="CardID" type="String" dbcol="card_id" length="100" />
<ATTRIB name="PlanRenewedOn" type="Date" dbcol="plan_renewed_on" mandatory="false" />
<ATTRIB name="PPJCredits" type="Integer" dbcol="ppj_credits" />
<ATTRIB name="UsedCredits" type="Integer" dbcol="used_credits" />
<ATTRIB name="AvailableCredits" type="Integer" dbcol="available_credits" />
<ATTRIB name="IsPPJ" type="Boolean" dbcol="is_ppj" />
......@@ -46,6 +47,8 @@
<ATTRIB name="LastPlanAmount" type="Double" dbcol="last_plan_amount" />
<ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" length="300" />
<ATTRIB name="PlanCancelled" type="Boolean" dbcol="plan_cancelled" defaultValue="Boolean.FALSE"/>
<ATTRIB name="OnTrial" type="Boolean" dbcol="on_trial" defaultValue="Boolean.FALSE"/>
<ATTRIB name="TrialJobCount" type="Integer" dbcol="trial_job_count" defaultValue="0"/>
<ATTRIB name="MessageID" type="Integer" dbcol="message_id" />
<SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" mandatory="true" backreferenceName="HiringTeams" />
......
......@@ -47,6 +47,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
private String dummyCardPostCode;
private String dummyCardID;
private Date dummyPlanRenewedOn;
private Integer dummyPPJCredits;
private Integer dummyUsedCredits;
private Integer dummyAvailableCredits;
private Boolean dummyIsPPJ;
......@@ -56,6 +57,8 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
private Double dummyLastPlanAmount;
private String dummyGoogleAddressText;
private Boolean dummyPlanCancelled;
private Boolean dummyOnTrial;
private Integer dummyTrialJobCount;
private Integer dummyMessageID;
......@@ -79,6 +82,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
private static final DefaultAttributeHelper HELPER_CardPostCode = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_CardID = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_PlanRenewedOn = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_PPJCredits = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_UsedCredits = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_AvailableCredits = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_IsPPJ = DefaultAttributeHelper.INSTANCE;
......@@ -88,6 +92,8 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
private static final DefaultAttributeHelper HELPER_LastPlanAmount = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_GoogleAddressText = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_PlanCancelled = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_OnTrial = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_TrialJobCount = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_MessageID = DefaultAttributeHelper.INSTANCE;
......@@ -114,6 +120,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
dummyCardPostCode = (String)(HELPER_CardPostCode.initialise (dummyCardPostCode));
dummyCardID = (String)(HELPER_CardID.initialise (dummyCardID));
dummyPlanRenewedOn = (Date)(HELPER_PlanRenewedOn.initialise (dummyPlanRenewedOn));
dummyPPJCredits = (Integer)(HELPER_PPJCredits.initialise (dummyPPJCredits));
dummyUsedCredits = (Integer)(HELPER_UsedCredits.initialise (dummyUsedCredits));
dummyAvailableCredits = (Integer)(HELPER_AvailableCredits.initialise (dummyAvailableCredits));
dummyIsPPJ = (Boolean)(HELPER_IsPPJ.initialise (dummyIsPPJ));
......@@ -123,11 +130,13 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
dummyLastPlanAmount = (Double)(HELPER_LastPlanAmount.initialise (dummyLastPlanAmount));
dummyGoogleAddressText = (String)(HELPER_GoogleAddressText.initialise (dummyGoogleAddressText));
dummyPlanCancelled = (Boolean)(HELPER_PlanCancelled.initialise (dummyPlanCancelled));
dummyOnTrial = (Boolean)(HELPER_OnTrial.initialise (dummyOnTrial));
dummyTrialJobCount = (Integer)(HELPER_TrialJobCount.initialise (dummyTrialJobCount));
dummyMessageID = (Integer)(HELPER_MessageID.initialise (dummyMessageID));
}
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.stripe_fixed_sub_item, {PREFIX}tl_hiring_team.stripe_metered_sub_item, {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.available_credits, {PREFIX}tl_hiring_team.is_ppj, {PREFIX}tl_hiring_team.has_cap, {PREFIX}tl_hiring_team.max_cap, {PREFIX}tl_hiring_team.coupon_expiry_date, {PREFIX}tl_hiring_team.last_plan_amount, {PREFIX}tl_hiring_team.google_address_text, {PREFIX}tl_hiring_team.plan_cancelled, {PREFIX}tl_hiring_team.message_id, {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, {PREFIX}tl_hiring_team.coupon_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.stripe_fixed_sub_item, {PREFIX}tl_hiring_team.stripe_metered_sub_item, {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.ppj_credits, {PREFIX}tl_hiring_team.used_credits, {PREFIX}tl_hiring_team.available_credits, {PREFIX}tl_hiring_team.is_ppj, {PREFIX}tl_hiring_team.has_cap, {PREFIX}tl_hiring_team.max_cap, {PREFIX}tl_hiring_team.coupon_expiry_date, {PREFIX}tl_hiring_team.last_plan_amount, {PREFIX}tl_hiring_team.google_address_text, {PREFIX}tl_hiring_team.plan_cancelled, {PREFIX}tl_hiring_team.on_trial, {PREFIX}tl_hiring_team.trial_job_count, {PREFIX}tl_hiring_team.message_id, {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, {PREFIX}tl_hiring_team.coupon_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -197,6 +206,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_CardPostCode)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_CardID)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_PlanRenewedOn)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_PPJCredits)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_UsedCredits)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_AvailableCredits)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_IsPPJ)||
......@@ -206,6 +216,8 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_LastPlanAmount)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_GoogleAddressText)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_PlanCancelled)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_OnTrial)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_TrialJobCount)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_MessageID)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_Company)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_BilledByTeam)||
......@@ -301,10 +313,10 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"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 = ?, stripe_fixed_sub_item = ?, stripe_metered_sub_item = ?, name_on_card = ?, card_post_code = ?, card_id = ?, plan_renewed_on = ?, used_credits = ?, available_credits = ?, is_ppj = ?, has_cap = ?, max_cap = ?, coupon_expiry_date = ?, last_plan_amount = ?, google_address_text = ?, plan_cancelled = ?, message_id = ?, company_id = ? , billing_team_id = ? , added_by_user_id = ? , payment_plan_id = ? , coupon_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 = ?, stripe_fixed_sub_item = ?, stripe_metered_sub_item = ?, name_on_card = ?, card_post_code = ?, card_id = ?, plan_renewed_on = ?, ppj_credits = ?, used_credits = ?, available_credits = ?, is_ppj = ?, has_cap = ?, max_cap = ?, coupon_expiry_date = ?, last_plan_amount = ?, google_address_text = ?, plan_cancelled = ?, on_trial = ?, trial_job_count = ?, message_id = ?, company_id = ? , billing_team_id = ? , added_by_user_id = ? , payment_plan_id = ? , coupon_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"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_StripeFixedSubItem.getForSQL(dummyStripeFixedSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeFixedSubItem))).listEntry (HELPER_StripeMeteredSubItem.getForSQL(dummyStripeMeteredSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeMeteredSubItem))).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_AvailableCredits.getForSQL(dummyAvailableCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_AvailableCredits))).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 (HELPER_CouponExpiryDate.getForSQL(dummyCouponExpiryDate, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CouponExpiryDate))).listEntry (HELPER_LastPlanAmount.getForSQL(dummyLastPlanAmount, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_LastPlanAmount))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_GoogleAddressText))).listEntry (HELPER_PlanCancelled.getForSQL(dummyPlanCancelled, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanCancelled))).listEntry (HELPER_MessageID.getForSQL(dummyMessageID, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_MessageID))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Company)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_BilledByTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_AddedByUser)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_PaymentPlan)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Coupon)))).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_StripeFixedSubItem.getForSQL(dummyStripeFixedSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeFixedSubItem))).listEntry (HELPER_StripeMeteredSubItem.getForSQL(dummyStripeMeteredSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeMeteredSubItem))).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_PPJCredits.getForSQL(dummyPPJCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PPJCredits))).listEntry (HELPER_UsedCredits.getForSQL(dummyUsedCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_UsedCredits))).listEntry (HELPER_AvailableCredits.getForSQL(dummyAvailableCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_AvailableCredits))).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 (HELPER_CouponExpiryDate.getForSQL(dummyCouponExpiryDate, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CouponExpiryDate))).listEntry (HELPER_LastPlanAmount.getForSQL(dummyLastPlanAmount, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_LastPlanAmount))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_GoogleAddressText))).listEntry (HELPER_PlanCancelled.getForSQL(dummyPlanCancelled, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanCancelled))).listEntry (HELPER_OnTrial.getForSQL(dummyOnTrial, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_OnTrial))).listEntry (HELPER_TrialJobCount.getForSQL(dummyTrialJobCount, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_TrialJobCount))).listEntry (HELPER_MessageID.getForSQL(dummyMessageID, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_MessageID))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Company)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_BilledByTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_AddedByUser)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_PaymentPlan)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Coupon)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -621,6 +633,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_CardPostCode, HELPER_CardPostCode.getFromRS(dummyCardPostCode, r, "card_post_code"));
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_PPJCredits, HELPER_PPJCredits.getFromRS(dummyPPJCredits, r, "ppj_credits"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_UsedCredits, HELPER_UsedCredits.getFromRS(dummyUsedCredits, r, "used_credits"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_AvailableCredits, HELPER_AvailableCredits.getFromRS(dummyAvailableCredits, r, "available_credits"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_IsPPJ, HELPER_IsPPJ.getFromRS(dummyIsPPJ, r, "is_ppj"));
......@@ -630,6 +643,8 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_LastPlanAmount, HELPER_LastPlanAmount.getFromRS(dummyLastPlanAmount, r, "last_plan_amount"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_GoogleAddressText, HELPER_GoogleAddressText.getFromRS(dummyGoogleAddressText, r, "google_address_text"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_PlanCancelled, HELPER_PlanCancelled.getFromRS(dummyPlanCancelled, r, "plan_cancelled"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_OnTrial, HELPER_OnTrial.getFromRS(dummyOnTrial, r, "on_trial"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_TrialJobCount, HELPER_TrialJobCount.getFromRS(dummyTrialJobCount, r, "trial_job_count"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_MessageID, HELPER_MessageID.getFromRS(dummyMessageID, r, "message_id"));
tl_hiring_teamPSet.setAttrib(HiringTeam.SINGLEREFERENCE_Company, r.getObject ("company_id"));
......@@ -653,10 +668,10 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
{
executeStatement (sqlMgr,
"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, stripe_fixed_sub_item, stripe_metered_sub_item, name_on_card, card_post_code, card_id, plan_renewed_on, used_credits, available_credits, is_ppj, has_cap, max_cap, coupon_expiry_date, last_plan_amount, google_address_text, plan_cancelled, message_id, company_id, billing_team_id, added_by_user_id, payment_plan_id, coupon_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, stripe_fixed_sub_item, stripe_metered_sub_item, name_on_card, card_post_code, card_id, plan_renewed_on, ppj_credits, used_credits, available_credits, is_ppj, has_cap, max_cap, coupon_expiry_date, last_plan_amount, google_address_text, plan_cancelled, on_trial, trial_job_count, message_id, company_id, billing_team_id, added_by_user_id, payment_plan_id, coupon_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + 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_StripeFixedSubItem.getForSQL(dummyStripeFixedSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeFixedSubItem))).listEntry (HELPER_StripeMeteredSubItem.getForSQL(dummyStripeMeteredSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeMeteredSubItem))).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_AvailableCredits.getForSQL(dummyAvailableCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_AvailableCredits))).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 (HELPER_CouponExpiryDate.getForSQL(dummyCouponExpiryDate, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CouponExpiryDate))).listEntry (HELPER_LastPlanAmount.getForSQL(dummyLastPlanAmount, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_LastPlanAmount))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_GoogleAddressText))).listEntry (HELPER_PlanCancelled.getForSQL(dummyPlanCancelled, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanCancelled))).listEntry (HELPER_MessageID.getForSQL(dummyMessageID, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_MessageID))) .listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Company)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_BilledByTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_AddedByUser)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_PaymentPlan)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Coupon)))) .listEntry (objectID.longID ()).toList().toArray());
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + 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_StripeFixedSubItem.getForSQL(dummyStripeFixedSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeFixedSubItem))).listEntry (HELPER_StripeMeteredSubItem.getForSQL(dummyStripeMeteredSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeMeteredSubItem))).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_PPJCredits.getForSQL(dummyPPJCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PPJCredits))).listEntry (HELPER_UsedCredits.getForSQL(dummyUsedCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_UsedCredits))).listEntry (HELPER_AvailableCredits.getForSQL(dummyAvailableCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_AvailableCredits))).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 (HELPER_CouponExpiryDate.getForSQL(dummyCouponExpiryDate, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CouponExpiryDate))).listEntry (HELPER_LastPlanAmount.getForSQL(dummyLastPlanAmount, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_LastPlanAmount))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_GoogleAddressText))).listEntry (HELPER_PlanCancelled.getForSQL(dummyPlanCancelled, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanCancelled))).listEntry (HELPER_OnTrial.getForSQL(dummyOnTrial, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_OnTrial))).listEntry (HELPER_TrialJobCount.getForSQL(dummyTrialJobCount, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_TrialJobCount))).listEntry (HELPER_MessageID.getForSQL(dummyMessageID, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_MessageID))) .listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Company)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_BilledByTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_AddedByUser)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_PaymentPlan)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Coupon)))) .listEntry (objectID.longID ()).toList().toArray());
tl_hiring_teamPSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
......@@ -593,6 +593,11 @@ public class Job extends BaseJob
if(roleType != RoleType.STANDARD)
{
statusList.add(JobStatus.COMPLETE);
if(getJobApplicationsCount() == 0)
{
statusList.add(JobStatus.CANCELLED);
}
}
}
......
......@@ -33,7 +33,7 @@
<TABLE name="tl_job" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="JobTitle" type="String" dbcol="job_title" length="30" mandatory="true"/>
<ATTRIB name="JobTitle" type="String" dbcol="job_title" length="60" mandatory="true"/>
<ATTRIB name="JobDescription" type="String" dbcol="job_description" mandatory="true"/>
<ATTRIB name="JobStatus" type="JobStatus" dbcol="job_status" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<ATTRIB name="OpenDate" type="Date" dbcol="open_date"/>
......
package performa.orm;
import java.io.*;
import java.util.*;
import oneit.appservices.config.*;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.utils.*;
import performa.orm.types.*;
import performa.orm.*;
public class NotificationTemplate extends BaseNotificationTemplate
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public NotificationTemplate ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
}
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<BUSINESSCLASS name="NotificationTemplate" package="performa.orm">
<IMPORT value="performa.orm.types.*"/>
<IMPORT value="performa.orm.*"/>
<TABLE name="tl_notification_template" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="NotificationType" type="NotificationType" dbcol="notification_type" mandatory="true" defaultValue="NotificationType.TRIAL" attribHelper="EnumeratedAttributeHelper" />
<ATTRIB name="DaysAfter" type="Integer" dbcol="days_after" mandatory="true" defaultValue="0" />
<ATTRIB name="NotificationContent" type="String" dbcol="notification_content" mandatory="true" />
</TABLE>
<SEARCH type="All" paramFilter="tl_notification_template.object_id is not null" />
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
package performa.orm;
import java.io.*;
import java.util.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.rdbms.*;
import oneit.objstore.utils.*;
import oneit.sql.*;
import oneit.utils.resource.*;
import oneit.utils.*;
import oneit.utils.threading.*;
import performa.orm.types.*;
import performa.orm.*;
/**
* IMPORTANT!!!! Autogenerated class, DO NOT EDIT!!!!!
* Template: Infrastructure8.2[oneit.objstore.PersistenceMgrTemplate.xsl]
*/
public class NotificationTemplatePersistenceMgr extends ObjectPersistenceMgr
{
private static final LoggingArea NotificationTemplatePersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "NotificationTemplate");
// Private attributes corresponding to business object data
private NotificationType dummyNotificationType;
private Integer dummyDaysAfter;
private String dummyNotificationContent;
// Static constants corresponding to attribute helpers
private static final EnumeratedAttributeHelper HELPER_NotificationType = new EnumeratedAttributeHelper (NotificationType.FACTORY_NotificationType);
private static final DefaultAttributeHelper HELPER_DaysAfter = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_NotificationContent = DefaultAttributeHelper.INSTANCE;
public NotificationTemplatePersistenceMgr ()
{
dummyNotificationType = (NotificationType)(HELPER_NotificationType.initialise (dummyNotificationType));
dummyDaysAfter = (Integer)(HELPER_DaysAfter.initialise (dummyDaysAfter));
dummyNotificationContent = (String)(HELPER_NotificationContent.initialise (dummyNotificationContent));
}
private String SELECT_COLUMNS = "{PREFIX}tl_notification_template.object_id as id, {PREFIX}tl_notification_template.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_notification_template.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_notification_template.notification_type, {PREFIX}tl_notification_template.days_after, {PREFIX}tl_notification_template.notification_content, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> resultByIDs = fetchByIDs(Collections.singleton (id), allPSets, context, sqlMgr);
if (resultByIDs.isEmpty ())
{
return null;
}
else if (resultByIDs.size () > 1)
{
throw new StorageException ("Multiple results for id:" + id);
}
else
{
return resultByIDs.iterator ().next ();
}
}
public Set<BaseBusinessClass> fetchByIDs(Set<ObjectID> ids, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> results = new HashSet ();
Set<Long> idsToFetch = new HashSet ();
for (ObjectID id : ids)
{
if (context.containsObject(id)) // Check for cached version
{
BaseBusinessClass objectToReturn = context.getObjectToReplace(id, NotificationTemplate.REFERENCE_NotificationTemplate);
if (objectToReturn instanceof NotificationTemplate)
{
LogMgr.log (NotificationTemplatePersistence, LogLevel.TRACE, "Cache hit for id:", id);
results.add (objectToReturn);
}
else
{
throw new StorageException ("Cache collision for id:" + id + " with object " + objectToReturn + "while fetching a NotificationTemplate");
}
}
PersistentSet tl_notification_templatePSet = allPSets.getPersistentSet(id, "tl_notification_template", PersistentSetStatus.FETCHED);
// Check for persistent sets already prefetched
if (false || !tl_notification_templatePSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_notification_templatePSet.containsAttrib(NotificationTemplate.FIELD_NotificationType)||
!tl_notification_templatePSet.containsAttrib(NotificationTemplate.FIELD_DaysAfter)||
!tl_notification_templatePSet.containsAttrib(NotificationTemplate.FIELD_NotificationContent))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
}
else
{
LogMgr.log (NotificationTemplatePersistence, LogLevel.DEBUG2, "Persistent set preloaded id:", id);
/* Non Polymorphic */
NotificationTemplate result = new NotificationTemplate ();
result.setFromPersistentSets(id, allPSets);
context.addRetrievedObject(result);
results.add (result);
}
}
if (idsToFetch.size () > 0)
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_notification_template " +
"WHERE " + SELECT_JOINS + "{PREFIX}tl_notification_template.object_id IN ?";
BaseBusinessClass[] resultsFetched = loadQuery (allPSets, sqlMgr, context, query, new Object[] { idsToFetch }, null, false);
for (BaseBusinessClass objFetched : resultsFetched)
{
results.add (objFetched);
}
}
return results;
}
public BaseBusinessClass[] getReferencedObjects(ObjectID _objectID, String refName, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
if (false)
{
throw new RuntimeException ();
}
else
{
throw new IllegalArgumentException ("Illegal reference type:" + refName);
}
}
public void update(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
EqualityResult test = EqualityResult.compare (obj, obj.getBackup ());
ObjectID objectID = obj.getID ();
if (!test.areAttributesEqual () || !test.areSingleAssocsEqual () || obj.getForcedSave())
{
PersistentSet tl_notification_templatePSet = allPSets.getPersistentSet(objectID, "tl_notification_template");
if (tl_notification_templatePSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_notification_templatePSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_notification_template " +
"SET notification_type = ?, days_after = ?, notification_content = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_notification_template.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_NotificationType.getForSQL(dummyNotificationType, tl_notification_templatePSet.getAttrib (NotificationTemplate.FIELD_NotificationType))).listEntry (HELPER_DaysAfter.getForSQL(dummyDaysAfter, tl_notification_templatePSet.getAttrib (NotificationTemplate.FIELD_DaysAfter))).listEntry (HELPER_NotificationContent.getForSQL(dummyNotificationContent, tl_notification_templatePSet.getAttrib (NotificationTemplate.FIELD_NotificationContent))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id, object_LAST_UPDATED_DATE FROM {PREFIX}tl_notification_template WHERE object_id = ?",
new Object[] { objectID.longID () });
if (r.next ())
{
Date d = new java.util.Date (r.getTimestamp (2).getTime());
String errorMsg = QueryBuilder.buildQueryString ("Concurrent update error:[?] for row:[?] objDate:[?] dbDate:[?]",
new Object[] { "tl_notification_template", objectID.longID (), obj.getObjectLastModified (), d },
sqlMgr.getPortabilityServices ());
LogMgr.log (NotificationTemplatePersistence, LogLevel.BUSINESS1, errorMsg);
throw new ConcurrentUpdateConflictException (obj, "tl_notification_template");
}
else
{
String errorMsg = "Attempt to update nonexistent row in table:tl_notification_template for row:" + objectID + " objDate:" + obj.getObjectLastModified ();
LogMgr.log (NotificationTemplatePersistence, LogLevel.BUSINESS1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_notification_templatePSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
else
{
LogMgr.log (NotificationTemplatePersistence, LogLevel.DEBUG1, "Skipping update since no attribs or simple assocs changed on ", objectID);
}
}
public void delete(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_notification_templatePSet = allPSets.getPersistentSet(objectID, "tl_notification_template");
LogMgr.log (NotificationTemplatePersistence, LogLevel.DEBUG2, "Deleting:", objectID);
if (tl_notification_templatePSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_notification_templatePSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsDeleted = executeStatement (sqlMgr,
"DELETE " +
"FROM {PREFIX}tl_notification_template " +
"WHERE tl_notification_template.object_id = ? AND " + sqlMgr.getPortabilityServices ().getTruncatedTimestampColumn ("object_LAST_UPDATED_DATE") + " = " + sqlMgr.getPortabilityServices ().getTruncatedTimestampParam("?") + " ",
new Object[] { objectID.longID(), obj.getObjectLastModified () });
if (rowsDeleted != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id FROM {PREFIX}tl_notification_template WHERE object_id = ?",
new Object[] { objectID.longID() });
if (r.next ())
{
throw new ConcurrentUpdateConflictException (obj, "tl_notification_template");
}
else
{
String errorMsg = "Attempt to delete nonexistent row in table:tl_notification_template for row:" + objectID;
LogMgr.log (NotificationTemplatePersistence, LogLevel.SYSTEMERROR1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_notification_templatePSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
public ResultSet executeSearchQueryAll (SQLManager sqlMgr) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryAll");
}
public BaseBusinessClass[] loadQuery (PersistentSetCollection allPSets, SQLManager sqlMgr, RDBMSPersistenceContext context, String query, Object[] params, Integer maxRows, boolean truncateExtra) throws SQLException, StorageException
{
LinkedHashMap<ObjectID, NotificationTemplate> results = new LinkedHashMap ();
ResultSet r = executeQuery (sqlMgr, query, params);
while (r.next())
{
ThreadUtils.checkInterrupted ();
ObjectID objectID = new ObjectID (NotificationTemplate.REFERENCE_NotificationTemplate.getObjectIDSpace (), r.getLong ("id"));
NotificationTemplate resultElement;
if (maxRows != null && !results.containsKey (objectID) && results.size () >= maxRows)
{
if (truncateExtra)
{
break;
}
else
{
throw new SearchRowsExceededException ("Maximum rows exceeded:" + maxRows);
}
}
if (context.containsObject(objectID))
{
BaseBusinessClass cachedElement = context.getObjectToReplace(objectID, NotificationTemplate.REFERENCE_NotificationTemplate);
if (cachedElement instanceof NotificationTemplate)
{
LogMgr.log (NotificationTemplatePersistence, LogLevel.TRACE, "Cache hit for id:", objectID);
resultElement = (NotificationTemplate)cachedElement;
}
else
{
throw new StorageException ("Cache collision for id:" + objectID + " with object " + cachedElement + "while fetching a NotificationTemplate");
}
}
else
{
PersistentSet tl_notification_templatePSet = allPSets.getPersistentSet(objectID, "tl_notification_template", PersistentSetStatus.FETCHED);
createPersistentSetFromRS(allPSets, r, objectID);
resultElement = new NotificationTemplate ();
resultElement.setFromPersistentSets(objectID, allPSets);
context.addRetrievedObject(resultElement);
}
results.put (objectID, resultElement);
}
BaseBusinessClass[] resultsArr = new BaseBusinessClass[results.size ()];
return results.values ().toArray (resultsArr);
}
public BaseBusinessClass[] find(String searchType, PersistentSetCollection allPSets, Hashtable criteria, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
LogMgr.log (NotificationTemplatePersistence, LogLevel.DEBUG2, "Search executing:", searchType, " criteria:", criteria);
String customParamFilter = (String)criteria.get (SEARCH_CustomFilter);
String customOrderBy = (String)criteria.get (SEARCH_OrderBy);
String customTables = (String)criteria.get (SEARCH_CustomExtraTables);
Boolean noCommaBeforeCustomExtraTables = (Boolean)criteria.get (SEARCH_CustomExtraTablesNoComma);
if (searchType.equals (SEARCH_CustomSQL))
{
Set<ObjectID> processedIDs = new HashSet();
SearchParamTransform tx = new SearchParamTransform (criteria);
Object[] searchParams;
customParamFilter = StringUtils.replaceParams (customParamFilter, tx);
searchParams = tx.getParamsArray();
if (customOrderBy != null)
{
customOrderBy = " ORDER BY " + customOrderBy;
}
else
{
customOrderBy = "";
}
ResultSet r;
String concatCustomTableWith = CollectionUtils.equals(noCommaBeforeCustomExtraTables, true) ? " " : ", ";
String tables = StringUtils.subBlanks(customTables) == null ? " " : concatCustomTableWith + customTables + " ";
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_notification_template " + tables +
"WHERE " + SELECT_JOINS + " " + customParamFilter + customOrderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, null, false);
return results;
}
else if (searchType.equals (NotificationTemplate.SEARCH_All))
{
// Local scope for transformed variables
{
}
String orderBy = " ";
String tables = " ";
Set<String> joinTableSet = new HashSet<String>();
String filter;
Object[] searchParams; // paramFilter: tl_notification_template.object_id is not null
String preFilter = "(tl_notification_template.object_id is not null)"
+ " ";
preFilter += context.getLoadingAttributes ().getCustomSQL() ;
SearchParamTransform tx = new SearchParamTransform (criteria);
filter = StringUtils.replaceParams (preFilter, tx);
searchParams = tx.getParamsArray();
Integer maxRows = context.getLoadingAttributes ().getMaxRows ();
boolean truncateExtra = !context.getLoadingAttributes ().isFailIfMaxExceeded();
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_notification_template " + tables + tableSetToSQL(joinTableSet) +
"WHERE " + SELECT_JOINS + " " + filter + orderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, maxRows, truncateExtra);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal search type:" + searchType);
}
}
private void createPersistentSetFromRS(PersistentSetCollection allPSets, ResultSet r, ObjectID objectID) throws SQLException
{
PersistentSet tl_notification_templatePSet = allPSets.getPersistentSet(objectID, "tl_notification_template", PersistentSetStatus.FETCHED);
// Object Modified
tl_notification_templatePSet.setAttrib(BaseBusinessClass.FIELD_ObjectLastModified, r.getTimestamp ("LAST_UPDATED_DATE"));
// Object Created
tl_notification_templatePSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_notification_templatePSet.setAttrib(NotificationTemplate.FIELD_NotificationType, HELPER_NotificationType.getFromRS(dummyNotificationType, r, "notification_type"));
tl_notification_templatePSet.setAttrib(NotificationTemplate.FIELD_DaysAfter, HELPER_DaysAfter.getFromRS(dummyDaysAfter, r, "days_after"));
tl_notification_templatePSet.setAttrib(NotificationTemplate.FIELD_NotificationContent, HELPER_NotificationContent.getFromRS(dummyNotificationContent, r, "notification_content"));
}
public void create(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_notification_templatePSet = allPSets.getPersistentSet(objectID, "tl_notification_template");
if (tl_notification_templatePSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_notification_templatePSet.getStatus () != PersistentSetStatus.DEFERRED)
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_notification_template " +
" (notification_type, days_after, notification_content, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_NotificationType.getForSQL(dummyNotificationType, tl_notification_templatePSet.getAttrib (NotificationTemplate.FIELD_NotificationType))).listEntry (HELPER_DaysAfter.getForSQL(dummyDaysAfter, tl_notification_templatePSet.getAttrib (NotificationTemplate.FIELD_DaysAfter))).listEntry (HELPER_NotificationContent.getForSQL(dummyNotificationContent, tl_notification_templatePSet.getAttrib (NotificationTemplate.FIELD_NotificationContent))) .listEntry (objectID.longID ()).toList().toArray());
tl_notification_templatePSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
}
......@@ -27,9 +27,11 @@ public class JobStatus extends AbstractEnumerated
public static final JobStatus DRAFT = new JobStatus ("DRAFT", "DRAFT", "Draft", false);
public static final JobStatus FILLED = new JobStatus ("FILLED", "FILLED", "Filled", false);
public static final JobStatus CANCELLED = new JobStatus ("CANCELLED", "CANCELLED", "Cancelled", false);
private static final JobStatus[] allJobStatuss =
new JobStatus[] { OPEN,COMPLETE,DRAFT,FILLED};
new JobStatus[] { OPEN,COMPLETE,DRAFT,FILLED,CANCELLED};
private static JobStatus[] getAllJobStatuss ()
......@@ -120,6 +122,7 @@ public class JobStatus extends AbstractEnumerated
COMPLETE.ClientSortOrder = 2;
DRAFT.ClientSortOrder = 4;
FILLED.ClientSortOrder = 3;
CANCELLED.ClientSortOrder = 5;
}
......
......@@ -9,6 +9,7 @@
<VALUE name="COMPLETE" value="COMPLETE" description="Closed" ClientSortOrder="2"/>
<VALUE name="DRAFT" value="DRAFT" description="Draft" ClientSortOrder="4"/>
<VALUE name="FILLED" value="FILLED" description="Filled" ClientSortOrder="3"/>
<VALUE name="CANCELLED" value="CANCELLED" description="Cancelled" ClientSortOrder="5"/>
</CONSTANT>
</ROOT>
\ No newline at end of file
package performa.orm.types;
import java.util.*;
import oneit.utils.*;
/**
* This class was generated using constGen.bat.
* DO NOT MODIFY THIS CODE.
* Edit the associated .xml file, and regenerate this file
* constGen (directory) (file minus extension)
* e.g. constGen C:\...\sql FieldType
*/
public class NotificationType extends AbstractEnumerated
{
public static final EnumeratedFactory FACTORY_NotificationType = new NotificationTypeFactory();
public static final NotificationType CLOSED_JOB = new NotificationType ("CLOSED_JOB", "CLOSED_JOB", "Closed Job", false);
public static final NotificationType TRIAL = new NotificationType ("TRIAL", "TRIAL", "Trial", false);
private static final NotificationType[] allNotificationTypes =
new NotificationType[] { CLOSED_JOB,TRIAL};
private static NotificationType[] getAllNotificationTypes ()
{
return allNotificationTypes;
}
private NotificationType (String name, String value, String description, boolean disabled)
{
super (name, value, description, disabled);
}
public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allNotificationTypes);
static
{
defineAdditionalData ();
}
public boolean isEqual (NotificationType other)
{
return this.name.equals (other.name);
}
public Enumeration getAllInstances ()
{
return NotificationType.getAll ();
}
private Object readResolve() throws java.io.ObjectStreamException
{
return NotificationType.forName (this.name);
}
public EnumeratedFactory getFactory ()
{
return FACTORY_NotificationType;
}
public static NotificationType forName (String name)
{
if (name == null) { return null; }
NotificationType[] all = getAllNotificationTypes();
int enumIndex = AbstractEnumerated.getIndexForName (all, name);
return all[enumIndex];
}
public static NotificationType forValue (String value)
{
if (value == null) { return null; }
NotificationType[] all = getAllNotificationTypes();
int enumIndex = AbstractEnumerated.getIndexForValue (getAllNotificationTypes (), value);
return all[enumIndex];
}
public static java.util.Enumeration getAll ()
{
return AbstractEnumerated.getAll (getAllNotificationTypes());
}
public static NotificationType[] getNotificationTypeArray ()
{
return (NotificationType[])getAllNotificationTypes().clone ();
}
public static void defineAdditionalData ()
{
}
static class NotificationTypeFactory implements EnumeratedFactory
{
public AbstractEnumerated getForName (String name)
{
return NotificationType.forName (name);
}
public AbstractEnumerated getForValue (String name)
{
return NotificationType.forValue (name);
}
public Enumeration getAll ()
{
return NotificationType.getAll ();
}
}
public Map getAdditionalAttributes ()
{
Map attribs = new HashMap ();
return attribs;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<CONSTANT package="performa.orm.types" name="NotificationType">
<VALUE name="CLOSED_JOB" value="CLOSED_JOB" description="Closed Job"/>
<VALUE name="TRIAL" value="TRIAL" description="Trial" />
</CONSTANT>
</ROOT>
......@@ -490,8 +490,6 @@ public class StripeUtils
LogMgr.log(LoggingArea.ALL, LogLevel.PROCESSING1, "Setting hiring team with reset plan details : ", hiringTeam);
}
}
}
}
......
......@@ -3120,6 +3120,10 @@ a.forgot-pass {
background: url('../images/closed.png') no-repeat top left;
}
.select2type-results .icontype_cancelled:before{
background: url('../images/cancelled.png') no-repeat top left;
}
.select2type-results .icontype_filled:before{
background: url('../images/filled.png') no-repeat top left;
}
......@@ -3431,6 +3435,21 @@ span.export-candidate,span.appli-status-short{
}
.culture-detail-row {position: relative; margin-top: 0 ;margin-bottom: 0}
.culture-dot{position: absolute;top: 16px;}
.culture-text{
padding-left: 20px;
position: absolute;
top: 0;
width: 75%;
display: table;
height: 45px;
}
.culture-text .calcField{
display: table-cell;
vertical-align: middle;
}
.culture-fit .text-dot-dot{white-space: normal;overflow: visible;}
.r-y-label{
font-size: 10px;
......
......@@ -165,6 +165,19 @@
<TASK factory="Participant" class="oneit.appservices.batch.DefaultTask" lockName="performa">
<RUN class="performa.batch.NotificationBatch" factory="Participant"/>
<WHEN factory="MetaComponent" component="BatchSchedule" selector="performa.runbatch">
<NODE name="schedule" class="oneit.appservices.batch.DailySchedule">
<NODE name="hourOfDay" factory="Integer" value="0"/>
<NODE name="minuteOfHour" factory="Integer" value="10"/>
</NODE>
</WHEN>
</TASK>
<TASK factory="Participant" class="oneit.appservices.batch.DefaultTask" lockName="performa">
<RUN class="performa.batch.PullStripeDataBatch" factory="Participant"/>
<WHEN factory="MetaComponent" component="BatchSchedule" selector="performa.runbatch">
......
......@@ -38,7 +38,7 @@
$('.errorField input, .errorField select, .errorField textarea, .errorField .assocObjDesc').eq(0).focus();
}
recalcFunction();
//recalcFunction();
});
});
......@@ -51,9 +51,9 @@
});
}
function deleteCriteria(deleteVarKey)
function deleteCriteria(deleteVarKey, criteriaID)
{
ajaxProcessDeleteJQ("<%= request.getContextPath() %>/genericDelete_AJAX.jsp", "#assessmentCriteriaSection" , { varKey: deleteVarKey });
ajaxProcessDeleteJQ("<%= request.getContextPath() %>/genericDelete_AJAX.jsp", "#" + criteriaID , { varKey: deleteVarKey });
return false;
}
</script>
......
......@@ -330,7 +330,7 @@
line-height: 1.2em;
padding-left: 55px;
width: 223px;
padding: 7px 0 7px 56px;
padding: 7px 0 7px 50px;
}
.culture .text-dot-dot{white-space: normal;overflow: visible;}
......
......@@ -18,6 +18,7 @@
List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(job.getApplicantWFs(),
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
HiringTeam hiringTeam = job.getHiringTeam();
%>
<oneit:dynIncluded>
......@@ -69,79 +70,86 @@
.mapEntry("Job", job)
.toMap() %>" />
</div>
<div class="appli-filter">
<%
if(!CollectionUtils.equals(workflowStatus,ApplicationStatus.DRAFT))
{
%>
<ul class="">
<li class="lable-appli-shorting">View</li>
<li class="<%= (appView == AppView.LIST ? "active" : "" ) + " short-list"%>">
<oneit:button value="List" name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("AppView", AppView.LIST).toMap())
.toMap() %>"/>
</li>
<li class="<%= (appView == AppView.GRID ? "active" : "" ) + " grid-list"%>">
<oneit:button value="Grid" name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("AppView", AppView.GRID).toMap())
.toMap() %>"/>
</li>
<li class="<%= (appView == AppView.DETAILED_GRID ? "active" : "" ) + " detailed-grid-list"%>">
<oneit:button value="Detailed Grid" name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("AppView", AppView.DETAILED_GRID).toMap())
.toMap() %>"/>
</li>
</ul>
<% } %>
</div>
<div class="shorting-dropdown application_sorting_bar">
<div class="appli-order-label">Search Applicants</div>
<oneit:ormInput obj="<%= searchApplicant %>" type="text" attributeName="Details" cssClass="form-control search-input" id="searchText" />
<span class="search-icon-btn"></span>
</div>
<oneit:button value="Search" name="search" cssClass="btn btn-primary search-real-btn" style="display:none;"/>
<%
if(showOrderBy)
if(!(CollectionUtils.equals(workflowStatus,ApplicationStatus.DRAFT) && hiringTeam.isTrue(hiringTeam.getOnTrial())))
{
%>
<div class="shorting-dropdown">
<span class="appli-order-label">order by</span>
<select class="form-control" onChange="location=this.value">
<%
for (AppSortOption sortOption : AppSortOption.getAppSortOptionArray())
{
String optionLink = applicantsPage + "&AppSortOption=" + sortOption.getName();
%>
<option <%= (appSortOpt != null && appSortOpt == sortOption ? "selected" : "" )%> value="<%= optionLink %>">
<oneit:toString value="<%= sortOption.getDescription() %>" mode="EscapeHTML"/>
</option>
<%
}
%>
</select>
</div>
<%
}
%>
<div class="shorting-dropdown">
<span class="appli-order-label">Showing</span>
<select class="form-control status-img" onChange="location=this.value">
<div class="appli-filter">
<%
if(!CollectionUtils.equals(workflowStatus,ApplicationStatus.DRAFT))
{
%>
<ul class="">
<li class="lable-appli-shorting">View</li>
<li class="<%= (appView == AppView.LIST ? "active" : "" ) + " short-list"%>">
<oneit:button value="List" name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("AppView", AppView.LIST).toMap())
.toMap() %>"/>
</li>
<li class="<%= (appView == AppView.GRID ? "active" : "" ) + " grid-list"%>">
<oneit:button value="Grid" name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("AppView", AppView.GRID).toMap())
.toMap() %>"/>
</li>
<li class="<%= (appView == AppView.DETAILED_GRID ? "active" : "" ) + " detailed-grid-list"%>">
<oneit:button value="Detailed Grid" name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("AppView", AppView.DETAILED_GRID).toMap())
.toMap() %>"/>
</li>
</ul>
<% } %>
</div>
<div class="shorting-dropdown application_sorting_bar">
<div class="appli-order-label">Search Applicants</div>
<oneit:ormInput obj="<%= searchApplicant %>" type="text" attributeName="Details" cssClass="form-control search-input" id="searchText" />
<span class="search-icon-btn"></span>
</div>
<oneit:button value="Search" name="search" cssClass="btn btn-primary search-real-btn" style="display:none;"/>
<%
for (ApplicationFilter applicationFilter : ApplicationFilter.getApplicationFilterArray())
if(showOrderBy)
{
String optionLink = applicantsPage + "&ApplicationFilter=" + applicationFilter.getName();
%>
<option data-image="images/<%= applicationFilter.getName().toLowerCase() %>.png" <%= (appFilter != null && appFilter == applicationFilter ? "selected" : "" )%> value="<%= optionLink %>">
<oneit:toString value="<%= applicationFilter.getDescription() %>" mode="EscapeHTML"/>
</option>
<div class="shorting-dropdown">
<span class="appli-order-label">order by</span>
<select class="form-control" onChange="location=this.value">
<%
for (AppSortOption sortOption : AppSortOption.getAppSortOptionArray())
{
String optionLink = applicantsPage + "&AppSortOption=" + sortOption.getName();
%>
<option <%= (appSortOpt != null && appSortOpt == sortOption ? "selected" : "" )%> value="<%= optionLink %>">
<oneit:toString value="<%= sortOption.getDescription() %>" mode="EscapeHTML"/>
</option>
<%
}
%>
</select>
</div>
<%
}
%>
</select>
</div>
<div class="shorting-dropdown">
<span class="appli-order-label">Showing</span>
<select class="form-control status-img" onChange="location=this.value">
<%
for (ApplicationFilter applicationFilter : ApplicationFilter.getApplicationFilterArray())
{
String optionLink = applicantsPage + "&ApplicationFilter=" + applicationFilter.getName();
%>
<option data-image="images/<%= applicationFilter.getName().toLowerCase() %>.png" <%= (appFilter != null && appFilter == applicationFilter ? "selected" : "" )%> value="<%= optionLink %>">
<oneit:toString value="<%= applicationFilter.getDescription() %>" mode="EscapeHTML"/>
</option>
<%
}
%>
</select>
</div>
<%
}
%>
</div>
<div class="checkbox-list select-all">
<input type='checkbox' id='select_all' value='select_all' class='norecalc'>
......
......@@ -52,7 +52,7 @@
showError = false;
$('.errorField input, .errorField select, .errorField textarea, .errorField .assocObjDesc').eq(0).focus();
}
recalcFunction();
//recalcFunction();
});
});
......
......@@ -89,9 +89,10 @@
response.sendRedirect(request.getContextPath() + "/extensions/adminportal/responsive_alert.jsp");
}
Article home = WebUtils.getArticleByShortCut(objTran, WebUtils.ADMIN_HOME);
String homeUrl = home.getLink(request);
String signoutUrl = "logout.jsp?nextURL=" + homeUrl;
Article home = WebUtils.getArticleByShortCut(objTran, WebUtils.ADMIN_HOME);
Article companyArticle = WebUtils.getArticleByShortCut(objTran, WebUtils.MY_COMPANY);
String homeUrl = home.getLink(request);
String signoutUrl = "logout.jsp?nextURL=" + homeUrl;
if(clientUser != null)
{
......@@ -140,6 +141,10 @@
function showReachedCap(){
$('#reachedCap').modal('show');
}
function trialNotAllowed(){
$('#trialNotAllowed').modal('show');
}
</script>
<div class="container-fluid">
......@@ -214,8 +219,9 @@
boolean onJob = WebUtils.onJobPages(renderMode);
boolean hasBillingSetup = selectedTeam.hasBillingSetup();
boolean canCreateJob = selectedTeam.allowJobCreation();
boolean trialNotAllowed = selectedTeam.trialJobNotAllowed();
%>
<a href="<%= onJob || !canCreateJob ? "javascript:void(0);": jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) %>" class="<%= onJob || !hasBillingSetup ? "disabled" : ""%>" onclick="<%= canCreateJob ? "" : "showReachedCap()"%>">Create Job</a>
<a href="<%= onJob || !canCreateJob ? "javascript:void(0);": jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) %>" class="<%= onJob || !hasBillingSetup ? "disabled" : ""%>" onclick="<%= canCreateJob ? "" : trialNotAllowed ? "trialNotAllowed()" : "showReachedCap()"%>">Create Job</a>
<%
}
%>
......@@ -253,6 +259,37 @@
</div>
</div>
</div>
<oneit:form name="popupForm" method="post" enctype="multipart/form-data">
<div class="modal fade" id="trialNotAllowed" role="dialog">
<div class="modal-dialog welcome-pop-top">
<div class="modal-body main-welcome-popup">
<h2>Your account is on trial!</h2>
<%
if(companyUser.getRoleForHiringTeam(selectedTeam) == RoleType.STANDARD)
{
%>
<p>Only one Job can be created during the Trial. Please contact your Administrator to set up billing</p>
<%
}
else
{
%>
<p>Only one Job can be created during the Trial. <%= selectedTeam.getCardID() == null ? "Enter Billing Method and" : "" %> Select Plan to enable creation of additional jobs.</p>
<div class="create-y-f-job">
<oneit:button value=" " name="gotoPage" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", companyArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", selectedTeam.getCardID() == null ? "Billing" : "ManagePlan").toMap()))
.mapEntry("procParams", CollectionUtils.mapEntry("HiringTeam", selectedTeam).toMap())
.toMap() %>">
Setup <%= selectedTeam.getCardID() == null ? "Billing" : "Payment Plan" %>
</oneit:button>
</div>
<%
}
%>
</div>
</div>
</div>
</oneit:form>
<%
}
%>
......
......@@ -14,6 +14,7 @@
List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(job.getIncompleteApplicantWFs(),
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
HiringTeam hiringTeam = job.getHiringTeam();
%>
<oneit:dynIncluded>
......@@ -75,7 +76,11 @@
</div>
</div>
<div class="appli-list-name appli-l eq-second-height wider-box">
<oneit:button value=" " name="gotoPage" cssClass="<%= jobApplication.getID() + ""%>" skin="link"
<%
if(!hiringTeam.isTrue(hiringTeam.getOnTrial()) || j < 2)
{
%>
<oneit:button value=" " name="<%= hiringTeam.isTrue(hiringTeam.getOnTrial()) ? "" : "gotoPage"%>" cssClass="<%= jobApplication.getID() + ""%>" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap())
.toMap() %>">
......@@ -99,15 +104,15 @@
+ "&aid=" + candidate.getID()
+ "&pin=" + candidate.getVerificationKey();
%>
<oneit:toString value="<%= candidate %>" mode="EscapeHTML" />
<span style="float:right; padding-right: 5px;">
<a style="float:right; padding-right: 10px;" onclick="copyHTMLToClip('.<%= jobApplication.getID().toString() + "link"%>', <%= candidate.getIsAccountVerified()%>)">
<img src="images/copy-icon.jpg">
<span style="display:none;" class='<%= jobApplication.getID().toString() + "link"%>'>
<%= jobLink %>
</span>
</a>
</span>
<oneit:toString value="<%= candidate %>" mode="EscapeHTML" />
<span style="float:right; padding-right: 5px;">
<a style="float:right; padding-right: 10px;" onclick="copyHTMLToClip('.<%= jobApplication.getID().toString() + "link"%>', <%= candidate.getIsAccountVerified()%>)">
<img src="images/copy-icon.jpg">
<span style="display:none;" class='<%= jobApplication.getID().toString() + "link"%>'>
<%= jobLink %>
</span>
</a>
</span>
</oneit:button>
<div class="appli-int-status">
<span>
......@@ -139,6 +144,9 @@
}
%>
</div>
<%
}
%>
</div>
<%
String widthClass = (job.showAssessmentCriteriaSection() && job.showCultureCriteriaSection()) ? "appli-jcs" :
......
......@@ -47,7 +47,7 @@
<div class="main-qualification" id="<%= criteria.getID() %>">
<span class="delete-qualification" onclick="return deleteCriteria (<%= deleteVarKey %>)"><span></span></span>
<span class="delete-qualification" onclick="return deleteCriteria (<%= deleteVarKey %> , <%= criteria.getID() %>)"><span></span></span>
<oneit:ormInput obj="<%= criteria %>" type="text" attributeName="Name" cssClass="form-control" />
<%
......
......@@ -61,6 +61,14 @@
$(".change-plan-no-button").on("click",function(){
ExtendPopup.close();
});
$(".first-confirm-no-button").on("click",function(){
StatusPopup.close();
});
$(".second-confirm-no-button").on("click",function(){
ConfirmPopup.close();
});
});
function showExtendPopup(elem)
......@@ -304,7 +312,7 @@
</h3>
</div>
<div class="change-plan-button extend-job-button">
<a class="change-plan-no-button popup-no-button">No</a>
<a class="first-confirm-no-button popup-no-button">No</a>
<%
if(jStatus == JobStatus.OPEN)
{
......@@ -335,7 +343,7 @@
</div>
</div>
<div class="change-plan-button extend-job-button">
<a class="change-plan-no-button popup-no-button">No</a>
<a class="second-confirm-no-button popup-no-button">No</a>
<oneit:button skin="link" value="Yes" name="saveJob" cssClass="change-plan-yes-button"
requestAttribs="<%= CollectionUtils.mapEntry("Job", job)
.mapEntry("nextPage", homePage + "&JobStatus=" + (jobStatus != null ? jobStatus : "") + "&JobSortOption=" + jobSortOption)
......
......@@ -8,6 +8,7 @@
<oneit:dynIncluded>
<%
Job job = (Job) process.getAttribute("Job");
HiringTeam hiringTeam = job.getHiringTeam();
List<JobApplication> applications = (List<JobApplication>) getData(request, "applications");
String applicationPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
......@@ -69,6 +70,8 @@
Integer overallRank = jobApplication.getOverallRank();
Boolean isTopRank = CollectionUtils.equals(overallRank, 1);
boolean missingReq = jobApplication.hasFailedEssentialRequirements();
Boolean isVisible = CollectionUtils.equals(overallRank, 2) || isTopRank;
Boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial());
%>
<div class="appl-c-box application-row">
<!--TODO: need to work on the logic. just added to demonstrate that there are 3 different colors for this-->
......@@ -77,12 +80,12 @@
<div class="checkbox-list">
<input type="checkbox" name="IsSelected" value="<%= jobApplication.getObjectID().toString() %>" id="<%= appID %>" class="applicant" >
<label for="<%= appID %>">
<oneit:toString value="<%= jobApplication.getCandidate() %>" mode="EscapeHTML" />
<oneit:toString value="<%= onTrial && !isVisible ? "" : jobApplication.getCandidate() %>" mode="EscapeHTML" />
</label>
</div>
</div>
</div>
<oneit:button value=" " name="gotoPage" cssClass="<%= jobApplication.getID() + ""%>" skin="link"
<oneit:button value=" " name="<%= onTrial && !isVisible ? "" : "gotoPage"%>" cssClass="<%= jobApplication.getID() + ""%>" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap())
.toMap() %>">
......
......@@ -7,6 +7,7 @@
<%
Job job = (Job) process.getAttribute("Job");
HiringTeam hiringTeam = job.getHiringTeam();
List<JobApplication> applications = (List<JobApplication>) getData(request, "applications");
String currentPage = (String) getData(request, "currentPage");
ApplicationStatus appStatus = (ApplicationStatus) getData(request, "WorkFlowStatus");
......@@ -42,6 +43,8 @@
String appID = "app-id-" + jobApplication.getID().toString();
Integer overallRank = jobApplication.getOverallRank();
Boolean isTopRank = CollectionUtils.equals(overallRank, 1);
Boolean isVisible = CollectionUtils.equals(overallRank, 2) || isTopRank;
Boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial());
WorkFlow workflow = job.getWorkFlowByStatus(jobApplication.getApplicationStatus());
boolean missingReq = jobApplication.hasFailedEssentialRequirements();
......@@ -55,15 +58,22 @@
</div>
</div>
<div class="appli-list-name appli-l eq-second-height">
<oneit:button value=" " name="gotoPage" cssClass="<%= jobApplication.getID() + ""%>" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap())
.toMap() %>">
<oneit:toString value="<%= jobApplication.getCandidate() %>" mode="EscapeHTML" />
<div class="appli-int-status">
<oneit:toString value="<%= jobApplication.getApplicantStatusStr() %>" mode="EscapeHTML" />
</div>
</oneit:button>
<%
if(!onTrial || (onTrial && isVisible))
{
%>
<oneit:button value=" " name="gotoPage" cssClass="<%= jobApplication.getID() + ""%>" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap())
.toMap() %>">
<oneit:toString value="<%= jobApplication.getCandidate() %>" mode="EscapeHTML" />
<div class="appli-int-status">
<oneit:toString value="<%= jobApplication.getApplicantStatusStr() %>" mode="EscapeHTML" />
</div>
</oneit:button>
<%
}
%>
</div>
<div class="appli-overall appli-l eq-second-height">
<div class="rank">
......
......@@ -8,6 +8,7 @@
<oneit:dynIncluded>
<%
Job job = (Job) process.getAttribute("Job");
HiringTeam hiringTeam = job.getHiringTeam();
List<JobApplication> applications = (List<JobApplication>) getData(request, "applications");
String applicationPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
......@@ -67,6 +68,8 @@
String appID = "app-id-" + jobApplication.getID().toString();
Integer overallRank = jobApplication.getOverallRank();
Boolean isTopRank = CollectionUtils.equals(overallRank, 1);
Boolean isVisible = CollectionUtils.equals(overallRank, 2) || isTopRank;
Boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial());
%>
<div class="<%= "appl-c-box " + (i == 0 ? " cb-one" : "")%> ">
<!--TODO: need to work on the logic. just added to demonstrate that there are 3 different colors for this-->
......@@ -75,12 +78,12 @@
<div class="checkbox-list">
<input type="checkbox" name="IsSelected" value="<%= jobApplication.getObjectID().toString() %>" id="<%= appID %>" class="applicant" >
<label for="<%= appID %>">
<oneit:toString value="<%= candidate %>" mode="EscapeHTML" />
<oneit:toString value="<%= onTrial && !isVisible ? "" : candidate %>" mode="EscapeHTML" />
</label>
</div>
</div>
</div>
<oneit:button value=" " name="gotoPage" skin="link"
<oneit:button value=" " name="<%= onTrial && !isVisible ? "" : "gotoPage"%>" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap())
.toMap() %>">
......
......@@ -11,6 +11,7 @@
JobApplication prevApp = (JobApplication) getData(request, "prevApp");
JobApplication nextApp = (JobApplication) getData(request, "nextApp");
Job job = jobApplication.getJob();
HiringTeam hiringTeam = job.getHiringTeam();
Candidate candidate = jobApplication.getCandidate();
String tabText = candidate.getToString();
String currentPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
......@@ -20,7 +21,10 @@
List<WorkFlow> sortedWorkFlows = ObjstoreUtils.sort(jobApplication.getApplicationStatus() == ApplicationStatus.DRAFT ? job.getIncompleteApplicantWFs() : job.getApplicantWFs(),
new ObjectTransform[]{WorkFlow.pipesWorkFlow().toSortOrder()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR_NULLS_FIRST});
Integer overallRank = jobApplication.getOverallRank();
boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial());
boolean isVisible = CollectionUtils.equals(overallRank, 2) || CollectionUtils.equals(overallRank, 1);
jobApplication.setWorkFlow(workflow);
Map<FactorClass, Tuple.T3<Double, ColorCode, Double>> roleScoreMap = (Map<FactorClass, Tuple.T3<Double, ColorCode, Double>>)jobApplication.getRoleFit();
......@@ -101,29 +105,34 @@
<img src="images/arrow-left-prev.svg" />
</oneit:button>
<div class="main-appli-name">
<div class="appli-name"><oneit:toString value="<%= candidate.getToString() %>" mode="EscapeHTML"/></div>
<div class="appli-name"><oneit:toString value="<%= onTrial && !isVisible ? "" : candidate.getToString() %>" mode="EscapeHTML"/></div>
<div class="appli-applied">
Applied <oneit:toString value="<%= jobApplication.getSubmittedDate() %>" mode="MidDate"/>
</div>
</div>
<div class="main-export">
<%
if(jobApplication.getCV() != null && jobApplication.getCoverLetter() != null)
if((onTrial && isVisible) || !onTrial)
{
if(jobApplication.getCV() != null && jobApplication.getCoverLetter() != null)
{
%>
<a href="#" class="btn cv-cover-letter" onclick="previewCV()">
<img src="images/icon-paper-clip.png" />CV & Cover Letter
</a>
<a href="#" class="btn cv-cover-letter" onclick="previewCV()">
<img src="images/icon-paper-clip.png" />CV & Cover Letter
</a>
<%
}
%>
<span class="export-candidate" style="display: none;">
<select class="form-control">
<option>Export Candidate Report</option>
<option>PDF</option>
<option>Excel</option>
</select>
</span>
<%
}
%>
<span class="export-candidate" style="display: none;">
<select class="form-control">
<option>Export Candidate Report</option>
<option>PDF</option>
<option>Excel</option>
</select>
</span>
<span class="appli-status-short">
<tagfile:ormsingleasso_select obj="<%= jobApplication %>" assocName="WorkFlow" cssClass="form-control app-process"
......@@ -445,9 +454,9 @@
String dotClass = cultureNarrative != null && cultureNarrative.getColorCode() != null ? cultureNarrative.getColorCode().getDotCSSClass() : "";
%>
<div class="detail-tab-row" id="<%= ((CultureElement)tuple.get1()).getObjectID() %>">
<div class="detail-tab-row-title col-md-4 col-sm-4 col-xs-4">
<span class="common-dot <%= dotClass %>"></span> &nbsp;
<oneit:toString value="<%= tuple.get1() %>" mode="EscapeHTML"/>
<div class="detail-tab-row-title col-md-4 col-sm-4 col-xs-4 culture-detail-row">
<span class="common-dot <%= dotClass %> culture-dot"></span> &nbsp;
<span class="culture-text"><oneit:toString value="<%= tuple.get1() %>" mode="EscapeHTML"/></span>
</div>
<div class="detail-tab-row-text col-md-8 col-sm-8 col-xs-8">
<oneit:toString value="<%= cultureNarrative %>" mode="EscapeHTML"/>
......@@ -585,50 +594,66 @@
<div class="contact-title">Contact</div>
<div class="contact-row">
<div class="contact-label">E</div>
<div class="contact-value">
<a href="<%= "mailto:" + candidate.getUser().getEmail() %>">
<oneit:toString value="<%= candidate.getUser().getEmail() %>" mode="EscapeHTML" />
</a>
</div>
<%
if((onTrial && isVisible) || !onTrial)
{
%>
<div class="contact-value">
<a href="<%= "mailto:" + candidate.getUser().getEmail() %>">
<oneit:toString value="<%= candidate.getUser().getEmail() %>" mode="EscapeHTML" />
</a>
</div>
<%
}
%>
</div>
<div class="contact-row">
<div class="contact-label">P</div>
<div class="contact-value">
<oneit:toString value="<%= candidate.getPhone() %>" mode="EscapeHTML" />
</div>
<%
if((onTrial && isVisible) || !onTrial)
{
%>
<div class="contact-value">
<oneit:toString value="<%= candidate.getPhone() %>" mode="EscapeHTML" />
</div>
<%
}
%>
</div>
<div class="contact-row" style="display:none;">
<div class="contact-label"><img src="images/linkdin-icon.png" /></div>
<div class="contact-value"><a href="#">View LinkedIn profile</a></div>
</div>
<%
if(jobApplication.getCV() != null)
if((onTrial && isVisible) || !onTrial)
{
if(jobApplication.getCV() != null)
{
%>
<div class="contact-row">
<div class="contact-label"><img src="images/download-icon.png" /></div>
<div class="contact-value">
<a target='blank' href='<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CV", jobApplication.getCV(), true) %>'>
Download CV
</a>
<div class="contact-row">
<div class="contact-label"><img src="images/download-icon.png" /></div>
<div class="contact-value">
<a target='blank' href='<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CV", jobApplication.getCV(), true) %>'>
Download CV
</a>
</div>
</div>
</div>
<%
}
%>
<%
if(jobApplication.getCoverLetter() != null)
{
%>
<div class="contact-row">
<div class="contact-label"><img src="images/download-icon.png" /></div>
<div class="contact-value">
<a target='blank' href='<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CoverLetter", jobApplication.getCoverLetter(), true) %>'>
Download Cover Letter
</a>
<%
}
if(jobApplication.getCoverLetter() != null)
{
%>
<div class="contact-row">
<div class="contact-label"><img src="images/download-icon.png" /></div>
<div class="contact-value">
<a target='blank' href='<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CoverLetter", jobApplication.getCoverLetter(), true) %>'>
Download Cover Letter
</a>
</div>
</div>
</div>
<%
}
}
%>
</div>
......
......@@ -81,6 +81,7 @@
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("CompanyUser", companyUser)
.mapEntry("Skip", Boolean.FALSE)
.mapEntry(NotificationUtils.DISPLAY_NOTIFICATION_PARAM, false)
.mapEntry("procParams", CollectionUtils.mapEntry("socialLogin", socialLogin).mapEntry("Company", company).toMap())
.toMap() %>"/>
......@@ -89,6 +90,7 @@
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("CompanyUser", companyUser)
.mapEntry("Skip", Boolean.TRUE)
.mapEntry(NotificationUtils.DISPLAY_NOTIFICATION_PARAM, false)
.mapEntry("procParams", CollectionUtils.mapEntry("socialLogin", socialLogin).mapEntry("Company", company).toMap())
.toMap() %>"/>
</div>
......
......@@ -365,7 +365,7 @@
.toMap() %>" />
<%
if(billingTeam.getCardID() == null)
if(!billingTeam.isTrue(billingTeam.getOnTrial()) && billingTeam.getCardID() == null)
{
%>
<oneit:button value="Open this Job" name="saveJob" cssClass="btn btn-primary btn-green top-margin-25 largeBtn"
......
......@@ -9,4 +9,5 @@
#insufficientCredit = Insufficient credit to open the job.
#agreeTerms = Please agree to the Terms & Conditions
#agreePrivacy = Please agree to the Privacy Policy
#atLeastOneOwner = There has to be at least one owner for team.
\ No newline at end of file
#atLeastOneOwner = There has to be at least one owner for team.
#cannotOpenJob = Free Trial only allows you to open one job.
\ No newline at end of file
......@@ -77,6 +77,7 @@
boolean firstTime = request.getParameter("firstTime") != null ? Boolean.parseBoolean(request.getParameter("firstTime")) : false;
boolean hasBillingSetup = hiringTeam.hasBillingSetup();
boolean canCreateJob = hiringTeam.allowJobCreation();
boolean trialNotAllowed = hiringTeam.trialJobNotAllowed();
%>
......@@ -118,7 +119,7 @@
<div class="welcome-box">
<div class="dashboard-welcome">
<div class="welcome-text"> Welcome <br/> <%= firstTime ? "" : "back"%> <oneit:toString value="<%= secUser.getFirstName()!=null ? secUser.getFirstName() : secUser.getUserName()%>" mode="EscapeHTML"/>!</div>
<a class="d-create-job-btn <%= hasBillingSetup ? "" : "disabled"%>" href="<%= canCreateJob ? jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) : "javascript:void(0);" %>" onclick="<%= canCreateJob ? "" : "showReachedCap()"%>">Create a Job</a>
<a class="d-create-job-btn <%= hasBillingSetup ? "" : "disabled"%>" href="<%= canCreateJob ? jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.START_JOB).toMap()) : "javascript:void(0);" %>" onclick="<%= canCreateJob ? "" : trialNotAllowed ? "trialNotAllowed()" : "showReachedCap()"%>">Create a Job</a>
</div>
<div class="col-sm-3 col-xs-12 d-three-box green-light">
<div class="d-fl-left eq-height">
......@@ -222,7 +223,7 @@
</div>
</oneit:form>
<%
if(billingTeam.getCardID() == null)
if(!billingTeam.isTrue(billingTeam.getOnTrial()) && billingTeam.getCardID() == null)
{
%>
<oneit:form name="setupBilling" method="post" enctype="multipart/form-data">
......@@ -259,7 +260,7 @@
<%
}
else if(billingTeam.getIsPPJ() == null || (!billingTeam.getIsPPJ() && billingTeam.getStripeSubscription() == null))
else if(!billingTeam.isTrue(billingTeam.getOnTrial()) && (billingTeam.getIsPPJ() == null || (!billingTeam.getIsPPJ() && billingTeam.getStripeSubscription() == null)))
{
%>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_hiring_team</tableName>
<column name="on_trial" 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="trial_job_count" type="Long" 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="ppj_credits" type="Long" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
......@@ -28,6 +28,14 @@
<INHERITS factory="Named" nodename="CoreORMAdmin"/>
</NODE>
<NODE name="editNotificationTemplate_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdmin"/>
</NODE>
<NODE name="listNotificationTemplates_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdmin"/>
</NODE>
<NODE name="test_imap_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdmin"/>
<FORM name="*.runEmailFetcher" factory="Participant" class="performa.form.RunEmailFetcherFP"/>
......
......@@ -8,8 +8,9 @@
<!-- <TOPMENU name="MENU.TEST_ANALYSIS" desc="Test Analysis" sortOrder="100" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element"
link="/extensions/performa/testAnalysis.jsp"/> -->
<CHILD name="Performa.SetupPlans" desc="Setup Plans" sortOrder="10" toplevel="ADMIN" priv="admin" link="/extensions/performa/setupPlans.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" />
<CHILD name="Performa.MessageTemplate" desc="Message Template" sortOrder="20" toplevel="ADMIN" priv="admin" link="/extensions/performa/listMessageTemplate.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" />
<CHILD name="Performa.SetupPlans" desc="Setup Plans" sortOrder="10" toplevel="ADMIN" priv="admin" link="/extensions/performa/setupPlans.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" />
<CHILD name="Performa.MessageTemplate" desc="Message Template" sortOrder="20" toplevel="ADMIN" priv="admin" link="/extensions/performa/listMessageTemplate.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" />
<CHILD name="Performa.NotificationTemplate" desc="Notification Template" sortOrder="30" toplevel="ADMIN" priv="admin" link="/extensions/performa/listNotificationTemplates.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" />
</NODE>
</NODE>
......
......@@ -18,11 +18,6 @@
%><%@include file="/saferedirect.jsp"%><%
}
if (toRedirect)
{
%><%@include file="/saferedirect.jsp"%><%
}
Debug.assertion(messageTemplate != null, "MessageTemplate is null in Edit Message Template", "404");
String continuePage = "editMessageTemplate.jsp?MessageTemplateID=" + messageTemplate.getObjectID();
......
<%@ page extends="oneit.servlets.jsp.FormJSP" %>
<%@ include file="/setuprequest.jsp" %>
<%@ include file="inc/stdimports.jsp" %>
<%@ include file="/editor/stdimports.jsp" %>
<%@ page import="oneit.business.content.editor.gui.*" %>
<%! protected String getName (ServletConfig config) { return "editNotificationTemplate_jsp"; } %>
<%
ORMProcessState process = (ORMProcessState) ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
boolean toRedirect = GenericObjDF.getOrCreateObject (request, "NotificationTemplate", NotificationTemplate.REFERENCE_NotificationTemplate);
NotificationTemplate notificationTemplate = (NotificationTemplate) process.getAttribute("NotificationTemplate");
if (toRedirect)
{
%><%@include file="/saferedirect.jsp"%><%
}
Debug.assertion(notificationTemplate != null, "NotificationTemplate is null in Edit Notification Template", "404");
String continuePage = "editNotificationTemplate.jsp?NotificationTemplateID=" + notificationTemplate.getObjectID();
request.setAttribute("oneit.pageFormDetails", CollectionUtils.mapEntry("name", "NotificationTemplate").mapEntry("enctype", "multipart/form-data").toMap());
request.setAttribute("oneit.pageHeaderTitle", "Notification Template");
%>
<%@include file="/editor/header.jsp" %>
<oneit:layout_total widths="<%= new double[] {2, 6, 4} %>" skin="bootstrap">
<oneit:skin tagName="layout_row">
<oneit:layout_label width="1">
<oneit:ormlabel obj="<%= notificationTemplate %>" field="DaysAfter"/>
</oneit:layout_label>
<oneit:layout_field width="1">
<oneit:ormInput obj="<%= notificationTemplate %>" attributeName="DaysAfter"/>
</oneit:layout_field>
</oneit:skin>
<oneit:skin tagName="layout_row">
<oneit:layout_label width="1">
<oneit:ormlabel obj="<%= notificationTemplate %>" field="NotificationContent"/>
</oneit:layout_label>
<oneit:layout_field width="1">
<tagfile:htmleditor obj="<%= notificationTemplate %>" attribName="NotificationContent" id="texteditor"
toolbarSet="<%= EditorGUIOptions.Default %>"/>
</oneit:layout_field>
</oneit:skin>
</oneit:layout_total>
<div class="bottomButtons" hidden="true">
<oneit:button value="Save" name="save" cssClass="BUTTON_PRIMARY"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", "listNotificationTemplates.jsp").toMap() %>"/>
<oneit:button value="Cancel" name="cancel" cssClass="BUTTON_SECONDARY" showIfReadOnly="true"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", "listNotificationTemplates.jsp")
.mapEntry (UpdateMappedObjFP.FAIL_VALIDATION_ERRORS, Boolean.FALSE)
.toMap() %>"/>
</div>
<%@include file="/editor/footer.jsp" %>
\ No newline at end of file
<%@ page extends="oneit.servlets.jsp.FormJSP" %>
<%@ include file="/setuprequest.jsp" %>
<%@ include file="inc/stdimports.jsp" %>
<%@ include file="/editor/stdimports.jsp" %>
<%@ page import="oneit.utils.filter.CollectionFilter"%>
<%! protected String getName (ServletConfig config) { return "listNotificationTemplates_jsp"; } %>
<%
ORMProcessState process = (ORMProcessState) ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
NotificationTemplate[] notificationTemplates = NotificationTemplate.SearchByAll().search(objTran);
process.setAttribute ("NotificationTemplates", notificationTemplates);
request.setAttribute("oneit.pageFormDetails", CollectionUtils.mapEntry("name", "listNotificationTemplate").mapEntry("enctype", "multipart/form-data").toMap());
request.setAttribute("oneit.pageHeaderTitle", "List Notification Template");
%>
<%@include file="/editor/header.jsp" %>
<style>
.tbl-width{width:50%}
</style>
<%
if (notificationTemplates != null && notificationTemplates.length > 0)
{
List<NotificationTemplate> closedJob = (List<NotificationTemplate>) CollectionFilter.filter(Arrays.asList(notificationTemplates), NotificationTemplate.SearchByAll().andNotificationType(new EqualsFilter<>(NotificationType.CLOSED_JOB)));
if(closedJob != null && !closedJob.isEmpty())
{
%>
<oneit:skin tagName="layout_fieldset" legend="Closed Job Notification Settings">
<oneit:skin tagName="layout_search_results">
<oneit:table name="NotificationTemplateTable" sortable="true" cssClass="cougartable tbl-width" notgrid="true">
<oneit:colheader label="Days After" width="16" />
<oneit:colheader label="Notification Content" width="80" />
<oneit:colheader label="" width="4" cssClass="nosort nofilter" />
<%
for (NotificationTemplate notTemp : closedJob)
{
%>
<oneit:row rowObj="<%= notTemp %>">
<oneit:col><oneit:toString value="<%= notTemp.getDaysAfter() %>" mode="Integer" /></oneit:col>
<oneit:col><oneit:toString value="<%= notTemp.getNotificationContent() %>" mode="TidyHTML" /></oneit:col>
<oneit:col><a class="data-link " href="editNotificationTemplate.jsp?NotificationTemplateID=<%= notTemp.getObjectID() %>">>></a></oneit:col>
</oneit:row>
<%
}
%>
</oneit:table>
</oneit:skin>
</oneit:skin>
<%
}
List<NotificationTemplate> trial = (List<NotificationTemplate>) CollectionFilter.filter(Arrays.asList(notificationTemplates), NotificationTemplate.SearchByAll().andNotificationType(new EqualsFilter<>(NotificationType.TRIAL)));
if(trial != null && !trial.isEmpty())
{
%>
<oneit:skin tagName="layout_fieldset" legend="Trial Notification Settings">
<oneit:skin tagName="layout_search_results">
<oneit:table name="NotificationTemplateTable" sortable="true" cssClass="cougartable tbl-width" notgrid="true">
<oneit:colheader label="Days After" width="16" />
<oneit:colheader label="Notification Content" width="80" />
<oneit:colheader label="" width="4" cssClass="nosort nofilter" />
<%
for (NotificationTemplate notTemp : trial)
{
%>
<oneit:row rowObj="<%= notTemp %>">
<oneit:col><oneit:toString value="<%= notTemp.getDaysAfter() %>" mode="Integer" /></oneit:col>
<oneit:col><oneit:toString value="<%= notTemp.getNotificationContent() %>" mode="TidyHTML" /></oneit:col>
<oneit:col><a class="data-link " href="editNotificationTemplate.jsp?NotificationTemplateID=<%= notTemp.getObjectID() %>">>></a></oneit:col>
</oneit:row>
<%
}
%>
</oneit:table>
<oneit:button value="Add Trial Notification Template" cssClass="btn-primary" name="gotoPage"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", "editNotificationTemplate.jsp")
.mapEntry("ignoreProcess", Boolean.TRUE)
.toMap() %>" />
</oneit:skin>
</oneit:skin>
<%
}
}
%>
<%@include file="/editor/footer.jsp" %>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_notification_template</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="notification_type" type="String" nullable="false" length="200"/>
<column name="days_after" type="Long" nullable="false"/>
<column name="notification_content" type="CLOB" nullable="false"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
<?xml version="1.0"?>
<!-- @AutoRun -->
<OBJECTS name="">
<NODE name="Script" factory="Vector">
<NODE name='insertOp' factory='Participant' class='oneit.sql.transfer.InsertOperation'>
<tableName factory='String'>tl_notification_template</tableName>
<value name='object_id' factory='Participant' class='oneit.sql.transfer.DBTransferer$ObjectID'/>
<value name='object_last_updated_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='object_created_date' class='oneit.sql.transfer.DBTransferer$Timestamp'/>
<value name='notification_type' factory='String'>CLOSED_JOB</value>
<value name='days_after' factory='Integer'>14</value>
<value name='notification_content' factory='String'>Please shortlist job applications</value>
</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