Commit 049bdd9e by Nilu

making role mandatory for user

parent bec3a154
......@@ -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="role_type" type="String" nullable="true" length="200"/>
<column name="role_type" type="String" nullable="false" length="200"/>
<column name="hiring_team_id" type="Long" length="11" nullable="true"/>
<column name="company_user_id" type="Long" length="11" nullable="true"/>
</NODE>
......
......@@ -11,7 +11,7 @@
<column name="" type="CLOB" nullable="true"/>
<column name="" type="CLOB" nullable="true"/>
<column name="" type="CLOB" nullable="true"/>
<column name="" type="String" nullable="true" length="200"/>
<column name="" type="String" nullable="false" length="200"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -8,7 +8,7 @@ CREATE TABLE tl_company_user_hiring_team_link (
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
role_type varchar(200) NULL,
role_type varchar(200) NOT NULL,
hiring_team_id numeric(12) NULL,
company_user_id numeric(12) NULL
);
......
......@@ -11,7 +11,7 @@ CREATE TABLE it_does_not_matter (
text NULL,
text NULL,
text NULL,
varchar(200) NULL
varchar(200) NOT NULL
);
......
......@@ -9,7 +9,7 @@ CREATE TABLE tl_company_user_hiring_team_link (
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
role_type varchar2(200) NULL,
role_type varchar2(200) NOT NULL,
hiring_team_id number(12) NULL,
company_user_id number(12) NULL
);
......
......@@ -12,7 +12,7 @@ CREATE TABLE it_does_not_matter (
clob NULL,
clob NULL,
clob NULL,
varchar2(200) NULL
varchar2(200) NOT NULL
);
......
......@@ -9,7 +9,7 @@ CREATE TABLE tl_company_user_hiring_team_link (
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
role_type varchar(200) NULL,
role_type varchar(200) NOT NULL,
hiring_team_id numeric(12) NULL,
company_user_id numeric(12) NULL
);
......
......@@ -12,7 +12,7 @@ CREATE TABLE it_does_not_matter (
text NULL,
text NULL,
text NULL,
varchar(200) NULL
varchar(200) NOT NULL
);
......
......@@ -141,7 +141,7 @@ public abstract class BaseCompanyUserHiringTeamLink extends BaseBusinessClass
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "role_type");
metaInfo.put ("mandatory", "false");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "Role");
metaInfo.put ("type", "RoleType");
......@@ -268,6 +268,7 @@ public abstract class BaseCompanyUserHiringTeamLink extends BaseBusinessClass
oldAndNewIdentical = HELPER_Role.compare (_Role, newRole);
}
BusinessObjectParser.assertFieldCondition (newRole != null, this, FIELD_Role, "mandatory");
if (FIELD_Role_Validators.length > 0)
......@@ -1323,7 +1324,7 @@ public abstract class BaseCompanyUserHiringTeamLink extends BaseBusinessClass
List result = super.getAttributes ();
result.add(HELPER_Role.getAttribObject (getClass (), _Role, false, FIELD_Role));
result.add(HELPER_Role.getAttribObject (getClass (), _Role, true, FIELD_Role));
return result;
}
......
......@@ -186,6 +186,7 @@ public abstract class BaseInviteTeammateNPO extends NonPersistentBO
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "RoleType");
metaInfo.put ("type", "RoleType");
......@@ -607,6 +608,7 @@ public abstract class BaseInviteTeammateNPO extends NonPersistentBO
oldAndNewIdentical = HELPER_RoleType.compare (_RoleType, newRoleType);
}
BusinessObjectParser.assertFieldCondition (newRoleType != null, this, FIELD_RoleType, "mandatory");
if (FIELD_RoleType_Validators.length > 0)
......@@ -1474,7 +1476,7 @@ public abstract class BaseInviteTeammateNPO extends NonPersistentBO
result.add(HELPER_UserEmail.getAttribObject (getClass (), _UserEmail, false, FIELD_UserEmail));
result.add(HELPER_FirstName.getAttribObject (getClass (), _FirstName, false, FIELD_FirstName));
result.add(HELPER_LastName.getAttribObject (getClass (), _LastName, false, FIELD_LastName));
result.add(HELPER_RoleType.getAttribObject (getClass (), _RoleType, false, FIELD_RoleType));
result.add(HELPER_RoleType.getAttribObject (getClass (), _RoleType, true, FIELD_RoleType));
return result;
}
......
......@@ -8,7 +8,7 @@
<TABLE name="tl_company_user_hiring_team_link" tablePrefix="object">
<ATTRIB name="Role" type="RoleType" dbcol="role_type" mandatory="false" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="Role" type="RoleType" dbcol="role_type" mandatory="true" attribHelper="EnumeratedAttributeHelper"/>
<SINGLEREFERENCE name="HiringTeam" type="HiringTeam" dbcol="hiring_team_id" backreferenceName="Users" />
<SINGLEREFERENCE name="CompanyUser" type="CompanyUser" dbcol="company_user_id" backreferenceName="HiringTeams" />
......
......@@ -14,7 +14,7 @@
<ATTRIB name="UserEmail" type="String" validators="Email" />
<ATTRIB name="FirstName" type="String" />
<ATTRIB name="LastName" type="String" />
<ATTRIB name="RoleType" type="RoleType" attribHelper="EnumeratedAttributeHelper" />
<ATTRIB name="RoleType" type="RoleType" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
</TABLE>
......
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